From 60c13615bf4618d6a20d674747ccad1f447c4082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 5 Oct 2016 10:29:46 +0200 Subject: [PATCH] Moved stuff that always needs to happen on 'task open' into task_open(). --- src/scripts/tutti/10_tasks.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/scripts/tutti/10_tasks.js b/src/scripts/tutti/10_tasks.js index e952ec4..b9682fb 100644 --- a/src/scripts/tutti/10_tasks.js +++ b/src/scripts/tutti/10_tasks.js @@ -79,6 +79,11 @@ function item_open(item_id, item_type, pushState) function task_open(task_id) { item_open(task_id, 'task'); + + if (ProjectUtils.context() == 'shot'){ + $('[id^="shot-"]').removeClass('active'); + $(this).parent().parent().addClass('active'); + } } function shot_open(shot_id) @@ -356,10 +361,5 @@ $(function() { e.preventDefault(); var task_id = e.delegateTarget.dataset.taskId; task_open(task_id); - - if (ProjectUtils.context() == 'shot'){ - $('[id^="shot-"]').removeClass('active'); - $(this).parent().parent().addClass('active'); - } }); });