summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--public/javascripts/application.js8
-rw-r--r--public/stylesheets/application.css1
2 files changed, 7 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");
}
});
},
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 67cd722f8..28f8213ab 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -1202,6 +1202,7 @@ a.icon-only::after {
.icon-file.application-x-gzip { background-image: url(../images/files/zip.png); }
.sort-handle { width:16px; height:16px; background:url(../images/reorder.png) no-repeat 0 50%; cursor:move; }
+.sort-handle.ajax-loading { background-image: url(../images/loading.gif); }
tr.ui-sortable-helper { border:1px solid #e4e4e4; }
.contextual>.icon:not(:first-child), .buttons>.icon:not(:first-child) { margin-left: 5px; }