item_open: First set item as processing, then style it as active on success
This commit is contained in:
@@ -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);
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user