summaryrefslogtreecommitdiff
path: root/assets/js/src/Board.js
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-01-17 17:24:09 -0500
committerFrederic Guillot <fred@kanboard.net>2016-01-17 17:24:09 -0500
commit32b2fd92d318c5318a544e5005cb15ef6abb863c (patch)
treede35276feb0d03cab1414abc92062fb5ddaa0401 /assets/js/src/Board.js
parent92c0941f75074f42280ff15424a20dc3c37dd7bb (diff)
Show in user interface the saving state of the task
Diffstat (limited to 'assets/js/src/Board.js')
-rw-r--r--assets/js/src/Board.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/assets/js/src/Board.js b/assets/js/src/Board.js
index dede3e2b..b7c1937a 100644
--- a/assets/js/src/Board.js
+++ b/assets/js/src/Board.js
@@ -108,9 +108,12 @@ Board.prototype.dragAndDrop = function() {
placeholder: "draggable-placeholder",
items: ".draggable-item",
stop: function(event, ui) {
+ var taskId = ui.item.attr('data-task-id');
ui.item.removeClass("draggable-item-selected");
+ self.changeTaskState(taskId);
+
self.save(
- ui.item.attr('data-task-id'),
+ taskId,
ui.item.parent().attr("data-column-id"),
ui.item.index() + 1,
ui.item.parent().attr('data-swimlane-id')
@@ -130,6 +133,12 @@ Board.prototype.dragAndDrop = function() {
$(".board-task-list").sortable(params);
};
+Board.prototype.changeTaskState = function(taskId) {
+ var task = $("div[data-task-id=" + taskId + "]");
+ task.addClass('task-board-saving-state');
+ task.find('.task-board-saving-icon').show();
+};
+
Board.prototype.listen = function() {
var self = this;