source: trunk/admin/themes/default/template/menubar.tpl @ 5783

Last change on this file since 5783 was 5783, checked in by nikrou, 14 years ago

add icon to say that items for menu can be drag and drop to reorganize them.

  • Property svn:eol-style set to LF
File size: 1.9 KB
Line 
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-tablednd" src=$ROOT_URL|@cat:"themes/default/js/jquery.tablednd.js"}
4
5{literal}
6<script type="text/javascript">
7$(function() {
8$('table.table2').tableDnD({
9onDrop:function(table,row) {
10var rows = table.tBodies[0].rows;
11for (var i=0; i<rows.length; i++) {
12  $(rows[i])
13     .attr('class', 'row'+i%2)
14     .find("input:text").attr('value', (i+1)*10);
15}
16}
17});
18});
19</script>
20{/literal}
21
22<div class="titrePage">
23  <h2>Menubar</h2>
24</div>
25<div id="debugArea"></div>
26<form method="post" action="{$F_ACTION}" class="properties">
27  <table class="table2" style="width:99%">
28    <thead>
29      <tr class="throw">
30        <td>Id</td>
31        <td>{'Author'|@translate}</td>
32        <td>{'Name'|@translate}</td>
33        <td>{'Position'|@translate}</td>
34        <td>{'Hide'|@translate}</td>
35      </tr>
36    </thead>
37    <tbody>
38    {foreach from=$blocks item=block name="block_loop"}
39        <tr class="{if $smarty.foreach.block_loop.index is odd}row1{else}row2{/if}">
40          <td>
41            <img src="{$themeconf.admin_icon_dir}/cat_move.png" class="button drag_button" alt="{'Drag to re-order'|@translate}" title="{'Drag to re-order'|@translate}">
42            {$block.reg->get_id()}
43          </td>
44          <td>{$block.reg->get_owner()}</td>
45          <td>{$block.reg->get_name()|@translate}</td>
46          <td><input type="text" name="pos_{$block.reg->get_id()}" value={math equation="abs(pos)" pos=$block.pos} size="2"></td>
47          <td><input type="checkbox" name="hide_{$block.reg->get_id()}" {if $block.pos<0}checked="checked"{/if}></td>
48        </tr>
49     {/foreach}
50     </tbody>
51  </table>
52  <p>
53    <input type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}>
54    <input type="submit" name="reset" value="{'Reset'|@translate}" {$TAG_INPUT_ENABLED}>
55  </p>
56</form>
Note: See TracBrowser for help on using the repository browser.