diff --git a/accountant/frontend/static/js/accounts.js b/accountant/frontend/static/js/accounts.js index 99c5bf1..6954dce 100644 --- a/accountant/frontend/static/js/accounts.js +++ b/accountant/frontend/static/js/accounts.js @@ -17,7 +17,17 @@ // vim: set tw=80 ts=2 sw=2 sts=2: 'use strict'; -angular.module('accountant') +angular.module('accountant.accounts', [ + 'ngResource', + 'ui-notification', + 'xeditable', + 'ngBootbox' +]) + +.config(['$resourceProvider', function($resourceProvider) { + // Keep trailing slashes to avoid redirect by flask.. + $resourceProvider.defaults.stripTrailingSlashes = false; +}]) .factory('Account', ['$resource', function($resource) { var Account = $resource( diff --git a/accountant/frontend/static/js/app.js b/accountant/frontend/static/js/app.js index 6a96d17..e50e671 100644 --- a/accountant/frontend/static/js/app.js +++ b/accountant/frontend/static/js/app.js @@ -18,14 +18,13 @@ 'use strict'; angular.module('accountant', [ - 'ngResource', 'ngRoute', - 'mgcrea.ngStrap', - 'highcharts-ng', + 'accountant.accounts', + 'accountant.operations', + 'accountant.scheduler', + 'ngRoute', + 'ngBootbox', 'http-auth-interceptor', - 'ui-notification', - 'Storage.Service', - 'xeditable', - 'ngBootbox' + 'Storage.Service' ]) .factory('sessionInjector', ['$storage', function($storage) { @@ -89,11 +88,6 @@ angular.module('accountant', [ $storageProvider.setEnabledStorageEngines(['local', 'session']); }]) -.config(['$resourceProvider', function($resourceProvider) { - // Keep trailing slashes to avoid redirect by flask.. - $resourceProvider.defaults.stripTrailingSlashes = false; -}]) - .run(function(editableOptions) { editableOptions.theme = 'bs3'; // bootstrap3 theme. Can be also 'bs2', 'default' }) diff --git a/accountant/frontend/static/js/operations.js b/accountant/frontend/static/js/operations.js index d0f23f9..72b2f4b 100644 --- a/accountant/frontend/static/js/operations.js +++ b/accountant/frontend/static/js/operations.js @@ -17,7 +17,20 @@ // vim: set tw=80 ts=2 sw=2 sts=2: 'use strict'; -angular.module('accountant') +angular.module('accountant.operations', [ + 'accountant.accounts', + 'ngRoute', + 'ngResource', + 'ngBootbox', + 'ui-notification', + 'mgcrea.ngStrap', + 'highcharts-ng', +]) + +.config(['$resourceProvider', function($resourceProvider) { + // Keep trailing slashes to avoid redirect by flask.. + $resourceProvider.defaults.stripTrailingSlashes = false; +}]) .factory('Operation', [ '$resource', function($resource) { return $resource( diff --git a/accountant/frontend/static/js/scheduler.js b/accountant/frontend/static/js/scheduler.js index 642a84a..510dd92 100644 --- a/accountant/frontend/static/js/scheduler.js +++ b/accountant/frontend/static/js/scheduler.js @@ -17,7 +17,17 @@ // vim: set tw=80 ts=2 sw=2 sts=2: 'use strict'; -angular.module('accountant') +angular.module('accountant.scheduler', [ + 'ngRoute', + 'ngBootbox', + 'ui-notification', + 'mgcrea.ngStrap' +]) + +.config(['$resourceProvider', function($resourceProvider) { + // Keep trailing slashes to avoid redirect by flask.. + $resourceProvider.defaults.stripTrailingSlashes = false; +}]) .factory('ScheduledOperation', ['$resource', function($resource) { return $resource(