From 9aaa2365cf2c86997eccfbc85efb330bbfbadfc2 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Tue, 14 Feb 2017 15:33:44 +0100 Subject: [PATCH] item_open: First set item as processing, then style it as active on success --- src/scripts/tutti/10_tasks.js | 10 +++++++--- src/styles/_app_base.sass | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/scripts/tutti/10_tasks.js b/src/scripts/tutti/10_tasks.js index 89edfa7..4a8ec96 100644 --- a/src/scripts/tutti/10_tasks.js +++ b/src/scripts/tutti/10_tasks.js @@ -39,11 +39,10 @@ function item_open(item_id, item_type, pushState, project_url) } } - $('#col_right .col_header span.header_text').text(item_type + ' details'); - // Style elements starting with item_type and dash, e.g. "#shot-uuid" deactivateItemLinks(); - $('#' + item_type + '-' + item_id).addClass('active'); + var current_item = $('#' + item_type + '-' + item_id); + current_item.addClass('processing'); // Special case to highlight the shot row when opening task in shot or asset context var pu_ctx = ProjectUtils.context(); @@ -66,6 +65,11 @@ function item_open(item_id, item_type, pushState, project_url) $.get(item_url, function(item_data) { statusBarClear(); $('#item-details').html(item_data); + $('#col_right .col_header span.header_text').text(item_type + ' details'); + current_item + .removeClass('processing') + .addClass('active'); + }).fail(function(xhr) { if (console) { console.log('Error fetching task', item_id, 'from', item_url); diff --git a/src/styles/_app_base.sass b/src/styles/_app_base.sass index a48268b..8de1695 100644 --- a/src/styles/_app_base.sass +++ b/src/styles/_app_base.sass @@ -195,6 +195,9 @@ nav.sidebar &.processing background-image: none + pointer-events: none + cursor: not-allowed + &:before +stripes-animate +stripes(transparent, rgba($color-background-active, .6), -45deg, 15px)