Move details route files to components directory

pull/3777/head
Alex Dik 9 years ago
parent 32c7ba00de
commit 06b38547f6
  1. 38
      frontend/app/components/routes/controllers/work-package-details.controller.js
  2. 0
      frontend/app/components/routes/templates/work-package-details.route.html
  3. 2
      frontend/app/routing.js
  4. 23
      frontend/app/work_packages/controllers/index.js

@ -1,4 +1,4 @@
//-- copyright
// -- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
//
@ -24,29 +24,17 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// See doc/COPYRIGHT.rdoc for more details.
//++
module.exports = function($scope,
$state,
latestTab,
workPackage,
I18n,
RELATION_TYPES,
RELATION_IDENTIFIERS,
$q,
$rootScope,
$filter,
WorkPackagesHelper,
PathHelper,
UsersHelper,
ConfigurationService,
WorkPackageService,
ActivityService,
CommonRelationsHandler,
ChildrenRelationsHandler,
ParentRelationsHandler,
NotificationsService
) {
// ++
angular
.module('openproject.workPackages.controllers')
.controller('WorkPackageDetailsController', WorkPackageDetailsController);
function WorkPackageDetailsController($scope, $state, latestTab, workPackage, I18n, RELATION_TYPES,
RELATION_IDENTIFIERS, $q, $rootScope, $filter, WorkPackagesHelper, PathHelper, UsersHelper,
ConfigurationService, WorkPackageService, ActivityService, CommonRelationsHandler,
ChildrenRelationsHandler, ParentRelationsHandler, NotificationsService) {
$scope.$on('$stateChangeSuccess', function(event, toState){
latestTab.registerState(toState.name);
});
@ -224,4 +212,4 @@ module.exports = function($scope,
$state.current.url.replace(/\//, ''),
$scope.workPackage
);
};
}

@ -162,7 +162,7 @@ angular.module('openproject')
})
.state('work-packages.list.details', {
url: '/details/{workPackageId:[0-9]+}',
templateUrl: '/templates/work_packages.list.details.html',
templateUrl: '/components/routes/templates/work-package-details.route.html',
controller: 'WorkPackageDetailsController',
reloadOnSearch: false,
resolve: {

@ -72,29 +72,6 @@ angular.module('openproject.workPackages.controllers')
precedes: 'precedes',
follows: 'follows'
})
.controller('WorkPackageDetailsController', [
'$scope',
'$state',
'latestTab',
'workPackage',
'I18n',
'RELATION_TYPES',
'RELATION_IDENTIFIERS',
'$q',
'$rootScope',
'$filter',
'WorkPackagesHelper',
'PathHelper',
'UsersHelper',
'ConfigurationService',
'WorkPackageService',
'ActivityService',
'CommonRelationsHandler',
'ChildrenRelationsHandler',
'ParentRelationsHandler',
'NotificationsService',
require('./work-package-details-controller')
])
.controller('WorkPackageShowController', [
'$scope',
'$rootScope',

Loading…
Cancel
Save