1 | {combine_script id="jquery.ui.resizable"} |
---|
2 | |
---|
3 | <table> |
---|
4 | <tr> |
---|
5 | <td align="right"><br>{'stuffs_mv_nb_images'|@translate} </td> |
---|
6 | <td><br><input type="text" name="nb_images" size="3" maxlength="2" value="{$NB_IMAGES}"></td> |
---|
7 | </tr> |
---|
8 | <tr class="cat_options" style="display: none;"> |
---|
9 | <td align="right"><br>{'stuffs_mv_category_display'|@translate} </td> |
---|
10 | <td><br> |
---|
11 | <select name="cat_display"> |
---|
12 | <option label="{'stuffs_mv_all_cats'|@translate}" value="all" {if $cat_display == 'all'}selected="selected"{/if} onClick="javascript: hide_cat_list();">{'stuffs_mv_all_cats'|@translate}</option> |
---|
13 | <option label="{'stuffs_mv_wo_thumb'|@translate}" value="wo_thumb" {if $cat_display == 'wo_thumb'}selected="selected"{/if} onClick="javascript: hide_cat_list();">{'stuffs_mv_wo_thumb'|@translate}</option> |
---|
14 | <option label="{'stuffs_mv_w_thumb'|@translate}" value="w_thumb" {if $cat_display == 'w_thumb'}selected="selected"{/if} onClick="javascript: hide_cat_list();">{'stuffs_mv_w_thumb'|@translate}</option> |
---|
15 | <option label="{'stuffs_mv_selected_cats'|@translate}" value="selected_cats" {if $cat_display == 'selected_cats'}selected="selected"{/if} onClick="javascript: show_cat_list();">{'stuffs_mv_selected_cats'|@translate}</option> |
---|
16 | </select> |
---|
17 | </td> |
---|
18 | </tr> |
---|
19 | <tr class="cat_selection" style="display: none;"> |
---|
20 | <td align="right"> |
---|
21 | <br>{'stuffs_mv_cat_selection'|@translate} |
---|
22 | <br>({'stuffs_mv_hold_ctrl'|@translate}) </td> |
---|
23 | <td><br> |
---|
24 | <select class="categoryList" name="cat_selection[]" multiple="multiple" size="30"> |
---|
25 | {html_options options=$category_selection selected=$category_selected} |
---|
26 | </select></td> |
---|
27 | </tr> |
---|
28 | </table> |
---|
29 | <br> |
---|
30 | |
---|
31 | {literal} |
---|
32 | <script type="text/javascript"> |
---|
33 | resize = false; |
---|
34 | function show_cat_list() |
---|
35 | { |
---|
36 | jQuery('.cat_selection').show(); |
---|
37 | if (!resize) |
---|
38 | { |
---|
39 | resize = true; |
---|
40 | jQuery('.categoryList').resizable({ |
---|
41 | handles: "all", |
---|
42 | animate: true, |
---|
43 | animateDuration: "slow", |
---|
44 | animateEasing: "swing", |
---|
45 | preventDefault: true, |
---|
46 | preserveCursor: true, |
---|
47 | autoHide: true, |
---|
48 | ghost: true |
---|
49 | }); |
---|
50 | } |
---|
51 | } |
---|
52 | |
---|
53 | function hide_cat_list() |
---|
54 | { |
---|
55 | jQuery('.cat_selection').hide(); |
---|
56 | } |
---|
57 | |
---|
58 | jQuery().ready( function () { |
---|
59 | jQuery("input[name='on_cats']").click( function() { |
---|
60 | if (this.checked) |
---|
61 | { |
---|
62 | jQuery('.cat_options').show(); |
---|
63 | if (jQuery("select[name='cat_display']").val() == 'selected_cats') |
---|
64 | show_cat_list(); |
---|
65 | } |
---|
66 | else |
---|
67 | { |
---|
68 | jQuery('.cat_options').hide(); |
---|
69 | hide_cat_list(); |
---|
70 | } |
---|
71 | }); |
---|
72 | }); |
---|
73 | |
---|
74 | if (document.getElementsByName("on_cats")[0].checked) |
---|
75 | { |
---|
76 | jQuery('.cat_options').show(); |
---|
77 | if (jQuery("select[name='cat_display']").val() == 'selected_cats') |
---|
78 | { |
---|
79 | show_cat_list(); |
---|
80 | } |
---|
81 | } |
---|
82 | </script> |
---|
83 | {/literal} |
---|
84 | |
---|