7 .module("nero.app", ["ngAnimate", "ngSanitize", "ui.bootstrap", "pascalprecht.translate",
8 "angularMoment", "moment-picker", "toastr", "angular-promise-cache",
9 "angular-ui-confirm", "ngCkeditor", "ui.bootstrap.contextMenu",
10 "angularTreeview", "angularjs-dropdown-multiselect", "infinite-scroll",
11 "ngImgCrop", "cgBusy", "angular-carousel-3d"])
14 .config(neroConfiguration)
15 .constant("role_constants", {
26 neroConfiguration.$inject = ["$translateProvider", "toastrConfig", "momentPickerProvider"];
29 Modules configuration : set the locale variable for angular-moment and translate
31 function neroConfiguration($translateProvider, toastrConfig, momentPickerProvider) {
32 var language = Liferay.ThemeDisplay.getLanguageId();
34 //Translate module configuration
35 $translateProvider.useStaticFilesLoader({
37 prefix: Global.Theme.getURLPortal() + Liferay.ThemeDisplay.getPathJavaScript() + "/angularjs/locale/app-lang-",
40 prefix: contextPath + "/js/locale/app-lang-",
44 $translateProvider.registerAvailableLanguageKeys(['en', 'fr'], {
55 $translateProvider.preferredLanguage(language);
56 $translateProvider.useSanitizeValueStrategy("escape");
57 //$translate.use(); to switch language at runtime
59 //Moment module configuration
60 moment.locale(language);
62 angular.extend(toastrConfig, {
64 containerId: 'toast-container',
67 positionClass: 'toast-top-right',
68 preventDuplicates: false,
69 preventOpenDuplicates: false,
76 // Date-picker configuration
77 momentPickerProvider.options({
78 /* Picker properties */
85 /* Extra: Views properties */
92 hoursFormat: 'HH:[00]',
93 minutesFormat: moment.localeData().longDateFormat('LT').replace(/[aA]/, ''),