From 7dadd3499782e4744586c4d17a4b15f76e0bda58 Mon Sep 17 00:00:00 2001 From: Tzu-Mainn Chen Date: Thu, 3 Apr 2014 04:35:11 +0200 Subject: [PATCH] Change templateUrl to absolute path Having templateUrl be a relative path causes problems if the dashboard is deployed underneath a different root. Change-Id: Iba12be83224df9b2d9fe568cc3830096fdfd82d5 --- .../infrastructure/js/angular/horizon.number_picker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tuskar_ui/infrastructure/static/infrastructure/js/angular/horizon.number_picker.js b/tuskar_ui/infrastructure/static/infrastructure/js/angular/horizon.number_picker.js index 0af46a947..a94f1486c 100644 --- a/tuskar_ui/infrastructure/static/infrastructure/js/angular/horizon.number_picker.js +++ b/tuskar_ui/infrastructure/static/infrastructure/js/angular/horizon.number_picker.js @@ -1,9 +1,9 @@ -angular.module('hz').directive('hrNumberPicker', function() { +angular.module('hz').directive('hrNumberPicker', ['hzConfig', function(hzConfig) { return { restrict: 'A', replace: true, scope: { initial_value: '=value' }, - templateUrl: '../../static/infrastructure/angular_templates/numberpicker.html', + templateUrl: hzConfig.static_url + 'infrastructure/angular_templates/numberpicker.html', link: function(scope, element, attrs) { input = element.find('input').first(); angular.forEach(element[0].attributes, function(attribute) { @@ -33,4 +33,4 @@ angular.module('hz').directive('hrNumberPicker', function() { }; } }; -}); +}]);