(js) Improve calendar lists controller
- preload both lists (events & tasks) - don't reload list when switching tabpull/91/head
parent
35ff82710a
commit
cc7eeca2c4
|
@ -16,13 +16,15 @@
|
|||
vm.newComponent = newComponent;
|
||||
// TODO: should reflect last state userSettings -> Calendar -> SelectedList
|
||||
vm.selectedList = 0;
|
||||
vm.selectComponentType('tasks');
|
||||
vm.selectComponentType('events');
|
||||
|
||||
// Switch between components tabs
|
||||
function selectComponentType(type, options) {
|
||||
if (options && options.reload || vm.componentType != type) {
|
||||
// TODO: save user settings (Calendar.SelectedList)
|
||||
Component.$filter(type);
|
||||
if (angular.isUndefined(Component['$' + type]))
|
||||
Component.$filter(type);
|
||||
vm.componentType = type;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue