Show in user interface the saving state of the task

This commit is contained in:
Frederic Guillot
2016-01-17 17:24:09 -05:00
parent 92c0941f75
commit 32b2fd92d3
8 changed files with 29 additions and 5 deletions

View File

@@ -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;