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"
|
// Style elements starting with item_type and dash, e.g. "#shot-uuid"
|
||||||
deactivateItemLinks();
|
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
|
// Special case to highlight the shot row when opening task in shot or asset context
|
||||||
var pu_ctx = ProjectUtils.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) {
|
$.get(item_url, function(item_data) {
|
||||||
statusBarClear();
|
statusBarClear();
|
||||||
$('#item-details').html(item_data);
|
$('#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) {
|
}).fail(function(xhr) {
|
||||||
if (console) {
|
if (console) {
|
||||||
console.log('Error fetching task', item_id, 'from', item_url);
|
console.log('Error fetching task', item_id, 'from', item_url);
|
||||||
|
@@ -195,6 +195,9 @@ nav.sidebar
|
|||||||
|
|
||||||
&.processing
|
&.processing
|
||||||
background-image: none
|
background-image: none
|
||||||
|
pointer-events: none
|
||||||
|
cursor: not-allowed
|
||||||
|
|
||||||
&:before
|
&:before
|
||||||
+stripes-animate
|
+stripes-animate
|
||||||
+stripes(transparent, rgba($color-background-active, .6), -45deg, 15px)
|
+stripes(transparent, rgba($color-background-active, .6), -45deg, 15px)
|
||||||
|
Reference in New Issue
Block a user