added stuff

This commit is contained in:
David Baldwynn 2015-11-03 12:22:50 -08:00
parent 65ce444d00
commit 05131f36a8
3 changed files with 28 additions and 29 deletions

View file

@ -400,11 +400,11 @@ angular.module('forms').run(['Menus',
return 0; return 0;
}; };
}).config(['$provide', function ($provide){ }).config(['$provide', function ($provide){
$provide.decorator('accordionDirective', ["$delegate", function($delegate) { $provide.decorator('accordionDirective', function($delegate) {
var directive = $delegate[0]; var directive = $delegate[0];
directive.replace = true; directive.replace = true;
return $delegate; return $delegate;
}]); });
}]); }]);
'use strict'; 'use strict';
@ -429,9 +429,9 @@ angular.module('forms').config(['$stateProvider',
}, },
resolve: { resolve: {
Forms: 'Forms', Forms: 'Forms',
myForm: ["Forms", "$stateParams", function (Forms, $stateParams) { myForm: function (Forms, $stateParams) {
return Forms.get({formId: $stateParams.formId}).$promise; return Forms.get({formId: $stateParams.formId}).$promise;
}], },
}, },
controller: 'SubmitFormController' controller: 'SubmitFormController'
}). }).
@ -443,9 +443,9 @@ angular.module('forms').config(['$stateProvider',
}, },
resolve: { resolve: {
Forms: 'Forms', Forms: 'Forms',
myForm: ["Forms", "$stateParams", function (Forms, $stateParams) { myForm: function (Forms, $stateParams) {
return Forms.get({formId: $stateParams.formId}).$promise; return Forms.get({formId: $stateParams.formId}).$promise;
}], },
}, },
controller: 'AdminFormController' controller: 'AdminFormController'
}); });
@ -824,7 +824,7 @@ angular.module('forms').directive('configureFormDirective', ['$rootScope', '$htt
pdfFields:'@', pdfFields:'@',
formFields:'@' formFields:'@'
}, },
controller: ["$scope", function($scope){ controller: function($scope){
console.log($scope.myform); console.log($scope.myform);
if( CurrentForm.getForm().plugins){ if( CurrentForm.getForm().plugins){
if(CurrentForm.getForm().plugins.oscarhost.baseUrl) $scope.oscarhostAPI = true; if(CurrentForm.getForm().plugins.oscarhost.baseUrl) $scope.oscarhostAPI = true;
@ -886,7 +886,7 @@ angular.module('forms').directive('configureFormDirective', ['$rootScope', '$htt
$scope.log = 'file ' + data.originalname + ' uploaded as '+ data.name +'. JSON: ' + JSON.stringify(data) + '\n' + $scope.log; $scope.log = 'file ' + data.originalname + ' uploaded as '+ data.name +'. JSON: ' + JSON.stringify(data) + '\n' + $scope.log;
$scope.myform.pdf = angular.fromJson(angular.toJson(data)); $scope.myform.pdf = angular.fromJson(angular.toJson(data));
console.log($scope.myform.pdf); // console.log($scope.myform.pdf);
$scope.pdfLoading = false; $scope.pdfLoading = false;
@ -902,7 +902,7 @@ angular.module('forms').directive('configureFormDirective', ['$rootScope', '$htt
} }
}; };
}] }
}; };
} }
]); ]);
@ -916,7 +916,7 @@ angular.module('forms').directive('editFormDirective', ['$rootScope', '$q', '$ht
scope: { scope: {
myform:'=', myform:'=',
}, },
controller: ["$scope", function($scope){ controller: function($scope){
var field_ids = _($scope.myform.form_fields).pluck('_id'); var field_ids = _($scope.myform.form_fields).pluck('_id');
for(var i=0; i<field_ids.length; i++){ for(var i=0; i<field_ids.length; i++){
$scope.myform.plugins.oscarhost.settings.fieldMap[field_ids[i]] = null; $scope.myform.plugins.oscarhost.settings.fieldMap[field_ids[i]] = null;
@ -1146,7 +1146,7 @@ angular.module('forms').directive('editFormDirective', ['$rootScope', '$q', '$ht
} }
}; };
}], },
}; };
} }
@ -1162,7 +1162,7 @@ angular.module('forms').directive('editSubmissionsFormDirective', ['$rootScope',
myform:'=', myform:'=',
user:'=' user:'='
}, },
controller: ["$scope", function($scope){ controller: function($scope){
$scope.table = { $scope.table = {
masterChecker: false, masterChecker: false,
rows: [] rows: []
@ -1263,13 +1263,13 @@ angular.module('forms').directive('editSubmissionsFormDirective', ['$rootScope',
saveAs(blob, $scope.myform.title+'_sumbissions_export_'+Date.now()+'.'+type); saveAs(blob, $scope.myform.title+'_sumbissions_export_'+Date.now()+'.'+type);
}; };
}] }
}; };
} }
]); ]);
'use strict'; 'use strict';
angular.module('forms').directive('fieldIconDirective', ["$http", "$compile", function($http, $compile) { angular.module('forms').directive('fieldIconDirective', function($http, $compile) {
return { return {
template: '<i class="{{typeIcon}}"></i>', template: '<i class="{{typeIcon}}"></i>',
@ -1277,7 +1277,7 @@ angular.module('forms').directive('fieldIconDirective', ["$http", "$compile", fu
scope: { scope: {
typeName: '@' typeName: '@'
}, },
controller: ["$scope", function($scope){ controller: function($scope){
var iconTypeMap = { var iconTypeMap = {
'textfield': 'fa fa-pencil-square-o', 'textfield': 'fa fa-pencil-square-o',
'dropdown': 'fa fa-th-list', 'dropdown': 'fa fa-th-list',
@ -1297,10 +1297,10 @@ angular.module('forms').directive('fieldIconDirective', ["$http", "$compile", fu
'number': 'fa fa-slack' 'number': 'fa fa-slack'
}; };
$scope.typeIcon = iconTypeMap[$scope.typeName]; $scope.typeIcon = iconTypeMap[$scope.typeName];
}], },
}; };
}]); });
'use strict'; 'use strict';
// coffeescript's for in loop // coffeescript's for in loop
@ -1378,7 +1378,7 @@ angular.module('forms').directive('fieldDirective', ['$templateCache', '$http',
}]); }]);
'use strict'; 'use strict';
angular.module('forms').directive('onFinishRender', ["$rootScope", "$timeout", function ($rootScope, $timeout) { angular.module('forms').directive('onFinishRender', function ($rootScope, $timeout) {
return { return {
restrict: 'A', restrict: 'A',
link: function (scope, element, attrs) { link: function (scope, element, attrs) {
@ -1408,7 +1408,7 @@ angular.module('forms').directive('onFinishRender', ["$rootScope", "$timeout", f
} }
} }
}; };
}]); });
'use strict'; 'use strict';
@ -1420,7 +1420,7 @@ angular.module('forms').directive('submitFormDirective', ['$http', '$timeout', '
scope: { scope: {
myform:'=' myform:'='
}, },
controller: ["$scope", function($scope){ controller: function($scope){
angular.element(document).ready(function() { angular.element(document).ready(function() {
$scope.error = ''; $scope.error = '';
$scope.selected = null; $scope.selected = null;
@ -1476,7 +1476,7 @@ angular.module('forms').directive('submitFormDirective', ['$http', '$timeout', '
}; };
}); });
}] }
}; };
} }
]); ]);
@ -1672,7 +1672,7 @@ angular.module('forms').service('TimeCounter', [
// Config HTTP Error Handling // Config HTTP Error Handling
angular.module('users').config(['$httpProvider', angular.module('users').config(['$httpProvider',
function($httpProvider) { function($httpProvider) {
$httpProvider.interceptors.push(["$q", "$location", function($q, $location) { $httpProvider.interceptors.push(function($q, $location) {
return { return {
responseError: function(response) { responseError: function(response) {
// console.log($location.path()); // console.log($location.path());
@ -1692,7 +1692,7 @@ angular.module('users').config(['$httpProvider',
return $q.reject(response); return $q.reject(response);
} }
}; };
}]); });
}]); }]);
'use strict'; 'use strict';
@ -1722,7 +1722,6 @@ angular.module('users').config(['$stateProvider',
return deferred.promise; return deferred.promise;
}; };
checkLoggedin.$inject = ["$q", "$timeout", "$state", "User", "Auth"];
// Users state routing // Users state routing
$stateProvider. $stateProvider.
@ -2074,7 +2073,7 @@ angular.module('users').factory('Auth', ['$window',
'use strict'; 'use strict';
angular.module('users').service('Authorizer', ["APP_PERMISSIONS", "USER_ROLES", function(APP_PERMISSIONS, USER_ROLES) { angular.module('users').service('Authorizer', function(APP_PERMISSIONS, USER_ROLES) {
return function(user) { return function(user) {
return { return {
canAccess: function(permissions) { canAccess: function(permissions) {
@ -2105,7 +2104,7 @@ angular.module('users').service('Authorizer', ["APP_PERMISSIONS", "USER_ROLES",
} }
}; };
}; };
}]); });
'use strict'; 'use strict';
angular.module('users').factory('User', ['$window', '$q', '$timeout', '$http', '$state', angular.module('users').factory('User', ['$window', '$q', '$timeout', '$http', '$state',

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long