mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-03 22:22:19 +00:00
(js) Move Settings to a value in Common ng module
Also removed explicit settings and defaults that were imported in various app modules. We now always use the Preferences ng service.
This commit is contained in:
@@ -4,22 +4,9 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
angular.module('SOGo.ContactsUI', []);
|
||||
angular.module('SOGo.MailerUI', []);
|
||||
|
||||
angular.module('SOGo.PreferencesUI', ['ngSanitize', 'ui.router', 'SOGo.Common', 'SOGo.MailerUI', 'SOGo.ContactsUI', 'SOGo.Authentication'])
|
||||
|
||||
.constant('sgSettings', {
|
||||
baseURL: ApplicationBaseURL,
|
||||
activeUser: {
|
||||
login: UserLogin,
|
||||
identification: UserIdentification,
|
||||
language: UserLanguage,
|
||||
folderURL: UserFolderURL,
|
||||
isSuperUser: IsSuperUser
|
||||
}
|
||||
})
|
||||
.config(configure);
|
||||
.config(configure)
|
||||
.run(runBlock);
|
||||
|
||||
/**
|
||||
* @ngInject
|
||||
@@ -84,5 +71,15 @@
|
||||
function statePreferences(Preferences) {
|
||||
return Preferences;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
runBlock.$inject = ['$rootScope'];
|
||||
function runBlock($rootScope) {
|
||||
$rootScope.$on('$routeChangeError', function(event, current, previous, rejection) {
|
||||
console.error(event, current, previous, rejection);
|
||||
});
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user