Highlight shot row when opening a task in shot context
This commit is contained in:
@@ -38,6 +38,12 @@ function item_open(item_id, item_type, pushState, project_url)
|
|||||||
$('[id^="' + item_type + '-"]').removeClass('active');
|
$('[id^="' + item_type + '-"]').removeClass('active');
|
||||||
$('#' + item_type + '-' + item_id).addClass('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 item_url = '/attract/' + project_url + '/' + item_type + 's/' + item_id;
|
||||||
var push_url = item_url;
|
var push_url = item_url;
|
||||||
if (ProjectUtils.context() == 'shot' && item_type == 'task'){
|
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)
|
function task_open(task_id, project_url)
|
||||||
{
|
{
|
||||||
item_open(task_id, 'task', true, 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)
|
function shot_open(shot_id)
|
||||||
|
@@ -96,9 +96,8 @@
|
|||||||
|
|
||||||
.progress
|
.progress
|
||||||
margin-bottom: 0
|
margin-bottom: 0
|
||||||
h3
|
h4
|
||||||
margin-top: 0
|
margin-top: 0
|
||||||
font-weight: normal
|
|
||||||
|
|
||||||
.d-activity
|
.d-activity
|
||||||
margin: 0 20px 15px
|
margin: 0 20px 15px
|
||||||
|
Reference in New Issue
Block a user