Highlight shot row when opening a task in shot context

This commit is contained in:
2016-11-04 13:02:43 +01:00
parent a0576c6e7c
commit f3c6585fb3
2 changed files with 7 additions and 7 deletions

View File

@@ -38,6 +38,12 @@ function item_open(item_id, item_type, pushState, project_url)
$('[id^="' + item_type + '-"]').removeClass('active');
$('#' + item_type + '-' + item_id).addClass('active');
// Special case to highlight the shot row when opening task in shot context
if (ProjectUtils.context() == 'shot' && item_type == 'task'){
$('[id^="shot-"]').removeClass('active');
$('#task-' + item_id).closest('.table-row').addClass('active');
}
var item_url = '/attract/' + project_url + '/' + item_type + 's/' + item_id;
var push_url = item_url;
if (ProjectUtils.context() == 'shot' && item_type == 'task'){
@@ -85,11 +91,6 @@ function item_open(item_id, item_type, pushState, project_url)
function task_open(task_id, project_url)
{
item_open(task_id, 'task', true, project_url);
if (ProjectUtils.context() == 'shot'){
$('[id^="shot-"]').removeClass('active');
$('#task-' + task_id).closest('.table-row').addClass('active');
}
}
function shot_open(shot_id)

View File

@@ -96,9 +96,8 @@
.progress
margin-bottom: 0
h3
h4
margin-top: 0
font-weight: normal
.d-activity
margin: 0 20px 15px