Merge pull request #180 from oliverguenther/fix/21938-angular_templates

Let templates be cached by ngtemplate-loader
pull/6827/head
Oliver Günther 9 years ago
commit 89b57ede0e
  1. 3
      frontend/app/openproject-costs-app.js
  2. 0
      frontend/app/templates/plugin-costs/work_packages/cost_entry.html
  3. 0
      frontend/app/templates/plugin-costs/work_packages/cost_object.html
  4. 0
      frontend/app/templates/plugin-costs/work_packages/summarized_cost_entries.html
  5. 2
      frontend/app/work_packages/directives/cost-entry-directive.js
  6. 2
      frontend/app/work_packages/directives/cost-object-directive.js
  7. 2
      frontend/app/work_packages/directives/summarized-cost-entries-directive.js

@ -93,6 +93,9 @@ openprojectCostsApp.run(['HookService',
});
}]);
var requireTemplate = require.context('./templates', true, /\.html$/);
requireTemplate.keys().forEach(requireTemplate);
require('./services/cost-type-service');
require('./work_packages/directives/cost-object-directive');
require('./work_packages/directives/summarized-cost-entries-directive');

@ -32,7 +32,7 @@ angular.module('openproject.workPackages.directives')
return {
restrict: 'E',
trasclude: true,
templateUrl: '/assets/work_packages/cost_entry.html',
templateUrl: '/templates/plugin-costs/work_packages/cost_entry.html',
scope: {
workPackage: "=",
costEntry: "="

@ -32,7 +32,7 @@ angular.module('openproject.workPackages.directives')
return {
restrict: 'E',
require: '^workPackageField',
templateUrl: '/assets/work_packages/cost_object.html',
templateUrl: '/templates/plugin-costs/work_packages/cost_object.html',
link: function(scope, element, attributes, fieldController) {
scope.$watch(function() {
return fieldController.state.workPackage;

@ -32,7 +32,7 @@ angular.module('openproject.workPackages.directives')
return {
restrict: 'E',
require: '^workPackageField',
templateUrl: '/assets/work_packages/summarized_cost_entries.html',
templateUrl: '/templates/plugin-costs/work_packages/summarized_cost_entries.html',
link: function(scope, element, attributes, fieldController) {
scope.workPackage = scope.field.resource;
scope.costTypes = scope

Loading…
Cancel
Save