From b826671766f2831439b5441683dd9019062bb4bd Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 15 Aug 2009 17:11:59 +0200 Subject: made the sorting a bit smoother by adding a placeholder --- public/javascripts/admin_interface.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'public/javascripts/admin_interface.js') diff --git a/public/javascripts/admin_interface.js b/public/javascripts/admin_interface.js index b70700b..b0e43e6 100644 --- a/public/javascripts/admin_interface.js +++ b/public/javascripts/admin_interface.js @@ -83,9 +83,13 @@ menu_item_sorter = { initialize : function() { $("#menu_item_list").sortable({ - axis: 'y', + axis: 'y', items: 'tr', handle: 'td', + placeholder: 'ui-state-highlight', + start: function(e, ui) { + menu_item_sorter.placeholder_helper(e,ui); + }, stop : function(){ $.ajax({ type: "POST", @@ -98,6 +102,10 @@ menu_item_sorter = { }); } }); + }, + + placeholder_helper : function(e,ui) { + $(".ui-state-highlight").html(""); } } -- cgit v1.3