(js) Improve condition in CalendarListController

This commit is contained in:
Francis Lachapelle 2015-11-26 12:04:52 -05:00
parent f161cbe56b
commit bb88643568

View file

@ -87,16 +87,15 @@
}
function openEvent($event, event) {
if (event.viewable)
openComponent($event, event, 'appointment');
}
function openTask($event, task) {
if (task.viewable)
openComponent($event, task, 'task');
}
function openComponent($event, component, type) {
if (component.viewable) {
// UI/Templates/SchedulerUI/UIxAppointmentViewTemplate.wox or
// UI/Templates/SchedulerUI/UIxTaskViewTemplate.wox
var templateUrl = 'UIx' + type.capitalize() + 'ViewTemplate';
@ -113,6 +112,7 @@
}
});
}
}
function newComponent($event, baseComponent) {
var type = 'appointment', component;