diff --git a/gruntfile.js b/gruntfile.js index af7a331f..7775494f 100755 --- a/gruntfile.js +++ b/gruntfile.js @@ -227,7 +227,7 @@ module.exports = function(grunt) { }, html2js: { options: { - base: 'NodeForm', + base: 'public', watch: true, module: 'NodeForm.templates', singleModule: true, diff --git a/public/modules/forms/directives/field.client.directive.js b/public/modules/forms/directives/field.client.directive.js index 1e032fa8..84ae7e58 100644 --- a/public/modules/forms/directives/field.client.directive.js +++ b/public/modules/forms/directives/field.client.directive.js @@ -10,7 +10,7 @@ var __indexOf = [].indexOf || function(item) { angular.module('forms').directive('fieldDirective', ['$http', '$compile', '$rootScope', '$templateCache', function($http, $compile, $rootScope, $templateCache) { - + var getTemplateUrl = function(fieldType) { var type = fieldType; var templateUrl = 'modules/forms/views/directiveViews/field/'; @@ -33,7 +33,7 @@ angular.module('forms').directive('fieldDirective', ['$http', '$compile', '$root templateUrl = templateUrl+type+'.html'; } - return $templateCache.get('../public/'+templateUrl); + return $templateCache.get(templateUrl); }; return { @@ -47,20 +47,20 @@ angular.module('forms').directive('fieldDirective', ['$http', '$compile', '$root }, link: function(scope, element) { scope.setActiveField = $rootScope.setActiveField; - + //Set format only if field is a date if(scope.field.fieldType === 'date'){ scope.dateOptions = { changeYear: true, changeMonth: true, altFormat: 'mm/dd/yyyy', - yearRange: '1900:-0', + yearRange: '1900:-0', defaultDate: 0, }; } - + var fieldType = scope.field.fieldType; - + if(scope.field.fieldType === 'number' || scope.field.fieldType === 'textfield' || scope.field.fieldType === 'email' || scope.field.fieldType === 'link'){ switch(scope.field.fieldType){ case 'textfield':