From f3c6585fb3782f9e10b6c819bd0a79565e35b379 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Fri, 4 Nov 2016 13:02:43 +0100 Subject: [PATCH] Highlight shot row when opening a task in shot context --- src/scripts/tutti/10_tasks.js | 11 ++++++----- src/styles/_dashboard.sass | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/scripts/tutti/10_tasks.js b/src/scripts/tutti/10_tasks.js index 3dbd264..3941389 100644 --- a/src/scripts/tutti/10_tasks.js +++ b/src/scripts/tutti/10_tasks.js @@ -38,6 +38,12 @@ function item_open(item_id, item_type, pushState, project_url) $('[id^="' + item_type + '-"]').removeClass('active'); $('#' + item_type + '-' + item_id).addClass('active'); + // Special case to highlight the shot row when opening task in shot context + if (ProjectUtils.context() == 'shot' && item_type == 'task'){ + $('[id^="shot-"]').removeClass('active'); + $('#task-' + item_id).closest('.table-row').addClass('active'); + } + var item_url = '/attract/' + project_url + '/' + item_type + 's/' + item_id; var push_url = item_url; if (ProjectUtils.context() == 'shot' && item_type == 'task'){ @@ -85,11 +91,6 @@ function item_open(item_id, item_type, pushState, project_url) function task_open(task_id, project_url) { item_open(task_id, 'task', true, project_url); - - if (ProjectUtils.context() == 'shot'){ - $('[id^="shot-"]').removeClass('active'); - $('#task-' + task_id).closest('.table-row').addClass('active'); - } } function shot_open(shot_id) diff --git a/src/styles/_dashboard.sass b/src/styles/_dashboard.sass index 9a80dc8..1e0b83a 100644 --- a/src/styles/_dashboard.sass +++ b/src/styles/_dashboard.sass @@ -96,9 +96,8 @@ .progress margin-bottom: 0 - h3 + h4 margin-top: 0 - font-weight: normal .d-activity margin: 0 20px 15px