1 | {known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"} |
---|
2 | {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js" } |
---|
3 | {known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.sortable.packed.js" } |
---|
4 | |
---|
5 | {html_head} |
---|
6 | |
---|
7 | {$SCRIPT} |
---|
8 | {literal} |
---|
9 | |
---|
10 | |
---|
11 | <style> |
---|
12 | #screenshot{ |
---|
13 | position:absolute; |
---|
14 | border:1px solid #ccc; |
---|
15 | background:#333; |
---|
16 | padding:5px; |
---|
17 | display:none; |
---|
18 | color:#fff; |
---|
19 | z-index: 10; |
---|
20 | } |
---|
21 | |
---|
22 | </style> |
---|
23 | |
---|
24 | <style type="text/css"> |
---|
25 | #categoryOrdering li { |
---|
26 | height: 60px; |
---|
27 | } |
---|
28 | #categoryOrdering p { |
---|
29 | margin-bottom: 0 !important; |
---|
30 | margin-top: 0.5em !important; |
---|
31 | } |
---|
32 | .flashgal_line { |
---|
33 | margin: 0 10px; |
---|
34 | } |
---|
35 | .MainBlock { |
---|
36 | color: #ff3363; |
---|
37 | } |
---|
38 | |
---|
39 | </style> |
---|
40 | {/literal} |
---|
41 | |
---|
42 | {/html_head} |
---|
43 | |
---|
44 | <script type="text/javascript"> |
---|
45 | jQuery().ready(function(){ldelim} |
---|
46 | jQuery(".catPos").hide(); |
---|
47 | jQuery(".drag_button").show(); |
---|
48 | jQuery(".categoryLi").css("cursor","move"); |
---|
49 | jQuery(".categoryUl").sortable({ldelim} |
---|
50 | axis: "y", |
---|
51 | opacity: 0.8 |
---|
52 | }); |
---|
53 | jQuery("#categoryOrdering").submit(function(){ldelim} |
---|
54 | ar = jQuery('.categoryUl').sortable('toArray'); |
---|
55 | for(i=0;i<ar.length;i++) {ldelim} |
---|
56 | module = ar[i].split('module_'); |
---|
57 | document.getElementsByName('position[' + module[1] + ']')[0].value = i; |
---|
58 | } |
---|
59 | }); |
---|
60 | }); |
---|
61 | </script> |
---|
62 | |
---|
63 | |
---|
64 | <div class="titrePage"> |
---|
65 | <h2>Flash Gallery</h2> |
---|
66 | </div> |
---|
67 | |
---|
68 | <form id="categoryOrdering" method="post" action=""> |
---|
69 | |
---|
70 | <p style="text-align: center;"> |
---|
71 | <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED} /> |
---|
72 | <br /> |
---|
73 | </p> |
---|
74 | |
---|
75 | <ul class="categoryUl"> |
---|
76 | {foreach from=$modules item=module} |
---|
77 | |
---|
78 | <li class="categoryLi virtual_cat" id="module_{$module.ID}"> |
---|
79 | {if $module.TYPE != 'MainBlock'} |
---|
80 | <ul class="categoryActions"> |
---|
81 | <li><img src="{$module.ON_HOME}" title="{$module.ON_HOME_LIB}"/></li> |
---|
82 | <li><img src="{$module.ON_CATS}" title="{$module.ON_CATS_LIB}"/></a></li> |
---|
83 | <li><img src="{$module.RECURS_CATS}" title="{$module.RECURS_CATS_LIB}"/></a></li> |
---|
84 | |
---|
85 | <li><a href="{$module.U_EDIT}" title="{'flashgal_edit'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'flash_edit'|@translate}"/></a></li> |
---|
86 | {if !empty($module.U_DELETE) } |
---|
87 | <li><a href="{$module.U_DELETE}" title="{'flashgal_delete'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.admin_icon_dir}/category_delete.png" class="button" alt="{'flashgal_delete'|@translate}" /></a></li> |
---|
88 | {/if} |
---|
89 | |
---|
90 | </ul> |
---|
91 | {/if} |
---|
92 | |
---|
93 | <p> |
---|
94 | <img src="{$themeconf.admin_icon_dir}/cat_move.png" class="button drag_button" style="display:none;" alt="{'Drag to re-order'|@translate}" title="{'Drag to re-order'|@translate}"/> |
---|
95 | <strong>{if $module.TYPE == 'MainBlock'}<span class="MainBlock">{$module.NAME}</span>{else}<a href="{$module.U_EDIT}" class="screenshot" rel="{$module.SCREEN}" title="{$module.NAME}" >{$module.NAME}</a>{/if}</strong> |
---|
96 | |
---|
97 | {if $module.TYPE != 'MainBlock'} - {$module.TYPE_NAME}{/if} |
---|
98 | </p> |
---|
99 | |
---|
100 | |
---|
101 | {if !empty($module.DESC)} |
---|
102 | <p style="margin-left: 30px;"><i>{$module.DESC}</i></p> |
---|
103 | {/if} |
---|
104 | |
---|
105 | <p class="catPos"> |
---|
106 | <label> |
---|
107 | {'Position'|@translate} |
---|
108 | <input type="text" size="4" name="position[{$module.ID}]" maxlength="4" value="{$module.POS}" /> |
---|
109 | </label> |
---|
110 | </p> |
---|
111 | </li> |
---|
112 | {/foreach} |
---|
113 | </ul> |
---|
114 | |
---|
115 | <p style="text-align: center;"> |
---|
116 | <br /> |
---|
117 | <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED} /> |
---|
118 | </p> |
---|
119 | </form> |
---|
120 | |
---|
121 | |
---|
122 | |
---|
123 | {* |
---|
124 | <legend>{'flashgal_mods_management'|@translate}</legend> |
---|
125 | <table class="table2"> |
---|
126 | <thead> |
---|
127 | <tr class="throw"> |
---|
128 | <td>{'flashgal_module_title'|@translate}</td> |
---|
129 | <td>{'flashgal_desc'|@translate}</td> |
---|
130 | <td>{'flashgal_type'|@translate}</td> |
---|
131 | <td>{'flashgal_position'|@translate}</td> |
---|
132 | <td>{'flashgal_action'|@translate}</td> |
---|
133 | </tr> |
---|
134 | </thead> |
---|
135 | |
---|
136 | {foreach from=$modules item=module} |
---|
137 | <tr class="{$module.CLASS}" height="28"> |
---|
138 | <td align="center">{$module.NAME}</td> |
---|
139 | <td align="center">{$module.DESC}</td> |
---|
140 | <td align="center">{$module.TYPE}</td> |
---|
141 | <td align="center"><input type="text" size="2" maxlength="2" value="{$module.POS}" name="position[{$module.ID}]"/></td> |
---|
142 | <td align="center">{$module.ACTION}</td> |
---|
143 | </tr> |
---|
144 | {/foreach} |
---|
145 | *} |
---|