item_open: First set item as processing, then style it as active on success

This commit is contained in:
2017-02-14 15:33:44 +01:00
parent 3ee875d761
commit 9aaa2365cf
2 changed files with 10 additions and 3 deletions

View File

@@ -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);

View File

@@ -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)