On peut maintenant trier les liens !

This commit is contained in:
Chouchen
2010-09-21 14:00:04 +00:00
parent b8aa797d20
commit 2394218c17
12 changed files with 276 additions and 55 deletions
+1 -1
View File
@@ -52,5 +52,5 @@ $(document).ready(function(){ $('#todo').resizable(); $('#todo').draggable();
document.getElementsByTagName('head')[0].appendChild(script); ␍
$('#'+arrayId[1]).remove(); ␍
});␍
␍/* A helper function for converting a set of elements to draggables: */␍make_draggable($('#todo'));␍␍var zIndex = 0;␍␍function make_draggable(elements)␍{␍ /* Elements is a jquery object: */␍ elements.draggable({␍ containment:'parent',␍ start:function(e,ui){ ui.helper.css('z-index',++zIndex); },␍ stop:function(e,ui){␍␍ /* Sending the z-index and positon of the note to update_position.php via AJAX GET: */␍ $.get('ajax/update_position_config.php',{␍ x : ui.position.left,␍ y : ui.position.top,␍ id : ui.helper.attr('id')␍ });␍ }␍ });␍}
␍/* A helper function for converting a set of elements to draggables: */␍make_draggable($('#todo'));␍␍var zIndex = 0;␍␍function make_draggable(elements)␍{␍ /* Elements is a jquery object: */␍ elements.draggable({␍ snap:true,␍ containment:'parent',␍ start:function(e,ui){ ui.helper.css('z-index',++zIndex); },␍ stop:function(e,ui){␍␍ /* Sending the z-index and positon of the note to update_position.php via AJAX GET: */␍ $.get('ajax/update_position_config.php',{␍ x : ui.position.left,␍ y : ui.position.top,␍ id : ui.helper.attr('id')␍ });␍ }␍ });␍}
});