summaryrefslogtreecommitdiff
path: root/public/javascripts/admin_interface.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/javascripts/admin_interface.js')
-rw-r--r--public/javascripts/admin_interface.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/public/javascripts/admin_interface.js b/public/javascripts/admin_interface.js
index ee0b34cd..d94fb623 100644
--- a/public/javascripts/admin_interface.js
+++ b/public/javascripts/admin_interface.js
@@ -386,9 +386,16 @@ menu_item_sorter = {
386 type: "POST", 386 type: "POST",
387 url: "/menu_items/0/sort", 387 url: "/menu_items/0/sort",
388 data: $(this).sortable("serialize"), 388 data: $(this).sortable("serialize"),
389 dataType: "json", 389 success : function() {
390 success : function(results) { 390 // The controller answers head :ok, so there is nothing to parse
391 alert(results); 391 // and dataType: "json" would send every success down the error
392 // path. Reload rather than patch the DOM: first?/last? decide the
393 // disabled chevrons server-side, and after a drag they describe
394 // the old order.
395 window.location.reload();
396 },
397 error : function() {
398 alert("Reihenfolge konnte nicht gespeichert werden.");
392 } 399 }
393 }); 400 });
394 } 401 }