Moved stuff that always needs to happen on 'task open' into task_open().

This commit is contained in:
2016-10-05 10:29:46 +02:00
parent 917ccd7f3f
commit 60c13615bf

View File

@@ -79,6 +79,11 @@ function item_open(item_id, item_type, pushState)
function task_open(task_id) function task_open(task_id)
{ {
item_open(task_id, 'task'); item_open(task_id, 'task');
if (ProjectUtils.context() == 'shot'){
$('[id^="shot-"]').removeClass('active');
$(this).parent().parent().addClass('active');
}
} }
function shot_open(shot_id) function shot_open(shot_id)
@@ -356,10 +361,5 @@ $(function() {
e.preventDefault(); e.preventDefault();
var task_id = e.delegateTarget.dataset.taskId; var task_id = e.delegateTarget.dataset.taskId;
task_open(task_id); task_open(task_id);
if (ProjectUtils.context() == 'shot'){
$('[id^="shot-"]').removeClass('active');
$(this).parent().parent().addClass('active');
}
}); });
}); });