We have implemented this technique and it worked wonderfully until we upgraded to version 15.2. now it seems the onClick event is not firing.
function OnAppointmentClick(args) {
//console.log("OnAppointmentClick");
$("#userCalendar").ejSchedule({
tooltipSettings: { enable: false }
});
if ($(".customfields").length == 0) {
// create the new custom field
var customData = $('\
<form id="appointmentForm" method="post" class="customfields"> \
<tr> \
<td> \
<span class="dateValue" style="font-size: 13px;"/> \
<strong><span class="statusValue pull-right" style="font-size: 11px;"></span></strong><br/> \
<strong><span class="typeValue" /></strong><br/> \
<span class="locationValue text-active"/><br/> \
<span class="cmValue text-caremanager"/><br/> \
<span class="descValue text-muted"/><br/> \
</td> \
</tr> \
<tr> \
<td> \
<button id="appointment-reschedule" class="btn btn-primary btn-sm"><i class="fa fa-calendar-check-o"></i> ReSchedule</button> \
<button id="appointment-edit" class="btn btn-primary btn-sm"><i class="fa fa-edit"></i> View Details</button> \
<button id="appointment-complete" class="btn btn-primary btn-sm"><i class="fa fa-save"></i> Complete</button> \
</td> \
</tr> \
</form>');
$(".e-quicksubject").parent().parent().after(customData); // here we are adding dates after patient name
}
//$(".e-quickbottomcontainer").find(".e-floatright").css("display", "none");
appointment = args.appointment;
//var detailsWindow = document.getElementById("userCalendarAppDetailsWindow");
//detailsWindow.addEventListener("focus", onCalendarDetailsWindowFocus);
onCalendarDetailsWindowFocus();
// configure button arrangment
if (args.appointment.AppointmentStatus.toUpperCase() == "MISSED") {
// appt was missed so only can be resched
$("#appointment-complete").css("display", "none");
$("#appointment-edit").css("display", "none");
$("#appointment-reschedule").css("display", "");
$("#appointment-reschedule").on('click', function (e) { onClickViewDetailsButton() });
}
else if (args.appointment.AppointmentStatus.toUpperCase() == "SCHEDULED") {
// show both View Details and Complete
$("#appointment-reschedule").css("display", "none");
$("#appointment-edit").css("display", "");
$("#appointment-complete").css("display", "");
$("#appointment-complete").on('click', function (e) { onClickCompleteButton(); });
$("#appointment-edit").on('click', function(e) { onClickViewDetailsButton(); });
}
else { // view only; no longer completable
$("#appointment-reschedule").css("display", "none");
$("#appointment-edit").css("display", "");
$("#appointment-complete").css("display", "none");
$("#appointment-edit").on('click', function (e) { onClickViewDetailsButton(); });
}
}