##// END OF EJS Templates
Adds an ajax indicator on the sort handle (#12909)....
Jean-Philippe Lang -
r14959:5a8a21151e32
parent child
Show More
@@ -606,8 +606,9 function beforeShowDatePicker(input, inst) {
606 606 },
607 607 update: function(event, ui) {
608 608 var sortable = $(this);
609 var url = ui.item.find(".sort-handle").data("reorder-url");
610 var param = ui.item.find(".sort-handle").data("reorder-param");
609 var handle = ui.item.find(".sort-handle").addClass("ajax-loading");
610 var url = handle.data("reorder-url");
611 var param = handle.data("reorder-param");
611 612 var data = {};
612 613 data[param] = {position: ui.item.index() + settings['firstPosition']};
613 614 $.ajax({
@@ -622,6 +623,9 function beforeShowDatePicker(input, inst) {
622 623 error: function(jqXHR, textStatus, errorThrown){
623 624 alert(jqXHR.status);
624 625 sortable.sortable("cancel");
626 },
627 complete: function(jqXHR, textStatus, errorThrown){
628 handle.removeClass("ajax-loading");
625 629 }
626 630 });
627 631 },
@@ -1202,6 +1202,7 a.icon-only::after {
1202 1202 .icon-file.application-x-gzip { background-image: url(../images/files/zip.png); }
1203 1203
1204 1204 .sort-handle { width:16px; height:16px; background:url(../images/reorder.png) no-repeat 0 50%; cursor:move; }
1205 .sort-handle.ajax-loading { background-image: url(../images/loading.gif); }
1205 1206 tr.ui-sortable-helper { border:1px solid #e4e4e4; }
1206 1207
1207 1208 .contextual>.icon:not(:first-child), .buttons>.icon:not(:first-child) { margin-left: 5px; }
General Comments 0
You need to be logged in to leave comments. Login now