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