From 1cefb2fa06087f3652c11b0646fb52210dae8e32 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Thu, 29 Sep 2016 15:50:27 +0200 Subject: [PATCH] Shot list: Make shot active when making one of its tasks active --- src/scripts/tutti/10_tasks.js | 5 +++++ src/styles/_shots.sass | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/scripts/tutti/10_tasks.js b/src/scripts/tutti/10_tasks.js index 564574a..2526d5c 100644 --- a/src/scripts/tutti/10_tasks.js +++ b/src/scripts/tutti/10_tasks.js @@ -322,6 +322,11 @@ $(function() { var task_id = e.delegateTarget.dataset.taskId; task_open(task_id); + if (ProjectUtils.context() == 'shot'){ + $('[id^="shot-"]').removeClass('active'); + $(this).parent().parent().addClass('active'); + } + if ($(window).scrollTop() > 100) { $("html, body").animate({scrollTop: 50 }, '500', 'swing'); } diff --git a/src/styles/_shots.sass b/src/styles/_shots.sass index e3a724f..d00db74 100644 --- a/src/styles/_shots.sass +++ b/src/styles/_shots.sass @@ -115,15 +115,17 @@ &.active opacity: 1 - border-radius: 2px - display: inline-block + + &:before + transform: translate(-50%, -50%) scale(1.6) + border: 2px solid $color-primary &.task-add width: auto border-radius: initial opacity: 0 vertical-align: middle - padding: 15px 5px + padding: 5px display: flex &:hover