Shot list: show updated task name in shot list after editing task.
This commit is contained in:
@@ -1,3 +1,26 @@
|
||||
(function ( $ ) {
|
||||
$.fn.flashOnce = function() {
|
||||
var target = this;
|
||||
this
|
||||
.addClass('flash-on')
|
||||
.delay(200) // this delay is linked to the transition in the flash-on CSS class.
|
||||
.queue(function() {
|
||||
target
|
||||
.removeClass('flash-on')
|
||||
.addClass('flash-off')
|
||||
.dequeue()
|
||||
;})
|
||||
.delay(1000) // this delay is just to clean up the flash-X classes.
|
||||
.queue(function() {
|
||||
target
|
||||
.removeClass('flash-on flash-off')
|
||||
.dequeue()
|
||||
;})
|
||||
;
|
||||
return this;
|
||||
};
|
||||
}(jQuery));
|
||||
|
||||
/**
|
||||
* Shows a task in the #task-details div.
|
||||
*/
|
||||
@@ -73,6 +96,7 @@ function task_save(task_id, task_url) {
|
||||
|
||||
// Update the task list.
|
||||
// NOTE: this is tightly linked to the HTML of the task list in for_project.jade.
|
||||
$('.task-name-' + saved_task._id).text(saved_task.name).flashOnce();
|
||||
$task.find('span.name').text(saved_task.name);
|
||||
$task.find('span.type').text(saved_task.task_type);
|
||||
$task.find('span.status').text(saved_task.properties.status.replace('_', ' '));
|
||||
|
Reference in New Issue
Block a user