From 62cd9c40fd43b19c4db560d9c7b9578df85e0386 Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Mon, 14 Dec 2015 14:17:37 +0100 Subject: [PATCH] Implement WP list view button directive --- .../work-package-show.controller.js | 10 ---- .../work-packages-list.controller.js | 6 --- .../routes/partials/work-packages.list.html | 15 +----- .../routes/partials/work-packages.show.html | 15 +----- .../wp-list-view-button.directive.html | 14 +++++ .../wp-list-view-button.directive.js | 54 +++++++++++++++++++ .../controllers/work-packages-controller.js | 4 -- 7 files changed, 70 insertions(+), 48 deletions(-) create mode 100644 frontend/app/components/wp-buttons/wp-list-view-button/wp-list-view-button.directive.html create mode 100644 frontend/app/components/wp-buttons/wp-list-view-button/wp-list-view-button.directive.js diff --git a/frontend/app/components/routes/controllers/work-package-show.controller.js b/frontend/app/components/routes/controllers/work-package-show.controller.js index df55adbd9f..b975752972 100644 --- a/frontend/app/components/routes/controllers/work-package-show.controller.js +++ b/frontend/app/components/routes/controllers/work-package-show.controller.js @@ -229,16 +229,6 @@ function WorkPackageShowController($scope, $rootScope, $state, latestTab, workPa }); }; - $scope.closeShowView = function() { - var queryProps = $state.params['query_props']; - - $state.go('work-packages.list', { - projectPath: $scope.projectIdentifier, - workPackageId: $scope.workPackage.props.id, - 'query_props': queryProps - }); - }; - function getFocusAnchorLabel(tab, workPackage) { var tabLabel = I18n.t('js.work_packages.tabs.' + tab), params = { diff --git a/frontend/app/components/routes/controllers/work-packages-list.controller.js b/frontend/app/components/routes/controllers/work-packages-list.controller.js index e0c1e37df0..8a107c6ae0 100644 --- a/frontend/app/components/routes/controllers/work-packages-list.controller.js +++ b/frontend/app/components/routes/controllers/work-packages-list.controller.js @@ -296,12 +296,6 @@ function WorkPackagesListController($scope, $rootScope, $state, $stateParams, $l loadingIndicator.on(promise); }; - $scope.closeDetailsView = function() { - var queryProps = $state.params['query_props']; - - $state.go('work-packages.list', { 'query_props': queryProps}); - }; - $scope.showWorkPackageDetails = function(id, force) { if (force || $state.current.url != "") { var promise = $state.go(latestTab.getStateName(), { diff --git a/frontend/app/components/routes/partials/work-packages.list.html b/frontend/app/components/routes/partials/work-packages.list.html index 365662656a..84521d4a67 100644 --- a/frontend/app/components/routes/partials/work-packages.list.html +++ b/frontend/app/components/routes/partials/work-packages.list.html @@ -29,20 +29,7 @@