diff options
| author | michael pereira | 2011-04-26 10:59:01 +0200 |
|---|---|---|
| committer | michael pereira | 2011-04-26 10:59:01 +0200 |
| commit | 54d6157376b31691b145ca29ac91a20b435f1456 (patch) | |
| tree | 6d0f390a6297c75d86f6ebcccc8c7d8f1c5040d0 /application/modules/user/views/scripts/bootmenu | |
| parent | suspended fix (diff) | |
| download | pbs2-54d6157376b31691b145ca29ac91a20b435f1456.tar.gz pbs2-54d6157376b31691b145ca29ac91a20b435f1456.tar.xz pbs2-54d6157376b31691b145ca29ac91a20b435f1456.zip | |
home on usb and draggable bootmenulist
Diffstat (limited to 'application/modules/user/views/scripts/bootmenu')
| -rw-r--r-- | application/modules/user/views/scripts/bootmenu/index.phtml | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/application/modules/user/views/scripts/bootmenu/index.phtml b/application/modules/user/views/scripts/bootmenu/index.phtml index cf23e1d..7eb783a 100644 --- a/application/modules/user/views/scripts/bootmenu/index.phtml +++ b/application/modules/user/views/scripts/bootmenu/index.phtml @@ -120,8 +120,9 @@ <label>BootmenuID</label> <div class='item'><?php echo $this->escape($bootmenu->getID()); ?></div> <?php endif; ?> + <div id="sortable"> <?php foreach ($this->bootmenuentrylist[$bootmenu->getID()] as $k => $bootmenuentry): ?> - <div class='element'> + <div class='element' id=<?php echo $k?>> <div class='number'> <div class='smallnumber'>BMEntry</div> <?php echo $k+1 ?> @@ -142,7 +143,7 @@ true, false) ?>"><img src='/media/img/play.gif'></a> <?php endif; ?> <?php if(((Pbs_Acl::checkRight('booee') || Pbs_Acl::checkRight('booeem')) && $this->type == 'group') || (Pbs_Acl::checkRight('booeeo') && $this->type == 'own')): ?> - <a href="<?php echo $this->url( + <a class='edit' href="<?php echo $this->url( array( 'module' => 'user', 'controller' => 'bootmenu', @@ -193,6 +194,7 @@ </div> <?php endforeach; ?> </div> + </div> </div> <div class='clear'></div> </div> @@ -201,6 +203,30 @@ <?php echo $this->pagination; ?> + <script> + function getId(el){ + if(el.attr) + return el.attr("id"); + return 0; + } + + $(function() { + $( "#sortable" ).sortable({ + update: function(event, ui){ + var nxt_id = getId(ui.item.next()); + var id = getId(ui.item); + if(id < nxt_id) + nxt_id = (nxt_id-1); + location.href=ui.item.find('.edit').attr('href')+'/neworder/'+(nxt_id); + } + }); + $( "#sortable" ).disableSelection(); + }); + + </script> + + + <script type="text/javascript"> $(document).ready(function(){ $('.actions .play').click(function (){ |
