Refactor some angular module dependencies, add services module

pull/1040/head
Till Breuer 11 years ago
parent 6f8026fdea
commit 461789191a
  1. 2
      app/assets/javascripts/angular/directives/components/work-package-column-directive.js
  2. 2
      app/assets/javascripts/angular/helpers/components/custom-field-helper.js
  3. 2
      app/assets/javascripts/angular/helpers/components/path-helper.js
  4. 2
      app/assets/javascripts/angular/helpers/components/work-packages-helper.js
  5. 11
      app/assets/javascripts/angular/openproject-app.js

@ -1,5 +1,5 @@
// TODO move to UI components
angular.module('openproject.uiComponents')
angular.module('openproject.workPackages.directives')
.directive('workPackageColumn', ['PathHelper', 'WorkPackagesHelper', function(PathHelper, WorkPackagesHelper){
return {

@ -1,4 +1,4 @@
angular.module('openproject.uiComponents')
angular.module('openproject.helpers')
.constant('CUSTOM_FIELD_PREFIX', 'cf_')
.service('CustomFieldHelper', ['CUSTOM_FIELD_PREFIX', 'I18n', function(CUSTOM_FIELD_PREFIX, I18n) {

@ -1,5 +1,5 @@
// TODO forward rails routes
angular.module('openproject.uiComponents')
angular.module('openproject.helpers')
.service('PathHelper', [function() {
PathHelper = {

@ -1,4 +1,4 @@
angular.module('openproject.uiComponents')
angular.module('openproject.workPackages.helpers')
.factory('WorkPackagesHelper', ['dateFilter', function(dateFilter) {
var WorkPackagesHelper = {

@ -1,21 +1,22 @@
// global
angular.module('openproject.services', ['openproject.uiComponents']);
angular.module('openproject.helpers', ['openproject.services']);
angular.module('openproject.models', []);
// timelines
angular.module('openproject.timelines', ['openproject.timelines.controllers', 'openproject.timelines.directives', 'openproject.uiComponents']);
angular.module('openproject.timelines.models', []);
angular.module('openproject.timelines.models', ['openproject.helpers']);
angular.module('openproject.timelines.helpers', []);
angular.module('openproject.timelines.controllers', ['openproject.timelines.models']);
angular.module('openproject.timelines.services', ['openproject.timelines.models', 'openproject.timelines.helpers']);
angular.module('openproject.timelines.directives', ['openproject.timelines.models', 'openproject.timelines.services', 'openproject.uiComponents']);
angular.module('openproject.timelines.directives', ['openproject.timelines.models', 'openproject.timelines.services', 'openproject.uiComponents', 'openproject.helpers']);
// work packages
angular.module('openproject.workPackages', ['openproject.workPackages.controllers', 'openproject.workPackages.filters', 'openproject.workPackages.directives']);
angular.module('openproject.workPackages.helpers', ['openproject.uiComponents']);
angular.module('openproject.workPackages', ['openproject.workPackages.controllers', 'openproject.workPackages.filters', 'openproject.workPackages.directives', 'openproject.uiComponents']);
angular.module('openproject.workPackages.helpers', ['openproject.helpers']);
angular.module('openproject.workPackages.filters', ['openproject.workPackages.helpers']);
angular.module('openproject.workPackages.controllers', ['openproject.models', 'openproject.workPackages.helpers', 'openproject.services']);
angular.module('openproject.workPackages.directives', ['openproject.uiComponents', 'openproject.services']);
angular.module('openproject.workPackages.directives', ['openproject.helpers', 'openproject.workPackages.helpers', 'openproject.services']);
// main app
var openprojectApp = angular.module('openproject', ['ui.select2', 'ui.date', 'openproject.uiComponents', 'openproject.timelines', 'openproject.workPackages', 'ngAnimate']);

Loading…
Cancel
Save