|
|
|
@ -26,6 +26,8 @@ |
|
|
|
|
// See doc/COPYRIGHT.rdoc for more details.
|
|
|
|
|
// ++
|
|
|
|
|
|
|
|
|
|
import {scopedObservable} from "../../helpers/angular-rx-utils"; |
|
|
|
|
import {KeepTabService} from "../wp-panels/keep-tab/keep-tab.service"; |
|
|
|
|
angular |
|
|
|
|
.module('openproject.workPackages.directives') |
|
|
|
|
.directive('wpTable', wpTable); |
|
|
|
@ -33,6 +35,7 @@ angular |
|
|
|
|
function wpTable( |
|
|
|
|
WorkPackagesTableService, |
|
|
|
|
WorkPackageService, |
|
|
|
|
keepTab:KeepTabService, |
|
|
|
|
QueryService, |
|
|
|
|
$window, |
|
|
|
|
$rootScope, |
|
|
|
@ -109,6 +112,16 @@ function wpTable( |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
if ($state.includes('work-packages.list.details')) { |
|
|
|
|
scope.desiredSplitViewState = $state.$current.name; |
|
|
|
|
} else { |
|
|
|
|
scope.desiredSplitViewState = 'work-packages.list.details.overview'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
scopedObservable(scope, keepTab.observable).subscribe((tabs:any) => { |
|
|
|
|
scope.desiredSplitViewState = tabs.details; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function applyGrouping() { |
|
|
|
|
if (scope.groupByColumn != scope.workPackagesTableData.groupByColumn) { |
|
|
|
|
scope.groupByColumn = scope.workPackagesTableData.groupByColumn; |
|
|
|
@ -210,7 +223,10 @@ function wpTable( |
|
|
|
|
setRowSelectionState(row, multipleChecked ? true : !currentRowCheckState); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
openWhenInSplitView(row.object); |
|
|
|
|
// Avoid bubbling of elements within the details link
|
|
|
|
|
if ($event.target.parentElement.className.indexOf('wp-table--details-link') === -1) { |
|
|
|
|
openWhenInSplitView(row.object); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|