add public prefix to html2js conf
This commit is contained in:
parent
1ddf23a848
commit
42e9b7564e
|
@ -227,7 +227,7 @@ module.exports = function(grunt) {
|
|||
},
|
||||
html2js: {
|
||||
options: {
|
||||
base: 'NodeForm',
|
||||
base: 'public',
|
||||
watch: true,
|
||||
module: 'NodeForm.templates',
|
||||
singleModule: true,
|
||||
|
|
|
@ -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':
|
||||
|
|
Loading…
Reference in a new issue