Hello!
I have written the following javascript function that selects all the appointments of a certain "group". Now I wish to move them all to the left and right the exact same amount....any thoughts.
Thanks in advance!
I have written the following javascript function that selects all the appointments of a certain "group". Now I wish to move them all to the left and right the exact same amount....any thoughts.
function
OnClientAppointmentMoving(sender, args)
{
//Get all appointments and info
var
appointments = sender.get_appointments();
var
appointmentcount = appointments.get_count();
//Get selected appointment and its info
var
currentappointment = args.get_appointment();
var
oldslot = currentappointment.get_timeSlot();
var
list = currentappointment.get_attributes();
var
ordergroup = list.getAttribute(
"OrderGroup"
);
//Selected appointment drop slot
var
newslot = args.get_targetSlot();
var
curslot = newslot - oldslot;
alert(oldslot);
//handle all visiable appointments
for
(
var
i = 0; i < appointmentcount; i++)
{
//Get all scheduler appointments
appointment = appointments.getAppointment(i);
appointment.set_selected(
false
);
templist = appointment.get_attributes();
tempordergroup = templist.getAttribute(
"OrderGroup"
);
//Work only with current appointment group
if
(tempordergroup == ordergroup)
{
//Visually demonstrate split is selected
appointment.set_selected(
true
);
//Move all selected appointments left and right by same amount
//HELP HERE!!!
}
//end if
}
//end for
}
//end function
Thanks in advance!