| 1 | {footer_script require='jquery.ui.sortable'}{literal} |
|---|
| 2 | jQuery(document).ready(function(){ |
|---|
| 3 | jQuery(".catPos").hide(); |
|---|
| 4 | jQuery(".drag_button").show(); |
|---|
| 5 | jQuery(".categoryLi").css("cursor","move"); |
|---|
| 6 | jQuery(".categoryUl").sortable({ |
|---|
| 7 | axis: "y", |
|---|
| 8 | opacity: 0.8 |
|---|
| 9 | }); |
|---|
| 10 | jQuery("#categoryOrdering").submit(function(){ |
|---|
| 11 | ar = jQuery('.categoryUl').sortable('toArray'); |
|---|
| 12 | for(i=0;i<ar.length;i++) { |
|---|
| 13 | module = ar[i].split('module_'); |
|---|
| 14 | document.getElementsByName('position[' + module[1] + ']')[0].value = i; |
|---|
| 15 | } |
|---|
| 16 | }); |
|---|
| 17 | }); |
|---|
| 18 | {/literal}{/footer_script} |
|---|
| 19 | |
|---|
| 20 | {html_head} |
|---|
| 21 | |
|---|
| 22 | {$SCRIPT} |
|---|
| 23 | {literal} |
|---|
| 24 | <style> |
|---|
| 25 | #screenshot{ |
|---|
| 26 | position:absolute; |
|---|
| 27 | border:1px solid #ccc; |
|---|
| 28 | background:#333; |
|---|
| 29 | padding:5px; |
|---|
| 30 | display:none; |
|---|
| 31 | color:#fff; |
|---|
| 32 | z-index: 10; |
|---|
| 33 | } |
|---|
| 34 | |
|---|
| 35 | </style> |
|---|
| 36 | {/literal} |
|---|
| 37 | |
|---|
| 38 | {/html_head} |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | <div class="titrePage"> |
|---|
| 42 | <h2>Flash Gallery</h2> |
|---|
| 43 | </div> |
|---|
| 44 | |
|---|
| 45 | <form id="categoryOrdering" method="post" action=""> |
|---|
| 46 | |
|---|
| 47 | <p style="text-align: center;"> |
|---|
| 48 | <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED} /> |
|---|
| 49 | <br /> |
|---|
| 50 | </p> |
|---|
| 51 | |
|---|
| 52 | <ul class="categoryUl"> |
|---|
| 53 | {foreach from=$modules item=module} |
|---|
| 54 | |
|---|
| 55 | <li class="categoryLi virtual_cat" id="module_{$module.ID}"> |
|---|
| 56 | {if $module.TYPE != 'MainBlock'} |
|---|
| 57 | <ul class="categoryActions"> |
|---|
| 58 | <li><a href="{$module.U_HOME}" title="{$module.ON_HOME_LIB}"><img src="{$module.ON_HOME}" title="{$module.ON_HOME_LIB}"/></a></li> |
|---|
| 59 | <li><a href="{$module.U_CATS}" title="{$module.ON_CATS_LIB}"><img src="{$module.ON_CATS}" title="{$module.ON_CATS_LIB}"/></a></li> |
|---|
| 60 | <li><a href="{$module.U_RECURS}" title="{$module.RECURS_CATS_LIB}"><img src="{$module.RECURS_CATS}" title="{$module.RECURS_CATS_LIB}"/></a></li> |
|---|
| 61 | |
|---|
| 62 | <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> |
|---|
| 63 | {if !empty($module.U_DELETE) } |
|---|
| 64 | <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> |
|---|
| 65 | {/if} |
|---|
| 66 | |
|---|
| 67 | </ul> |
|---|
| 68 | {/if} |
|---|
| 69 | |
|---|
| 70 | <p> |
|---|
| 71 | <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}"/> |
|---|
| 72 | <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> |
|---|
| 73 | |
|---|
| 74 | {if $module.TYPE != 'MainBlock'} - {$module.TYPE_NAME}{/if} |
|---|
| 75 | </p> |
|---|
| 76 | |
|---|
| 77 | |
|---|
| 78 | {if !empty($module.DESC)} |
|---|
| 79 | <p style="margin-left: 30px;"><i>{$module.DESC}</i></p> |
|---|
| 80 | {/if} |
|---|
| 81 | |
|---|
| 82 | <p class="catPos"> |
|---|
| 83 | <label> |
|---|
| 84 | {'Position'|@translate} |
|---|
| 85 | <input type="text" size="4" name="position[{$module.ID}]" maxlength="4" value="{$module.POS}" /> |
|---|
| 86 | </label> |
|---|
| 87 | </p> |
|---|
| 88 | </li> |
|---|
| 89 | {/foreach} |
|---|
| 90 | </ul> |
|---|
| 91 | |
|---|
| 92 | <p style="text-align: center;"> |
|---|
| 93 | <br /> |
|---|
| 94 | <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED} /> |
|---|
| 95 | </p> |
|---|
| 96 | </form> |
|---|
| 97 | |
|---|
| 98 | |
|---|
| 99 | |
|---|
| 100 | {* |
|---|
| 101 | <legend>{'flashgal_mods_management'|@translate}</legend> |
|---|
| 102 | <table class="table2"> |
|---|
| 103 | <thead> |
|---|
| 104 | <tr class="throw"> |
|---|
| 105 | <td>{'flashgal_module_title'|@translate}</td> |
|---|
| 106 | <td>{'flashgal_desc'|@translate}</td> |
|---|
| 107 | <td>{'flashgal_type'|@translate}</td> |
|---|
| 108 | <td>{'flashgal_position'|@translate}</td> |
|---|
| 109 | <td>{'flashgal_action'|@translate}</td> |
|---|
| 110 | </tr> |
|---|
| 111 | </thead> |
|---|
| 112 | |
|---|
| 113 | {foreach from=$modules item=module} |
|---|
| 114 | <tr class="{$module.CLASS}" height="28"> |
|---|
| 115 | <td align="center">{$module.NAME}</td> |
|---|
| 116 | <td align="center">{$module.DESC}</td> |
|---|
| 117 | <td align="center">{$module.TYPE}</td> |
|---|
| 118 | <td align="center"><input type="text" size="2" maxlength="2" value="{$module.POS}" name="position[{$module.ID}]"/></td> |
|---|
| 119 | <td align="center">{$module.ACTION}</td> |
|---|
| 120 | </tr> |
|---|
| 121 | {/foreach} |
|---|
| 122 | *} |
|---|