(js) Restore user's last Calendar view

Also reviewed the handling of Angular modules dependencies.
This commit is contained in:
Francis Lachapelle
2015-07-29 11:47:01 -04:00
parent 762f305914
commit 7e10cff395
16 changed files with 101 additions and 65 deletions
@@ -40,7 +40,16 @@
return Calendar; // return constructor
}];
/* Factory registration in Angular module */
/**
* @module SOGo.SchedulerUI
* @desc Factory registration of Calendar in Angular module.
*/
try {
angular.module('SOGo.SchedulerUI');
}
catch(e) {
angular.module('SOGo.SchedulerUI', ['SOGo.Common']);
}
angular.module('SOGo.SchedulerUI')
.factory('Calendar', Calendar.$factory);
@@ -122,6 +122,6 @@
}
angular
.module('SOGo.SchedulerUI')
.module('SOGo.SchedulerUI')
.controller('CalendarListController', CalendarListController);
})();
@@ -63,6 +63,12 @@
* @module SOGo.SchedulerUI
* @desc Factory registration of Component in Angular module.
*/
try {
angular.module('SOGo.SchedulerUI');
}
catch(e) {
angular.module('SOGo.SchedulerUI', ['SOGo.Common']);
}
angular.module('SOGo.SchedulerUI')
.factory('Component', Component.$factory);