From 6363bcb89ee04c1bd8c964ddcb4f659fafdfeffe Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Mon, 23 Nov 2015 17:24:06 +0100 Subject: [PATCH] Move WP table service to components --- .../work-packages/services/wp-table.service.js} | 12 ++++++++---- frontend/app/work_packages/services/index.js | 6 ------ 2 files changed, 8 insertions(+), 10 deletions(-) rename frontend/app/{work_packages/services/work-packages-table-service.js => components/work-packages/services/wp-table.service.js} (95%) diff --git a/frontend/app/work_packages/services/work-packages-table-service.js b/frontend/app/components/work-packages/services/wp-table.service.js similarity index 95% rename from frontend/app/work_packages/services/work-packages-table-service.js rename to frontend/app/components/work-packages/services/wp-table.service.js index 632954ea60..eecddcae7e 100644 --- a/frontend/app/work_packages/services/work-packages-table-service.js +++ b/frontend/app/components/work-packages/services/wp-table.service.js @@ -1,4 +1,4 @@ -//-- copyright +// -- copyright // OpenProject is a project management system. // Copyright (C) 2012-2015 the OpenProject Foundation (OPF) // @@ -24,9 +24,13 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // See doc/COPYRIGHT.rdoc for more details. -//++ +// ++ -module.exports = function($filter, QueryService, WorkPackagesTableHelper) { +angular + .module('openproject.workPackages.services') + .factory('WorkPackagesTableService', WorkPackagesTableService); + +function WorkPackagesTableService($filter, QueryService, WorkPackagesTableHelper) { var workPackagesTableData = { allRowsChecked: false, showFiltersOptions: false @@ -173,4 +177,4 @@ module.exports = function($filter, QueryService, WorkPackagesTableHelper) { }; return WorkPackagesTableService; -}; +} diff --git a/frontend/app/work_packages/services/index.js b/frontend/app/work_packages/services/index.js index eb41757f53..e5fbd85fbf 100644 --- a/frontend/app/work_packages/services/index.js +++ b/frontend/app/work_packages/services/index.js @@ -27,12 +27,6 @@ //++ angular.module('openproject.workPackages.services') - .service('WorkPackagesTableService', [ - '$filter', - 'QueryService', - 'WorkPackagesTableHelper', - require('./work-packages-table-service') - ]) .constant('WORK_PACKAGE_ATTRIBUTES', [ { groupName: 'details',