(js) Improve condition in CalendarListController
This commit is contained in:
parent
f161cbe56b
commit
bb88643568
|
@ -87,16 +87,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function openEvent($event, event) {
|
function openEvent($event, event) {
|
||||||
if (event.viewable)
|
|
||||||
openComponent($event, event, 'appointment');
|
openComponent($event, event, 'appointment');
|
||||||
}
|
}
|
||||||
|
|
||||||
function openTask($event, task) {
|
function openTask($event, task) {
|
||||||
if (task.viewable)
|
|
||||||
openComponent($event, task, 'task');
|
openComponent($event, task, 'task');
|
||||||
}
|
}
|
||||||
|
|
||||||
function openComponent($event, component, type) {
|
function openComponent($event, component, type) {
|
||||||
|
if (component.viewable) {
|
||||||
// UI/Templates/SchedulerUI/UIxAppointmentViewTemplate.wox or
|
// UI/Templates/SchedulerUI/UIxAppointmentViewTemplate.wox or
|
||||||
// UI/Templates/SchedulerUI/UIxTaskViewTemplate.wox
|
// UI/Templates/SchedulerUI/UIxTaskViewTemplate.wox
|
||||||
var templateUrl = 'UIx' + type.capitalize() + 'ViewTemplate';
|
var templateUrl = 'UIx' + type.capitalize() + 'ViewTemplate';
|
||||||
|
@ -113,6 +112,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function newComponent($event, baseComponent) {
|
function newComponent($event, baseComponent) {
|
||||||
var type = 'appointment', component;
|
var type = 'appointment', component;
|
||||||
|
|
Loading…
Reference in a new issue