templateCache everywhere
This commit is contained in:
parent
3694cab7bb
commit
13c0f35f1d
|
@ -1,18 +1,19 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Setting up route
|
// Setting up route
|
||||||
angular.module('forms').config(['$stateProvider',
|
angular.module('forms').config([
|
||||||
|
'$stateProvider', '$templateCache',
|
||||||
|
|
||||||
function($stateProvider) {
|
function($stateProvider, $templateCache) {
|
||||||
// Forms state routing
|
// Forms state routing
|
||||||
$stateProvider.
|
$stateProvider.
|
||||||
state('listForms', {
|
state('listForms', {
|
||||||
url: '/forms',
|
url: '/forms',
|
||||||
templateUrl: 'modules/forms/views/list-forms.client.view.html'
|
template: $templateCache.get('modules/forms/views/list-forms.client.view.html')
|
||||||
}).
|
}).
|
||||||
state('submitForm', {
|
state('submitForm', {
|
||||||
url: '/forms/:formId',
|
url: '/forms/:formId',
|
||||||
templateUrl: 'modules/forms/views/submit-form.client.view.html',
|
template: $templateCache.get('modules/forms/views/submit-form.client.view.html'),
|
||||||
data: {
|
data: {
|
||||||
hideNav: true,
|
hideNav: true,
|
||||||
},
|
},
|
||||||
|
@ -26,7 +27,7 @@ angular.module('forms').config(['$stateProvider',
|
||||||
controllerAs: 'ctrl'
|
controllerAs: 'ctrl'
|
||||||
}).state('viewForm', {
|
}).state('viewForm', {
|
||||||
url: '/forms/:formId/admin',
|
url: '/forms/:formId/admin',
|
||||||
templateUrl: 'modules/forms/views/admin-form.client.view.html',
|
template: $templateCache.get('modules/forms/views/admin-form.client.view.html'),
|
||||||
data: {
|
data: {
|
||||||
permissions: [ 'editForm' ]
|
permissions: [ 'editForm' ]
|
||||||
},
|
},
|
||||||
|
@ -39,16 +40,16 @@ angular.module('forms').config(['$stateProvider',
|
||||||
controller: 'AdminFormController'
|
controller: 'AdminFormController'
|
||||||
}).state('viewForm.configure', {
|
}).state('viewForm.configure', {
|
||||||
url: '/configure',
|
url: '/configure',
|
||||||
templateUrl: 'modules/forms/views/adminTabs/configure.html'
|
template: $templateCache.get('modules/forms/views/adminTabs/configure.html')
|
||||||
}).state('viewForm.design', {
|
}).state('viewForm.design', {
|
||||||
url: '/design',
|
url: '/design',
|
||||||
templateUrl: 'modules/forms/views/adminTabs/design.html'
|
template: $templateCache.get('modules/forms/views/adminTabs/design.html')
|
||||||
}).state('viewForm.analyze', {
|
}).state('viewForm.analyze', {
|
||||||
url: '/analyze',
|
url: '/analyze',
|
||||||
templateUrl: 'modules/forms/views/adminTabs/analyze.html',
|
template: $templateCache.get('modules/forms/views/adminTabs/analyze.html')
|
||||||
}).state('viewForm.create', {
|
}).state('viewForm.create', {
|
||||||
url: '/create',
|
url: '/create',
|
||||||
templateUrl: 'modules/forms/views/adminTabs/create.html'
|
template: $templateCache.get('modules/forms/views/adminTabs/create.html')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Forms controller
|
// Forms controller
|
||||||
angular.module('forms').controller('AdminFormController', ['$rootScope', '$scope', '$stateParams', '$state', 'Forms', 'CurrentForm', '$http', '$uibModal', 'myForm',
|
angular.module('forms').controller('AdminFormController', [
|
||||||
function($rootScope, $scope, $stateParams, $state, Forms, CurrentForm, $http, $uibModal, myForm) {
|
'$rootScope', '$scope', '$stateParams', '$state', 'Forms',
|
||||||
|
'CurrentForm', '$http', '$uibModal', 'myForm',
|
||||||
|
|
||||||
|
function($rootScope, $scope, $stateParams, $state, Forms,
|
||||||
|
CurrentForm, $http, $uibModal, myForm) {
|
||||||
|
|
||||||
$scope = $rootScope;
|
$scope = $rootScope;
|
||||||
$scope.animationsEnabled = true;
|
$scope.animationsEnabled = true;
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('forms').directive('configureFormDirective', ['$rootScope', '$http', 'Upload', 'CurrentForm',
|
angular.module('forms').directive('configureFormDirective', [
|
||||||
function ($rootScope, $http, Upload, CurrentForm) {
|
'$rootScope', '$http', 'Upload', 'CurrentForm', '$templateCache',
|
||||||
|
function ($rootScope, $http, Upload, CurrentForm, $templateCache) {
|
||||||
return {
|
return {
|
||||||
templateUrl: 'modules/forms/views/directiveViews/form/configure-form.client.view.html',
|
template: $templateCache.get('modules/forms/views/directiveViews/form/configure-form.client.view.html'),
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
scope: {
|
scope: {
|
||||||
myform:'=',
|
myform:'=',
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('forms').directive('editFormDirective', ['$rootScope', 'FormFields',
|
angular.module('forms').directive('editFormDirective', [
|
||||||
function ($rootScope, FormFields) {
|
'$rootScope', 'FormFields', '$templateCache',
|
||||||
|
function ($rootScope, FormFields, $templateCache) {
|
||||||
return {
|
return {
|
||||||
templateUrl: 'modules/forms/views/directiveViews/form/edit-form.client.view.html',
|
template: $templateCache.get('modules/forms/views/directiveViews/form/edit-form.client.view.html'),
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
scope: {
|
scope: {
|
||||||
myform:'=',
|
myform:'=',
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('forms').directive('editSubmissionsFormDirective', ['$rootScope', '$http',
|
angular.module('forms').directive('editSubmissionsFormDirective', [
|
||||||
function ($rootScope, $http) {
|
'$rootScope', '$http', '$templateCache',
|
||||||
|
function ($rootScope, $http, $templateCache) {
|
||||||
return {
|
return {
|
||||||
templateUrl: 'modules/forms/views/directiveViews/form/edit-submissions-form.client.view.html',
|
template: $templateCache.get('modules/forms/views/directiveViews/form/edit-submissions-form.client.view.html'),
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
scope: {
|
scope: {
|
||||||
myform:'=',
|
myform:'=',
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Setting up route
|
// Setting up route
|
||||||
angular.module('users').config(['$stateProvider',
|
angular.module('users').config([
|
||||||
function($stateProvider) {
|
'$stateProvider', '$templateCache',
|
||||||
|
function($stateProvider, $templateCache) {
|
||||||
|
|
||||||
var checkLoggedin = function($q, $timeout, $state, User, Auth) {
|
var checkLoggedin = function($q, $timeout, $state, User, Auth) {
|
||||||
var deferred = $q.defer();
|
var deferred = $q.defer();
|
||||||
|
@ -34,64 +35,64 @@ angular.module('users').config(['$stateProvider',
|
||||||
loggedin: checkLoggedin
|
loggedin: checkLoggedin
|
||||||
},
|
},
|
||||||
url: '/settings/profile',
|
url: '/settings/profile',
|
||||||
templateUrl: 'modules/users/views/settings/edit-profile.client.view.html'
|
template: $templateCache.get('modules/users/views/settings/edit-profile.client.view.html')
|
||||||
}).
|
}).
|
||||||
state('password', {
|
state('password', {
|
||||||
resolve: {
|
resolve: {
|
||||||
loggedin: checkLoggedin
|
loggedin: checkLoggedin
|
||||||
},
|
},
|
||||||
url: '/settings/password',
|
url: '/settings/password',
|
||||||
templateUrl: 'modules/users/views/settings/change-password.client.view.html'
|
template: $templateCache.get('modules/users/views/settings/change-password.client.view.html')
|
||||||
}).
|
}).
|
||||||
state('accounts', {
|
state('accounts', {
|
||||||
resolve: {
|
resolve: {
|
||||||
loggedin: checkLoggedin
|
loggedin: checkLoggedin
|
||||||
},
|
},
|
||||||
url: '/settings/accounts',
|
url: '/settings/accounts',
|
||||||
templateUrl: 'modules/users/views/settings/social-accounts.client.view.html'
|
template: $templateCache.get('modules/users/views/settings/social-accounts.client.view.html')
|
||||||
}).
|
}).
|
||||||
|
|
||||||
state('signup', {
|
state('signup', {
|
||||||
url: '/signup',
|
url: '/signup',
|
||||||
templateUrl: 'modules/users/views/authentication/signup.client.view.html'
|
template: $templateCache.get('modules/users/views/authentication/signup.client.view.html')
|
||||||
}).
|
}).
|
||||||
state('signup-success', {
|
state('signup-success', {
|
||||||
url: '/signup-success',
|
url: '/signup-success',
|
||||||
templateUrl: 'modules/users/views/authentication/signup-success.client.view.html'
|
template: $templateCache.get('modules/users/views/authentication/signup-success.client.view.html')
|
||||||
}).
|
}).
|
||||||
state('signin', {
|
state('signin', {
|
||||||
url: '/signin',
|
url: '/signin',
|
||||||
templateUrl: 'modules/users/views/authentication/signin.client.view.html'
|
template: $templateCache.get('modules/users/views/authentication/signin.client.view.html')
|
||||||
}).
|
}).
|
||||||
state('access_denied', {
|
state('access_denied', {
|
||||||
url: '/access_denied',
|
url: '/access_denied',
|
||||||
templateUrl: 'modules/users/views/authentication/access-denied.client.view.html'
|
template: $templateCache.get('modules/users/views/authentication/access-denied.client.view.html')
|
||||||
}).
|
}).
|
||||||
|
|
||||||
state('resendVerifyEmail', {
|
state('resendVerifyEmail', {
|
||||||
url: '/verify',
|
url: '/verify',
|
||||||
templateUrl: 'modules/users/views/verify/resend-verify-email.client.view.html'
|
template: $templateCache.get('modules/users/views/verify/resend-verify-email.client.view.html')
|
||||||
}).
|
}).
|
||||||
state('verify', {
|
state('verify', {
|
||||||
url: '/verify/:token',
|
url: '/verify/:token',
|
||||||
templateUrl: 'modules/users/views/verify/verify-account.client.view.html'
|
template: $templateCache.get('modules/users/views/verify/verify-account.client.view.html')
|
||||||
}).
|
}).
|
||||||
|
|
||||||
state('forgot', {
|
state('forgot', {
|
||||||
url: '/password/forgot',
|
url: '/password/forgot',
|
||||||
templateUrl: 'modules/users/views/password/forgot-password.client.view.html'
|
template: $templateCache.get('modules/users/views/password/forgot-password.client.view.html')
|
||||||
}).
|
}).
|
||||||
state('reset-invalid', {
|
state('reset-invalid', {
|
||||||
url: '/password/reset/invalid',
|
url: '/password/reset/invalid',
|
||||||
templateUrl: 'modules/users/views/password/reset-password-invalid.client.view.html'
|
template: $templateCache.get('modules/users/views/password/reset-password-invalid.client.view.html')
|
||||||
}).
|
}).
|
||||||
state('reset-success', {
|
state('reset-success', {
|
||||||
url: '/password/reset/success',
|
url: '/password/reset/success',
|
||||||
templateUrl: 'modules/users/views/password/reset-password-success.client.view.html'
|
template: $templateCache.get('modules/users/views/password/reset-password-success.client.view.html')
|
||||||
}).
|
}).
|
||||||
state('reset', {
|
state('reset', {
|
||||||
url: '/password/reset/:token',
|
url: '/password/reset/:token',
|
||||||
templateUrl: 'modules/users/views/password/reset-password.client.view.html'
|
template: $templateCache.get('modules/users/views/password/reset-password.client.view.html')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
]);
|
]);
|
Loading…
Reference in a new issue