[20641] | 1 | {html_style}{literal} |
---|
[3609] | 2 | #categoryOrdering li { |
---|
| 3 | height: 60px; |
---|
| 4 | } |
---|
| 5 | #categoryOrdering p { |
---|
| 6 | margin-bottom: 0 !important; |
---|
| 7 | margin-top: 0.5em !important; |
---|
| 8 | } |
---|
| 9 | .MainBlock { |
---|
| 10 | color: #ff3363; |
---|
| 11 | } |
---|
[20641] | 12 | .categoryActions { |
---|
| 13 | float:right; |
---|
| 14 | margin:10px 10px 0 0 !important; |
---|
| 15 | } |
---|
| 16 | .categoryActions li { |
---|
| 17 | display:inline-block; |
---|
| 18 | padding:0 5px; |
---|
| 19 | vertical-align:top; |
---|
| 20 | } |
---|
| 21 | .moduleDesc { |
---|
| 22 | margin-left:30px; |
---|
| 23 | } |
---|
| 24 | .moduleDesc.error { |
---|
| 25 | color:red; |
---|
| 26 | } |
---|
| 27 | .albumTitle { |
---|
| 28 | margin-left:10px !important; |
---|
| 29 | } |
---|
| 30 | {/literal}{/html_style} |
---|
[3609] | 31 | |
---|
[9737] | 32 | {footer_script require='jquery.ui.sortable} |
---|
| 33 | |
---|
| 34 | {literal} |
---|
| 35 | jQuery().ready(function(){ |
---|
| 36 | jQuery(".catPos").hide(); |
---|
| 37 | jQuery(".drag_button").show(); |
---|
| 38 | jQuery(".categoryLi").css("cursor","move"); |
---|
| 39 | jQuery(".categoryUl").sortable({ |
---|
| 40 | axis: "y", |
---|
| 41 | opacity: 0.8 |
---|
[3609] | 42 | }); |
---|
[9737] | 43 | jQuery("#categoryOrdering").submit(function(){ |
---|
| 44 | ar = jQuery('.categoryUl').sortable('toArray'); |
---|
| 45 | for(i=0;i<ar.length;i++) { |
---|
| 46 | module = ar[i].split('module_'); |
---|
| 47 | document.getElementsByName('position[' + module[1] + ']')[0].value = i; |
---|
| 48 | } |
---|
| 49 | }); |
---|
| 50 | }); |
---|
| 51 | {/literal} |
---|
[3609] | 52 | |
---|
[9737] | 53 | {/footer_script} |
---|
| 54 | |
---|
[3609] | 55 | <div class="titrePage"> |
---|
| 56 | <h2>PWG Stuffs</h2> |
---|
| 57 | </div> |
---|
| 58 | |
---|
| 59 | <form id="categoryOrdering" method="post" action=""> |
---|
| 60 | |
---|
| 61 | <ul class="categoryUl"> |
---|
| 62 | {foreach from=$modules item=module} |
---|
| 63 | |
---|
| 64 | <li class="categoryLi virtual_cat" id="module_{$module.ID}"> |
---|
[9369] | 65 | {if !empty($module.PATH)} |
---|
[3609] | 66 | <ul class="categoryActions"> |
---|
[20641] | 67 | <li> |
---|
[3609] | 68 | {'stuffs_id_ligne'|@translate} |
---|
| 69 | <select name="id_line[{$module.ID}]"> |
---|
| 70 | {html_options options=$module.ID_LINE_OPTIONS selected=$module.ID_LINE_SELECTED} |
---|
| 71 | </select> |
---|
| 72 | </li> |
---|
[20641] | 73 | <li> |
---|
[3609] | 74 | {'stuffs_width'|@translate} |
---|
| 75 | <input type="text" size="2" maxlength="2" value="{$module.WIDTH}" name="width[{$module.ID}]" > % |
---|
| 76 | </li> |
---|
[9449] | 77 | {if empty($module.MISSING)} |
---|
[3609] | 78 | <li><a href="{$module.U_EDIT}" title="{'stuffs_edit'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'stuffs_edit'|@translate}"/></a></li> |
---|
[9369] | 79 | {/if} |
---|
[3609] | 80 | {if !empty($module.U_DELETE) } |
---|
| 81 | <li><a href="{$module.U_DELETE}" title="{'stuffs_delete'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.admin_icon_dir}/category_delete.png" class="button" alt="{'stuffs_delete'|@translate}" /></a></li> |
---|
| 82 | {/if} |
---|
| 83 | </ul> |
---|
[7855] | 84 | {/if} |
---|
[3609] | 85 | |
---|
[20641] | 86 | <p class="albumTitle"> |
---|
| 87 | <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}"> |
---|
| 88 | <strong>{if empty($module.PATH)}<span class="MainBlock">{$module.NAME}</span>{else}<a href="{$module.U_EDIT}">{$module.NAME}</a>{/if}</strong> |
---|
| 89 | {if !empty($module.TYPE_NAME)} - {$module.TYPE_NAME}{/if} |
---|
[3609] | 90 | </p> |
---|
[20641] | 91 | |
---|
[9449] | 92 | {if !empty($module.MISSING)} |
---|
[20641] | 93 | <p class="moduleDesc error">{$module.MISSING}</p> |
---|
[9369] | 94 | {elseif !empty($module.DESC)} |
---|
[20641] | 95 | <p class="moduleDesc"><i>{$module.DESC}</i></p> |
---|
[9369] | 96 | {elseif empty($module.PATH)} |
---|
[20641] | 97 | <p class="moduleDesc"><input name="hidemb" type="checkbox" {if $HIDEMB}checked="checked"{/if}> {'Hide on home page'|@translate}</p> |
---|
[3609] | 98 | {/if} |
---|
| 99 | |
---|
| 100 | <p class="catPos"> |
---|
| 101 | <label> |
---|
[20641] | 102 | {'Position'|@translate} : |
---|
| 103 | <input type="text" size="4" name="position[{$module.ID}]" maxlength="4" value="{$module.POS}"> |
---|
[3609] | 104 | </label> |
---|
| 105 | </p> |
---|
| 106 | </li> |
---|
| 107 | {/foreach} |
---|
| 108 | </ul> |
---|
| 109 | |
---|
| 110 | <p style="text-align: center;"> |
---|
| 111 | <br /> |
---|
[9737] | 112 | <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" /> |
---|
[3609] | 113 | </p> |
---|
| 114 | </form> |
---|