<%
@ Page Language="VB" MasterPageFile="~/TelerikAJAXMasterPage.master" AutoEventWireup="false" CodeFile="Scheduler.aspx.vb" Inherits="Scheduler_Scheduler" %>
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%
@ Register TagPrefix="Scheduler" TagName="DisplayPanel" Src="~/Controls/Scheduler/DisplayPanel.ascx" %>
<
asp:Content ContentPlaceHolderID="AJAXContentPlaceHolder" runat="server">
<script type="text/javascript" language="javascript">
function AppointmentEditing(sender, eventArgs) {
var apt = eventArgs.get_appointment();
window.radopen(
"Appointment.aspx?Mode=Edit&AppointmentId=" + apt.ID, "rwAdvancedForm");
eventArgs.set_cancel(
true);
}
function AppointmentInserting(sender, eventArgs) {
var start = formatDate(eventArgs.get_startTime());
var isAllDay = eventArgs.get_isAllDay();
// New appointment
window.radopen(
"Appointment.aspx?Mode=Insert&Start=" + start + "&IsAllDay=" + isAllDay, "rwAdvancedForm");
eventArgs.set_cancel(
true);
}
function formatDate(date) {
var year = padNumber(date.getUTCFullYear(), 4);
var month = padNumber(date.getUTCMonth() + 1, 2);
var day = padNumber(date.getUTCDate(), 2);
var hour = padNumber(date.getUTCHours(), 2);
var minute = padNumber(date.getUTCMinutes(), 2);
return year + month + day + hour + minute;
}
function padNumber(number, totalDigits) {
number = number.toString();
var padding = '';
if (totalDigits > number.length) {
for (i = 0; i < (totalDigits - number.length); i++) {
padding +=
'0';
}
}
return padding + number.toString();
}
function refreshScheduler() {
var ajaxManager = $find("RadAjaxManager2");
ajaxManager.ajaxRequest(
'RebindScheduler');
}
</
script>
<
telerik:RadSplitter ID="rpScheduler" Width="1024" BorderSize="0"
FullScreenMode="true" BorderStyle="None" runat="server" Skin="Vista">
<telerik:RadPane ID="rpOptions" Width="22px" runat="server">
<telerik:RadSlidingZone ID="rszOptions" runat="server">
<telerik:RadSlidingPane Title="Display" Width="230" runat="server">
<Scheduler:DisplayPanel ID="dpSideBar" runat="server" />
</telerik:RadSlidingPane>
</telerik:RadSlidingZone>
</telerik:RadPane>
<
telerik:RadPane ID="rpBody" runat="server">
<telerik:RadScheduler ID="rsMainScheduler"
DataEndField="End" DataKeyField="ID" DataStartField="Start"
DataSubjectField="Subject"
StartEditingInAdvancedForm="true"
StartInsertingInAdvancedForm="true"
OnClientAppointmentEditing="AppointmentEditing"
OnClientAppointmentInserting="AppointmentInserting"
SelectedView="DayView"
Height="600"
runat="server" Skin="Vista" MonthView-HeaderDateFormat="MMMM, yyyy">
<TimelineView UserSelectable="false" />
</telerik:RadScheduler>
</
telerik:RadPane>
</
telerik:RadSplitter>
<
telerik:RadAjaxManagerProxy ID="rampScheduler" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="rpScheduler">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rpScheduler" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</
telerik:RadAjaxManagerProxy>
</
asp:Content>