|
onPopupOpen(args)
{
let data =
args.data;
if (
args.type ===
'QuickInfo' ||
args.type ===
'Editor' ||
args.type ===
'RecurrenceAlert' ||
args.type ===
'DeleteAlert'
) {
let target =
args.type
=== 'RecurrenceAlert' || args.type === 'DeleteAlert'
?
args.element[0]
:
args.target;
if (
!isNullOrUndefined(target) &&
target.classList.contains('e-work-cells')
) {
if (
target.classList.contains('e-read-only-cells')
||
!this.scheduleObj.isSlotAvailable(data)
) {
args.cancel = true;
var res = this.ownerData;
var rooms = '';
for (var i = 0; i < res.length;
i++) {
data.RoomId = res[i].id;
if
(!this.scheduleObj.isSlotAvailable(data)) {
rooms = rooms + ' ' + res[i].text;
}
}
alert(rooms + ' were already booked
in this selected time slots');
}
} else if (
!isNullOrUndefined(target) &&
target.classList.contains('e-appointment') &&
this.isReadOnly(data.EndTime)
) {
args.cancel
= true;
}
}
}
|