summaryrefslogtreecommitdiffstats
path: root/public/javascripts
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-19 17:42:55 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-19 17:42:55 +0000
commit5a8a21151e32194c07523e4f468a9e5b0d850d59 (patch)
treec13c7f1751f70ef757196e13bf9cb411e4c12c94 /public/javascripts
parenta1874c8975754e2184674f3107028fbae2b9558d (diff)
downloadredmine-5a8a21151e32194c07523e4f468a9e5b0d850d59.tar.gz
redmine-5a8a21151e32194c07523e4f468a9e5b0d850d59.zip
Adds an ajax indicator on the sort handle (#12909).
git-svn-id: http://svn.redmine.org/redmine/trunk@15341 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/application.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index da8b64dff..ef1070c0e 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -606,8 +606,9 @@ function beforeShowDatePicker(input, inst) {
},
update: function(event, ui) {
var sortable = $(this);
- var url = ui.item.find(".sort-handle").data("reorder-url");
- var param = ui.item.find(".sort-handle").data("reorder-param");
+ var handle = ui.item.find(".sort-handle").addClass("ajax-loading");
+ var url = handle.data("reorder-url");
+ var param = handle.data("reorder-param");
var data = {};
data[param] = {position: ui.item.index() + settings['firstPosition']};
$.ajax({
@@ -622,6 +623,9 @@ function beforeShowDatePicker(input, inst) {
error: function(jqXHR, textStatus, errorThrown){
alert(jqXHR.status);
sortable.sortable("cancel");
+ },
+ complete: function(jqXHR, textStatus, errorThrown){
+ handle.removeClass("ajax-loading");
}
});
},