mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-25 20:04:18 +00:00
(js) New file structure for Angular modules
JavaScript files are now merged by the 'js' Grunt task.
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* JavaScript for SOGoPreferences */
|
||||
|
||||
(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);
|
||||
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
configure.$inject = ['$stateProvider', '$urlRouterProvider'];
|
||||
function configure($stateProvider, $urlRouterProvider) {
|
||||
$stateProvider
|
||||
.state('preferences', {
|
||||
abstract: true,
|
||||
views: {
|
||||
preferences: {
|
||||
templateUrl: 'preferences.html',
|
||||
controller: 'PreferencesController',
|
||||
controllerAs: 'app'
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
statePreferences: statePreferences
|
||||
}
|
||||
})
|
||||
.state('preferences.general', {
|
||||
url: '/general',
|
||||
views: {
|
||||
module: {
|
||||
templateUrl: 'generalPreferences.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('preferences.calendars', {
|
||||
url: '/calendars',
|
||||
views: {
|
||||
module: {
|
||||
templateUrl: 'calendarsPreferences.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('preferences.addressbooks', {
|
||||
url: '/addressbooks',
|
||||
views: {
|
||||
module: {
|
||||
templateUrl: 'addressbooksPreferences.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('preferences.mailer', {
|
||||
url: '/mailer',
|
||||
views: {
|
||||
module: {
|
||||
templateUrl: 'mailerPreferences.html'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// if none of the above states are matched, use this as the fallback
|
||||
$urlRouterProvider.otherwise('/general');
|
||||
}
|
||||
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
statePreferences.$inject = ['Preferences'];
|
||||
function statePreferences(Preferences) {
|
||||
return new Preferences();
|
||||
}
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user