summaryrefslogtreecommitdiff
path: root/assets/js/src/Board.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/src/Board.js')
-rw-r--r--assets/js/src/Board.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/assets/js/src/Board.js b/assets/js/src/Board.js
index 6b6431fa..dede3e2b 100644
--- a/assets/js/src/Board.js
+++ b/assets/js/src/Board.js
@@ -1,6 +1,7 @@
function Board(app) {
this.app = app;
this.checkInterval = null;
+ this.savingInProgress = false;
}
Board.prototype.execute = function() {
@@ -42,8 +43,7 @@ Board.prototype.reloadFilters = function(search) {
};
Board.prototype.check = function() {
- if (this.app.isVisible()) {
-
+ if (this.app.isVisible() && ! this.savingInProgress) {
var self = this;
this.app.showLoadingIcon();
@@ -59,7 +59,9 @@ Board.prototype.check = function() {
};
Board.prototype.save = function(taskId, columnId, position, swimlaneId) {
+ var self = this;
this.app.showLoadingIcon();
+ this.savingInProgress = true;
$.ajax({
cache: false,
@@ -73,8 +75,14 @@ Board.prototype.save = function(taskId, columnId, position, swimlaneId) {
"swimlane_id": swimlaneId,
"position": position
}),
- success: this.refresh.bind(this),
- error: this.app.hideLoadingIcon.bind(this)
+ success: function(data) {
+ self.refresh(data);
+ this.savingInProgress = false;
+ },
+ error: function() {
+ self.app.hideLoadingIcon();
+ this.savingInProgress = false;
+ }
});
};