diff options
Diffstat (limited to 'public/javascripts/admin_interface.js')
| -rw-r--r-- | public/javascripts/admin_interface.js | 10 |
1 files changed, 9 insertions, 1 deletions
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 = { | |||
| 83 | 83 | ||
| 84 | initialize : function() { | 84 | initialize : function() { |
| 85 | $("#menu_item_list").sortable({ | 85 | $("#menu_item_list").sortable({ |
| 86 | axis: 'y', | 86 | axis: 'y', |
| 87 | items: 'tr', | 87 | items: 'tr', |
| 88 | handle: 'td', | 88 | handle: 'td', |
| 89 | placeholder: 'ui-state-highlight', | ||
| 90 | start: function(e, ui) { | ||
| 91 | menu_item_sorter.placeholder_helper(e,ui); | ||
| 92 | }, | ||
| 89 | stop : function(){ | 93 | stop : function(){ |
| 90 | $.ajax({ | 94 | $.ajax({ |
| 91 | type: "POST", | 95 | type: "POST", |
| @@ -98,6 +102,10 @@ menu_item_sorter = { | |||
| 98 | }); | 102 | }); |
| 99 | } | 103 | } |
| 100 | }); | 104 | }); |
| 105 | }, | ||
| 106 | |||
| 107 | placeholder_helper : function(e,ui) { | ||
| 108 | $(".ui-state-highlight").html("<td colspan='100%'></td>"); | ||
| 101 | } | 109 | } |
| 102 | } | 110 | } |
| 103 | 111 | ||
