|
|
|
@ -41,11 +41,19 @@ angular.module('openproject.workPackages.controllers') |
|
|
|
|
'WorkPackageLoadingHelper', |
|
|
|
|
'INITIALLY_SELECTED_COLUMNS', |
|
|
|
|
'OPERATORS_AND_LABELS_BY_FILTER_TYPE', |
|
|
|
|
'columnsModal', |
|
|
|
|
'exportModal', |
|
|
|
|
'saveModal', |
|
|
|
|
'settingsModal', |
|
|
|
|
'shareModal', |
|
|
|
|
'sortingModal', |
|
|
|
|
function($scope, $q, $window, $location, |
|
|
|
|
WorkPackagesTableHelper, WorkPackagesTableService, |
|
|
|
|
WorkPackageService, QueryService, PaginationService, |
|
|
|
|
WorkPackageLoadingHelper, INITIALLY_SELECTED_COLUMNS, |
|
|
|
|
OPERATORS_AND_LABELS_BY_FILTER_TYPE) { |
|
|
|
|
OPERATORS_AND_LABELS_BY_FILTER_TYPE, columnsModal, |
|
|
|
|
exportModal, saveModal, settingsModal, shareModal, |
|
|
|
|
sortingModal) { |
|
|
|
|
|
|
|
|
|
$scope.projectTypes = $window.gon.project_types; |
|
|
|
|
$scope.showFiltersOptions = false; |
|
|
|
@ -202,6 +210,30 @@ angular.module('openproject.workPackages.controllers') |
|
|
|
|
return false; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// Modals
|
|
|
|
|
|
|
|
|
|
$scope.showColumnsModal = columnsModal.activate; |
|
|
|
|
$scope.showExportModal = exportModal.activate; |
|
|
|
|
$scope.showSettingsModal = settingsModal.activate; |
|
|
|
|
$scope.showShareModal = shareModal.activate; |
|
|
|
|
|
|
|
|
|
$scope.showSortingModal = function(){ |
|
|
|
|
$scope.$emit('hideAllDropdowns'); |
|
|
|
|
sortingModal.activate(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
$scope.showSaveModal = function(saveAs){ |
|
|
|
|
$scope.$emit('hideAllDropdowns'); |
|
|
|
|
if( saveAs || $scope.query.isNew() ){ |
|
|
|
|
saveModal.activate(); |
|
|
|
|
} else { |
|
|
|
|
QueryService.saveQuery() |
|
|
|
|
.then(function(data){ |
|
|
|
|
$scope.$emit('flashMessage', data.status); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// Go
|
|
|
|
|
|
|
|
|
|
initialSetup(); |
|
|
|
|