__section__
default
__description__
Popup tree UI for topics in admin editor
__title__

__page__
admin
__lang__
en_US
__name__
topic_popup_ui_topiced
__template__
[% names = name; name = names.0; stpid = stid; stpid_ordered = stid_ordered %]
<input type="hidden" value="topiced" name="topic_source">
[% IF include_css %]
<link rel="stylesheet" type="text/css" rev="alternate" href="[% gSkin.rootdir %]/admin-topic-popup.css?[% constants.cvs_tag_currentcode %]">
[%- END %]
<script src="[% gSkin.rootdir %]/admin-topic-popup.js?[% constants.cvs_tag_currentcode %]" type="text/javascript"></script>

<input type="hidden" value="topiced" name="[% name %]_submit_op">
[% mykey = name _ "_saved_tree" -%]
<input type="hidden" value="[% user.$mykey %]" name="[% mykey %]">
[% mykey = name _ "_tree_pref" -%]
<input type="hidden" value="[% user.$mykey %]" name="[% mykey %]">

<table cellpadding=5><tr>
[% FOR name = names;
	IF name == names.0;
		stid = stpid;
		stid_ordered = stpid_ordered;
	ELSIF name == names.1;
		stid = stcid;
		stid_ordered = stcid_ordered;
	END %]
<td valign="top" bgcolor="#bbbbbb">
<b>[% IF name == "st" %]Parents[% ELSE %]Children[% END %]</b><br>

<table cellpadding="2"><tr><td>
<select name="[% name %]_main_select" size=10 multiple onfocus="[% names.0 %]_change_focus('[% name %]')">
[%- myweights = constants.topic_popup_weights.keys.nsort.reverse;
    myweight = myweights.shift;

    FOREACH this_stid = stid_ordered;
      WHILE stid.$this_stid < myweight;
        IF constants.topic_popup_weights.$myweight %]
<option value="-[% myweight %]">-^- [% constants.topic_popup_weights.$myweight | strip_html %] -^-</option>
[%-     END;
        myweight = myweights.shift;
        LAST IF myweight == 0;
      END;
%]
<option value="[% this_stid %]">[% slashtopics.${this_stid}.label | strip_html %]</option>
[%- END;

    WHILE myweight || myweights.size;
      IF constants.topic_popup_weights.$myweight %]
<option value="-[% myweight %]">-^- [% constants.topic_popup_weights.$myweight | strip_html %] -^-</option>
[%-   END;
      myweight = myweights.shift;
    END;
%]</select>
</td><td style="vertical-align:top">

<img class="hpts-icon" src="[% constants.imagedir %]/admin-topic-arrow-up.gif"   alt="up"     title="Move Item Up"       width="15" height="9"  onclick="[% name %]_move_item(1)"><br>
<img class="hpts-icon" src="[% constants.imagedir %]/admin-topic-remove.gif"     alt="remove" title="Remove Topic"       width="15" height="15" onmouseup="[% name %]_remove()" onmousedown="document.[% form_field_form %].[% name %]_main_select.focus()"><br>
<img class="hpts-icon" src="[% constants.imagedir %]/admin-topic-open.gif"       alt="open"   title="Open Topics Window" width="15" height="15" onmouseup="[% names.0 %]_show('[% user.$mykey %]')" onmousedown="document.[% form_field_form %].[% name %]_main_select.focus()" name="[% name %]_topic_toggle"><br>
<img class="hpts-icon" src="[% constants.imagedir %]/admin-topic-arrow-down.gif" alt="down"   title="Move Item Down"     width="15" height="9"  onclick="[% name %]_move_item(-1)">

</td></tr></table>

<input type="button" value="Add"   onclick="[% names.0 %]_change_focus('[% name %]'); [% names.0 %]_ok()">
<input type="button" value="Visit" onclick="[% name %]_visit()">

</td>
[% END %]
</tr></table>

[% mykey = name _ "_saved_tree" -%]
<script language="javascript">
	[% name %]_load_names();
	var list = new Array ([% user.$mykey %]);
	[% name %]_reset_saved_tree(list);
</script>

__seclev__
10000
__version__
$Id: topic_popup_ui_topiced;admin;default,v 1.9 2006/04/11 18:42:15 entweichen Exp $
