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.
|
* Shows a task in the #task-details div.
|
||||||
*/
|
*/
|
||||||
@@ -73,6 +96,7 @@ function task_save(task_id, task_url) {
|
|||||||
|
|
||||||
// Update the task list.
|
// Update the task list.
|
||||||
// NOTE: this is tightly linked to the HTML of the task list in for_project.jade.
|
// 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.name').text(saved_task.name);
|
||||||
$task.find('span.type').text(saved_task.task_type);
|
$task.find('span.type').text(saved_task.task_type);
|
||||||
$task.find('span.status').text(saved_task.properties.status.replace('_', ' '));
|
$task.find('span.status').text(saved_task.properties.status.replace('_', ' '));
|
||||||
|
@@ -19,6 +19,15 @@
|
|||||||
border-radius: 50%
|
border-radius: 50%
|
||||||
transition: all 100ms ease-in-out
|
transition: all 100ms ease-in-out
|
||||||
|
|
||||||
|
.flash-on
|
||||||
|
background-color: #dfd
|
||||||
|
color: #040
|
||||||
|
outline: 1px solid #040
|
||||||
|
transition: all 0.2s
|
||||||
|
|
||||||
|
.flash-off
|
||||||
|
transition: all 0.1s
|
||||||
|
|
||||||
.task-list-item
|
.task-list-item
|
||||||
border-right: 5px solid transparent
|
border-right: 5px solid transparent
|
||||||
color: $color-primary-dark
|
color: $color-primary-dark
|
||||||
|
@@ -24,7 +24,8 @@
|
|||||||
| {% for task in tasks_for_shots[shot._id][task_type] %}
|
| {% for task in tasks_for_shots[shot._id][task_type] %}
|
||||||
a(
|
a(
|
||||||
href="javascript:task_open('{{ task._id }}', '{{ project.url }}');",
|
href="javascript:task_open('{{ task._id }}', '{{ project.url }}');",
|
||||||
class="status-{{ task.properties.status }}") {{ task.name }}
|
class="status-{{ task.properties.status }}")
|
||||||
|
span(class="task-name-{{ task._id }}") {{ task.name }}
|
||||||
br
|
br
|
||||||
| {% endfor %}
|
| {% endfor %}
|
||||||
| {% if not tasks_for_shots[shot._id][task_type] %}
|
| {% if not tasks_for_shots[shot._id][task_type] %}
|
||||||
|
Reference in New Issue
Block a user