| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files (x86)/Mail Enable/Bin/NETWebMail/Mondo/lang/sys/Forms/CAL/ |
Upload File : |
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Compose.aspx.vb" Inherits="MailEnable.Clients.WebMail.Mondo.ComposeAppointment" %>
<%@ Register TagPrefix="uc1" TagName="uscStyleHeader" Src="../../../Controls/uscStyleHeader.ascx" %>
<%@ Register TagPrefix="uc2" TagName="uscPageBorder_Start" Src="../../../Controls/uscPageBorder_Start.ascx" %>
<%@ Register TagPrefix="uc3" TagName="uscPageBorder_End" Src="../../../Controls/uscPageBorder_End.ascx" %>
<%@ Register TagPrefix="uc4" TagName="uscAccess" Src="../../../Controls/uscAccess.ascx" %>
<%@ Register TagPrefix="uc5" TagName="ScriptsInclude" Src="../../../Controls/ScriptsInclude.ascx" %>
<%@ Register TagPrefix="uc6" TagName="uscAppointmentDetails" Src="AppointmentDetails.ascx" %>
<%@ Register TagPrefix="uc7" TagName="uscLanguageTokenMondo" Src="../../../Controls/uscLanguageToken.ascx" %>
<uc7:uscLanguageTokenMondo id="uscToken" runat="server"></uc7:uscLanguageTokenMondo>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><% =gPageTitle %></title>
<meta name="vs_defaultClientScript" content="JavaScript" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<uc1:uscStyleHeader ID="UscStyleHeader1" runat="server"></uc1:uscStyleHeader>
<uc5:ScriptsInclude id="ScriptsInclude" runat="server" Flags="EXPIRE"></uc5:ScriptsInclude>
<script type="text/javascript" language="Javascript">
<!--
var SkinRoot = '<%=Session("skin")%>';
var gPageMode;
var gAccessType;
var gRelativeFolderPath;
var gDate;
var gSourceURI = "";
var gSaveComplete = true;
var gAutoSignature = '';
var gArrAttendee = null; // associative array of attendee properties for an attendee in the VCAL
var gIsOrganiser = 0;
var gIsMeeting = 0;
var gStatusInUse = false;
var oConfirmation = null;
var oAlertDialog = null;
var gBrowserType = GetBrowserType();
var MODE_ADD = 0;
var MODE_EDIT = 1;
var g_opt = {};
g_opt['ME_VALIDATIONTOKEN'] = '<% =Session.item("ME_VALIDATIONTOKEN") %>';
function ShowAlert(Title, Message)
{
if (oAlertDialog != null)
{
oAlertDialog.Alert(Title, Message);
}
else
{
alert(Message);
}
}
function ServerRequest(sCommand, sData, bUseCallback, sFrameName)
{
var sSource = '<%=EscapeJS(ParseRequestArgument("Source"))%>';
if ((!gSourceURI || gSourceURI.length == 0) && sSource != '')
{
gSourceURI = sSource;
}
if (gSourceURI && (gSourceURI.length > 0))
{
sData = sData + "&URI=" + gSourceURI;
}
return LIBAjax_ServerRequest(sCommand, sData, bUseCallback, sFrameName);
}
function ServerPost(sCommand, sData, bUseCallback, sFrameName)
{
var sSource = '<%=EscapeJS(ParseRequestArgument("Source"))%>';
if ((!gSourceURI || gSourceURI.length == 0) && sSource != '')
{
gSourceURI = sSource;
}
if (gSourceURI && (gSourceURI.length > 0))
{
sData = sData + "&URI=" + gSourceURI;
}
LIBAjax_ServerPost(sCommand, sData, bUseCallback, sFrameName);
}
function OpenNewWindow(URL, width, height)
{
Features = new String("left=" + (window.screen.availWidth / 2 - width / 2) + ",top=" + (window.screen.availHeight / 2 - height / 2) + ",height=" + height + ",width=" + width + ", status=1,location=0,directories=0,toolbar=no,menubar=0,scrollbars=0,resizable=1");
window.open(URL, '_blank', Features);
}
function getAppointmentDateString()
{
return formatDate(arrDatePickers['apptStartTimeDatePicker'].getSelectedDate(), "yyyy-MM-dd");
}
function setErrorMessage(msg, mode)
{
var errFeedback = null;
errFeedback = document.getElementById('errFeedback');
if (errFeedback)
{
SetElementText(errFeedback, msg);
errFeedback.style.display = '';
setTimeout(function() { errFeedback.style.display = 'none'; }, 3000); // hide after 3 secs
}
}
function clearErrorMessage()
{
setErrorMessage('', MODE_ADD);
setErrorMessage('', MODE_EDIT);
}
function validateData(mode)
{
var start = GetAppointmentStart();
var finish = GetAppointmentFinish();
var bIsAllDayEvent = (document.getElementById('chkAllDayEvent').checked == true) ? true : false;
if (!bIsAllDayEvent)
{
if (start >= finish)
{
setErrorMessage(t_('[ME_TXT-MeetingStartTimeMustBeBeforeFinishTime]'), mode);
TabControl.ActivateTab(0); // make 1st tab visible
return false;
}
}
var txtDescription = document.getElementById('txtDescription');
if (txtDescription.value == '')
{
setErrorMessage(t_('[ME_TXT-AppointmentMustHaveSubject]'), mode);
//setActiveTab('tab1');
TabControl.ActivateTab(0); // make 1st tab visible
return false;
}
return true;
}
function setDisabledState(sItem, boolState)
{
if (document.getElementById(sItem)) document.getElementById(sItem).disabled = boolState;
}
function disableButtons()
{
setDisabledState('btnSave', true);
setDisabledState('btnCancel', true);
setDisabledState('btnUpdate', true);
setDisabledState('btnDelete', true);
setDisabledState('btnClose', true);
}
function enableButtons()
{
setDisabledState('btnSave', false);
setDisabledState('btnCancel', false);
setDisabledState('btnUpdate', false);
setDisabledState('btnDelete', false);
setDisabledState('btnClose', false);
}
function closeAndRefreshDP(RebindData, StartDateString)
{
if (StartDateString) {
gSelectedDateString = formatDate(StartDateString, "yyyy-MM-dd");
getTopAppWindow().gOptions['CalendarDate'] = StartDateString;
}
closeAppointmentDetailsPage(RebindData);
}
function closeAppointmentDetailsPage(RebindData)
{
var app = null;
var bAllowNewWindows = ("<%= gAllowNewWindows %>" == "True");
<% If Request("NewWindow") = 1 Then %>
bAllowNewWindows = true;
<% End If %>
if (bAllowNewWindows)
{
self.close();
app = window.opener.getTopAppWindow();
$(".toolbar_primary_table").addClass("popupWin");
}
else
{
app = getTopAppWindow();
}
var dpFrame = app.frames['frmCalendar'].frames['frameDatePicker'];
if (dpFrame && dpFrame.ShowSelectedCalendars)
{
dpFrame.ShowSelectedCalendars();
}
}
function getSelectedResource() {
var sResource = $('#GeneralTabBody #trResource #ddlResource').val();
if (!sResource || (sResource == '')) {
sResource = '<%=EscapeJS(gResourceID)%>';
}
return sResource;
}
function onSave()
{
clearErrorMessage();
if (validateData(MODE_ADD))
{
UpdateRecurrenceRange();
if (IsValidateApptDetails()) {
var command;
var data;
command = "ADD-APPOINTMENT";
data = GetApptDataString(gPageMode, gAppointmentID, getSelectedResource(), gInstanceScope, gDate);
if (data != '')
{
if (gSaveComplete == true)
{
gSaveComplete = false;
disableButtons();
ServerPost(command, data, true, 'Appointments');
}
}
else
{
return false;
}
} else {
alert(t_('[ME_TXT-MeetingStartTimeMustBeBeforeFinishTime]'));
return false;
}
}
}
function onCancel()
{
closeAppointmentDetailsPage(false);
}
function UpdateAppointment(Data, NotifyAttendees)
{
var command = "EDIT-APPOINTMENT";
Data += "&NotifyAttendees=" + NotifyAttendees;
ServerPost(command, Data, true, 'Appointments');
}
function onUpdate()
{
clearErrorMessage();
if (validateData(MODE_EDIT))
{
UpdateRecurrenceRange();
if (IsValidateApptDetails()) {
var command;
var data;
command = "EDIT-APPOINTMENT";
data = GetApptDataString(gPageMode, gAppointmentID, getSelectedResource(), gInstanceScope, gDate);
if (gIsOrganiser == 1 && gIsMeeting == 1) {
oConfirmation.Confirm("", t_("[ME_TXT-YouHaveChangedTheMeetingDetailsSendUpdatedMeetingNow?]"), function () { UpdateAppointment(data, '1'); }, true, function () { UpdateAppointment(data, '0'); });
}
else {
ServerPost(command, data, true, 'Appointments');
}
} else {
alert(t_('[ME_TXT-MeetingStartTimeMustBeBeforeFinishTime]'));
return false;
}
}
}
function DeleteAppointment(ID)
{
if (ID && ID.length > 0)
{
var command = "DELETE-APPOINTMENT";
var data = 'ID=' + ID + '&ResourceID=' + encodeURIComponent(getSelectedResource());
if (gInstanceScope) {
data += '&InstanceScope=' + gInstanceScope;
}
if (gDate) {
data += '&InstanceDate=' + encodeURIComponent(gDate);
}
ServerRequest(command, data, false, 'Appointments');
}
}
function onDelete()
{
oConfirmation.Confirm(t_("[ME_TXT-ConfirmDelete]"), t_("[ME_TXT-ConfirmAppointmentDelete]"), function() { DeleteAppointment(gAppointmentID); });
}
function onClose()
{
closeAndRefreshDP(false, gDate);
}
function refreshDatePickerFreeBusy(DateString)
{
var DayPickerFrame;
var bAllowNewWindows = '<%= gAllowNewWindows %>' == 'True';
if (bAllowNewWindows)
{
DayPickerFrame = window.opener.getTopAppWindow().window.frames['frameCalendar'];
}
else
{
DayPickerFrame = getTopAppWindow().window.frames['frameCalendar'];
}
if (DayPickerFrame && DayPickerFrame.GetFreeBusyDays)
{
DayPickerFrame.UpdateFreeBusyDays(DateString);
}
}
function ProcessSaveAppointment(BaseNode)
{
var Result = GetXMLValue(BaseNode.getElementsByTagName("RETURNVALUE")[0]);
if (Result == 1)
{
var sStartDate = GetXMLValue(BaseNode.getElementsByTagName("STARTDATE")[0]);
if (getTopAppWindow().ShowNotification)
{
getTopAppWindow().ShowNotification(t_("[ME_TXT-AppointmentSaved]"));
}
gPageMode = 'Add';
var UnresolvedAddresses = GetXMLValue(BaseNode.getElementsByTagName("UNRESOLVED")[0]);
if (UnresolvedAddresses && UnresolvedAddresses.length > 0)
{
var ErrMsg = t_("[ME_TXT-CouldNotResolveRecipients/Attendees]") + ":\n";
var RecipientList = UnresolvedAddresses.split(";");
var i = 0;
for (i = 0; i < RecipientList.length; i++)
{
if (RecipientList[i].length > 0)
{
ErrMsg += "\n" + HTMLEncode(RecipientList[i]);
}
}
ShowAlert(t_("[ME_TXT-FailedToResolveRecipients]"), ErrMsg, function() { closeAndRefreshDP(true, sStartDate); });
}
else
{
closeAndRefreshDP(true, sStartDate);
}
}
else
{
var ErrorValue = parseInt(GetXMLValue(BaseNode.getElementsByTagName("ERROR_VALUE")[0]));
var ErrorDescription = GetXMLValue(BaseNode.getElementsByTagName("ERROR_DESCRIPTION")[0]);
switch (ErrorValue)
{
case 1: // Failed to create appointment
setErrorMessage(t_('[ME_TXT-FailedToCreateAppointment]') + ': ' + ErrorDescription, MODE_ADD);
break;
case 2: // Not authorised to send emails to attendees
setErrorMessage(t_('[ME_TXT-NotAuthorisedToSendEmailToAttendees]'), MODE_ADD);
break;
case 3: // Attempted to send email to attendees, but failed
setErrorMessage(t_('[ME_TXT-FailedToSendEmailToAttendees]'), MODE_ADD);
break;
case 4: // Failed to resolve attendees for sending email to them
setErrorMessage(t_('[ME_TXT-FailedToResolveAttendeesForSendingEmail]'), MODE_ADD);
break;
default: // ???
setErrorMessage(t_('[ME_TXT-Error]'), MODE_ADD);
break;
}
gSaveComplete = true;
enableButtons();
}
}
function ProcessUpdateAppointment(BaseNode)
{
var Result = GetXMLValue(BaseNode.getElementsByTagName("RETURNVALUE")[0]);
if (Result == 1)
{
var sStartDate = GetXMLValue(BaseNode.getElementsByTagName("STARTDATE")[0]);
if (getTopAppWindow().ShowNotification)
getTopAppWindow().ShowNotification(t_("[ME_TXT-AppointmentSaved]"));
gPageMode = 'Update';
var UnresolvedAddresses = GetXMLValue(BaseNode.getElementsByTagName("UNRESOLVED")[0]);
if (UnresolvedAddresses && UnresolvedAddresses.length > 0)
{
var ErrMsg = t_("[ME_TXT-CouldNotResolveRecipients/Attendees]") + ":\n";
var RecipientList = UnresolvedAddresses.split(";");
var i = 0;
for (i = 0; i < RecipientList.length; i++)
{
if (RecipientList[i].length > 0)
{
ErrMsg += "\n" + HTMLEncode(RecipientList[i]);
}
}
ShowAlert(t_("[ME_TXT-FailedToResolveRecipients]"), ErrMsg, function() { closeAndRefreshDP(true, sStartDate); });
}
else
{
closeAndRefreshDP(true, sStartDate);
}
}
else
{
var err = t_('[ME_TXT-FailedToUpdateAppointmentBecauseItCouldNotBeFound]');
var errNodes = BaseNode.getElementsByTagName("ERROR_DESCRIPTION");
if (errNodes != null && errNodes.length > 0)
{
err = GetXMLValue(errNodes[0]);
}
setErrorMessage(err, MODE_EDIT);
}
}
// This function processes the response status' for an appointment and builds an associative array
// to map each attendee to their response status (either 'Accepted', 'Decline' or 'Tentative')
function ProcessAttendeeResponseStatus(BaseNode)
{
gArrAttendee = new Array();
var arrAttendeeProps = new Array();
var sID = "", sStatus = "", sRole = "", sRSVP = "", sCN = "";
var lNumAttendees = 0;
var XMLNode, XMLNodeAttributes;
lNumAttendees = BaseNode.childNodes.length;
for (i = 0; i < lNumAttendees; i++)
{
XMLNode = BaseNode.childNodes[i];
XMLNodeAttributes = XMLNode.attributes;
sID = GetXMLValue(XMLNodeAttributes.getNamedItem('ID'));
sStatus = GetXMLValue(XMLNode.getElementsByTagName("PARTSTAT")[0]);
sRole = GetXMLValue(XMLNode.getElementsByTagName("ROLE")[0]);
sRSVP = GetXMLValue(XMLNode.getElementsByTagName("RSVP")[0]);
sCN = GetXMLValue(XMLNode.getElementsByTagName("CN")[0]);
gArrAttendee[sID] = { PARTSTAT: sStatus, ROLE: sRole, RSVP: sRSVP, CN: sCN };
}
}
function GetResponseStatusString(AttendeesArr)
{
var sStatus = "";
var lNumAccepted = 0;
var lNumTentative = 0;
var lNumDeclined = 0;
var sResult = "";
if (AttendeesArr)
{
for (var sKey in AttendeesArr)
{
sStatus = AttendeesArr[sKey].PARTSTAT.toUpperCase();
if (sStatus == "ACCEPTED")
{
lNumAccepted++;
}
else if (sStatus == "TENTATIVE")
{
lNumTentative++;
}
else if (sStatus == "DECLINED")
{
lNumDeclined++;
}
}
}
sResult = lNumAccepted + " attendees accepted, " + lNumTentative + " tentatively accepted, " + lNumDeclined + " declined.";
return sResult;
}
//
// This function opens up a new window with all the response status' of attendees for an appointment.
//
function ShowAttendeesResponseStatus()
{
getTopAppWindow().ShowAttendeeResponseDialog(gAppointmentID);
}
function GetAttendeesResponseStatus(AppID)
{
gArrAttendee = null;
ServerRequest("GET-ATTENDEES-RESPONSE-STATUS", "ID=" + AppID, false)
}
function ProcessGetAttachedAppointment(BaseNode)
{
var Result = GetXMLValue(BaseNode.getElementsByTagName("RETURNVALUE")[0]);
if (Result == 1)
{
//setActiveTab('tab1');
var MessageID = GetXMLValue(BaseNode.attributes.getNamedItem('ITEMID'));
var RelativeFolderPath = GetXMLValue(BaseNode.getElementsByTagName('RELATIVEFOLDERPATH')[0]);
var AttachFilename = GetXMLValue(BaseNode.getElementsByTagName('FILENAME')[0]);
var Method = GetXMLValue(BaseNode.getElementsByTagName('METHOD')[0]);
var description = GetXMLValue(BaseNode.getElementsByTagName('DESCRIPTION')[0]);
var attendees = GetXMLValue(BaseNode.getElementsByTagName('ATTENDEES')[0]);
var startTimeString = GetXMLValue(BaseNode.getElementsByTagName('STARTTIME')[0]);
var finishTimeString = GetXMLValue(BaseNode.getElementsByTagName('FINISHTIME')[0]);
var location = GetXMLValue(BaseNode.getElementsByTagName('LOCATION')[0]);
var status = GetXMLValue(BaseNode.getElementsByTagName('STATUS')[0]);
var busystatus = GetXMLValue(BaseNode.getElementsByTagName('BUSYSTATUS')[0]);
var notes = GetXMLValue(BaseNode.getElementsByTagName('NOTES')[0]);
var iSensitivity = parseInt(GetXMLValue(BaseNode.getElementsByTagName('SENSITIVITY')[0]));
var isRecurring = GetXMLValue(BaseNode.getElementsByTagName('ISRECURRING')[0]);
var allDayEvent = GetValueAsLng(GetXMLValue(BaseNode.getElementsByTagName('ALLDAYEVENT')[0]));
var senderEmail = GetXMLValue(BaseNode.getElementsByTagName('SENDER_EMAIL_ADDRESS')[0]);
var bIsAllDayEvent = (allDayEvent == 1) ? true : false;
var reminderSet = GetValueAsLng(GetXMLValue(BaseNode.getElementsByTagName('REMINDERSET')[0]));
var reminderMinutes = GetValueAsLng(GetXMLValue(BaseNode.getElementsByTagName('REMINDERMINUTESBEFORESTART')[0]));
var startTime = getDateTimeObjectFromDateString(startTimeString);
var finishTime = getDateTimeObjectFromDateString(finishTimeString);
var ddlFrom = document.getElementById('ddlFrom'); // note the ID of the dropdown list because it's now in a user control
var txtDescription = document.getElementById('txtDescription');
var txtAttendees = document.getElementById('txtAttendees');
var txtLocation = document.getElementById('txtLocation');
var tdStatus = document.getElementById('tdStatus');
var txtNotes = document.getElementById('txtApptNotes');
var ddlSensitivity = document.getElementById('ddlApptSensitivity');
var chkEmailAttendees = document.getElementById('chkEmailAttendees');
if (senderEmail)
{
var oOpt = document.createElement("OPTION");
SetElementText(oOpt, senderEmail);
ddlFrom.appendChild(oOpt);
}
SelectListItemByValue('ddlBusyStatus', busystatus);
txtDescription.value = description;
if (attendees)
{
txtAttendees.value = attendees;
}
DisableSendEmailOption();
DisableAttendeesField();
// We need to show the Accept, Tentative, Decline buttons
ShowResponseButtons();
if (Method && Method.toUpperCase() == 'CANCEL')
{
document.getElementById('trPrompt').style.display = '';
AddVCalCancelAction('tdPrompt', t_('[ME_TXT-TheAttachedAppointmentHasBeenCancelled]') + ' ' + t_('[ME_TXT-RemoveFromCalendar?]'), 'tdResponse', MessageID, RelativeFolderPath);
}
else if (Method && Method.toUpperCase() == 'REPLY')
{
document.getElementById('trPrompt').style.display = '';
var sAttendee = GetXMLValue(BaseNode.getElementsByTagName('ATTENDEE')[0]);
var sPrompt = GetResponsePrompt(sAttendee);
AddAttachedUpdateAttendeeAction('tdPrompt', sPrompt, 'tdResponse', MessageID, RelativeFolderPath, AttachFilename);
}
else if (Method && Method.toUpperCase() == 'REQUEST')
{
AddAttachedResponseAction('tdResponse', MessageID, RelativeFolderPath, AttachFilename);
}
txtLocation.value = location;
if (!isNaN(iSensitivity) && (iSensitivity >= 0) && (iSensitivity <= 3))
{
try
{
ddlSensitivity.value = iSensitivity;
} catch (err) { }
}
SetElementText(tdStatus, status);
txtNotes.value = notes;
SetAppointmentDateAndTimes(startTime, finishTime);
if ((reminderSet == 1) || (reminderSet == -1))
{
SetReminder(true, reminderMinutes);
}
else
{
SetReminder(false);
}
if (bIsAllDayEvent)
{
SetAllDayEvent();
}
if (isRecurring != '0')
{
LoadRecurrenceData(BaseNode,null);
}
else
{
InitRecurData('apptStartTimeDatePicker');
SetRecurrenceType(RECURRENCE_TYPE_NONE);
}
}
else
{
setErrorMessage(t_('[ME_TXT-FailedToRetrieveAppointment]'), MODE_EDIT);
}
}
function ProcessDeleteAppointment(BaseNode)
{
var Result = GetXMLValue(BaseNode.getElementsByTagName("RETURNVALUE")[0]);
if (Result == 1)
{
var sStartDate = GetXMLValue(BaseNode.getElementsByTagName("STARTDATE")[0]);
if (getTopAppWindow().ShowNotification)
getTopAppWindow().ShowNotification(t_("[ME_TXT-AppointmentDeleted]"));
gPageMode = 'Delete';
var fnOwner = $('#frmCalendar').contents().find('#frameAppointments');
if (fnOwner.length > 0) {
fnOwner[0].contentWindow.refreshCalendar();
}
closeAndRefreshDP(true, sStartDate);
}
else
{
var ErrorDesc = GetXMLValue(BaseNode.getElementsByTagName("ERROR_DESCRIPTION")[0]);
setErrorMessage(t_('[ME_TXT-FailedToDeleteAppointment]') + ': ' + ErrorDesc, MODE_EDIT);
}
}
function ProcessUpdateResponse(BaseNode)
{
var Result = GetXMLValue(BaseNode.getElementsByTagName("RETURNVALUE")[0]);
if (Result == 1)
{
if (getTopAppWindow().ShowNotification)
getTopAppWindow().ShowNotification(t_("[ME_TXT-NotificationSentToOrganizerOfMeeting!]"));
else if (window.opener.ShowNotification)
window.opener.ShowNotification(t_("[ME_TXT-NotificationSentToOrganizerOfMeeting!]"));
}
else
{
}
}
function ProcessAppointmentUpdate(BaseNode)
{
var Result = GetXMLValue(BaseNode.getElementsByTagName("RETURNVALUE")[0]);
if (Result == 1)
{
if (getTopAppWindow().ShowNotification)
getTopAppWindow().ShowNotification(t_("[ME_TXT-AppointmentDetailsUpdatedSuccessfully!]"));
else if (window.opener.ShowNotification)
window.opener.ShowNotification(t_("[ME_TXT-AppointmentDetailsUpdatedSuccessfully!]"));
refreshDatePickerFreeBusy();
}
else
{
var sErrorDesc = GetXMLValue(BaseNode.getElementsByTagName("ERROR_DESCRIPTION")[0]);
ShowAlert(t_("[ME_TXT-Error]"), sErrorDesc);
}
}
function ProcessAppointmentCancel(BaseNode)
{
var sResult = GetXMLValue(BaseNode.getElementsByTagName("RETURNVALUE")[0]);
if (sResult == "1")
{
if (getTopAppWindow().ShowNotification)
getTopAppWindow().ShowNotification(t_('[ME_TXT-AppointmentDeleted]') + '!');
else if (window.opener.ShowNotification)
window.opener.ShowNotification(t_('[ME_TXT-AppointmentDeleted]') + '!');
refreshDatePickerFreeBusy();
}
else
{
var sErrorDesc = GetXMLValue(BaseNode.getElementsByTagName("ERROR_DESCRIPTION")[0]);
ShowAlert(t_("[ME_TXT-Error]"), sErrorDesc);
}
}
function ProcessXMLResult(responseXML)
{
var BaseNode = responseXML.getElementsByTagName("BASEELEMENT")[0];
if (BaseNode) // valid response XML
{
var Schema = GetXMLValue(BaseNode.attributes.getNamedItem('SCHEMA'));
var Command = GetXMLValue(BaseNode.attributes.getNamedItem('METHOD'));
if (Schema == 'RESULT')
{
if (Command == 'ADD-APPOINTMENT')
{
ProcessSaveAppointment(BaseNode);
}
else if (Command == 'EDIT-APPOINTMENT')
{
ProcessUpdateAppointment(BaseNode);
}
else if (Command == 'GET-APPOINTMENT')
{
ProcessGetAppointment(BaseNode);
}
else if (Command == 'GET-ATTACHED-APPOINTMENT')
{
ProcessGetAttachedAppointment(BaseNode);
}
else if (Command == 'CHECK-FREEBUSY')
{
ProcessGetFreeBusy(BaseNode);
}
else if (Command == 'DELETE-APPOINTMENT')
{
ProcessDeleteAppointment(BaseNode);
}
else if (Command == 'GET-ATTENDEES-RESPONSE-STATUS')
{
ProcessAttendeeResponseStatus(BaseNode);
}
else if (Command == 'APPOINTMENT-ATTACHED-ACCEPT')
{
ProcessUpdateResponse(BaseNode);
}
else if (Command == 'APPOINTMENT-ATTACHED-TENTATIVE')
{
ProcessUpdateResponse(BaseNode);
}
else if (Command == 'APPOINTMENT-ATTACHED-DECLINE')
{
ProcessUpdateResponse(BaseNode);
}
else if (Command == 'APPOINTMENT-UPDATE-ATTENDEE-STATUS')
{
ProcessAppointmentUpdate(BaseNode);
}
else if (Command == 'APPOINTMENT-CANCEL')
{
ProcessAppointmentCancel(BaseNode);
}
return true;
}
return true;
}
return true;
}
function showHideForMode(pageMode, AccessType)
{
var btnSave = document.getElementById('btnSave');
var btnUpdate = document.getElementById('btnUpdate');
var btnDelete = document.getElementById('btnDelete');
if ('<%=gAccessType %>' == 'R')
{
// no write permission, so disabled write buttons
btnSave.style.display = 'none';
btnUpdate.style.display = 'none';
btnDelete.style.display = 'none';
}
var ddlFrom = document.getElementById('ddlFrom'); // note the ID of the dropdown list because it's now in a user control
var tdFromLabelData = document.getElementById('tdFromLabelData');
var tdFromLabel = document.getElementById('tdFromLabel');
var trFrom = document.getElementById('trFrom');
var txtAttendees = document.getElementById('txtAttendees');
var btnEdit = document.getElementById('btnEdit');
var btnShowFBT = document.getElementById('btnShowFBT');
var btnCheckAvail = document.getElementById('btnCheckAvail');
var trStatus = document.getElementById('trStatus');
var tdStatus = document.getElementById('tdStatus');
var btnCancel = document.getElementById('btnCancel');
var btnClose = document.getElementById('btnClose');
var blockop = '';
if (pageMode == 'Read')
{
$('#btnSave,#btnCancel').hide();
$('#btnUpdate,#btnDelete,#btnClose').show();
ddlFrom.style.display = 'none';
tdFromLabelData.style.display = 'none';
tdFromLabel.style.display = 'none';
trFrom.style.display = 'none';
txtAttendees.disabled = false;
btnCheckAvail.style.visibility = blockop;
if (AccessType != 'R')
{
if (btnUpdate) btnUpdate.style.display = blockop;
if (btnDelete) btnDelete.style.display = blockop;
if (btnEdit) btnEdit.disabled = false;
if (btnShowFBT) btnShowFBT.style.visibility = blockop;
}
else
{
if (btnUpdate) btnUpdate.style.display = 'none';
if (btnDelete) btnDelete.style.display = 'none';
if (btnEdit) btnEdit.disabled = true;
if (btnShowFBT) btnShowFBT.style.visibility = 'hidden';
}
if (btnClose) btnClose.style.display = blockop;
if (gStatusInUse)
{
trStatus.style.display = blockop;
}
else
{
trStatus.style.display = 'none';
}
tdStatus.style.display = blockop;
}
else if (pageMode == 'Add')
{
$('#btnSave,#btnCancel').show();
$('#btnUpdate,#btnDelete,#btnClose').hide();
ddlFrom.style.display = blockop;
tdFromLabelData.style.display = blockop;
tdFromLabel.style.display = blockop;
trFrom.style.display = blockop;
txtAttendees.disabled = false;
if (btnEdit) btnEdit.disabled = false;
btnShowFBT.style.visibility = 'visible';
btnCheckAvail.style.visibility = 'visible';
trStatus.style.display = 'none';
tdStatus.style.display = 'none';
if (btnSave) btnSave.style.display = blockop;
if (btnCancel) btnCancel.style.display = blockop;
}
else if (pageMode == 'ReadAttachedVCAL')
{
$('#btnSave,#btnCancel').hide();
$('#btnUpdate,#btnDelete,#btnClose').hide();
}
}
function GetAppointmentDetails(AppointmentID, Scope, InstanceDate)
{
var command = "GET-APPOINTMENT";
var data = 'ID=' + AppointmentID + '&ResourceID=' + encodeURIComponent('<%=EscapeJS(gResourceID)%>') + '&InstanceScope=' + Scope + '&InstanceDate=' + encodeURIComponent(InstanceDate);
ServerPost(command, data, true, 'Appointments');
}
function GetAttachedAppointmentDetails(MessageID, RelativeFolderPath, AttachmentName)
{
var command = "GET-ATTACHED-APPOINTMENT";
var data = 'MessageID=' + MessageID + '&Folder=' + RelativeFolderPath + '&Filename=' + AttachmentName;
ServerRequest(command, data, false, 'Appointments');
}
function UpdateRecurrenceData()
{
var oCurDate = arrDatePickers['apptStartTimeDatePicker'].getSelectedDate();
UpdateRecurData(oCurDate)
}
function browserResize()
{
//Body Shell Height
var html_height = document.body.clientHeight;
//Body Col Shell Height
var body_shell_height = html_height;
var toolbar_primary_height = document.getElementById("options_footer_js").clientHeight;
var bodyCol_shell_height = body_shell_height - toolbar_primary_height;
var appointment_shell = document.getElementById("appointment_shell_js");
var appointment_shell_vertical_padding = parseInt(GetStyleValue(appointment_shell, 'paddingTop'), 10) + parseInt(GetStyleValue(appointment_shell, 'paddingBottom'), 10);
var appointment_shell_style_height = bodyCol_shell_height - appointment_shell_vertical_padding;
appointment_shell.style.height = appointment_shell_style_height + "px";
}
window.onresize = browserResize;
// -->
</script>
<!--[if lte IE 7]>
<style type="text/css">
.bttn_right {float:left;}
#td_weekly_recur_every {width:50px;}
#div_weekly_recur_every {width:50px;}
#div_YearlyEvery {width:50px;}
#div_YearlyThe {width:50px;}
.calendar_recurrence_weeks_table td {margin:0;padding:0;}
.calendar_recurrence_weeks_table input {margin: 0;padding:0;}
.calendar_recurrence_gap {height: 20px;}
</style>
<![endif]-->
</head>
<body class="options_background calendar" onload="PageLoad();">
<div class="level0_shell cal_compose">
<uc4:uscAccess ID="uscAccess" runat="server"></uc4:uscAccess>
<div class="options_shell_inner frameless" id="appointment_shell_js" style="overflow: auto;">
<uc2:uscPageBorder_Start ID="AppointmentDetailsFrameHeader" runat="server"/>
<uc6:uscAppointmentDetails ID="uscApptDetails" runat="server"/>
<uc3:uscPageBorder_End ID="AppointmentDetailsFrameFooter" runat="server" />
</div>
<!-- options_shell_inner -->
<div class="options_footer" id="options_footer_js">
<div id="btnSave" class="bttn_float_left" onclick="onSave();">
<div class="bttn_left" onselectstart="return false;">
<div class="compose_bttn_okCancel">
<%=uscToken.GetText("[ME_TXT-Save]")%></div>
</div>
<div class="bttn_right">
</div>
</div>
<div id="btnCancel" class="bttn_float_left" onclick="onCancel();">
<div class="bttn_left" onselectstart="return false;">
<div class="compose_bttn_okCancel">
<%=uscToken.GetText("[ME_TXT-Cancel]")%></div>
</div>
<div class="bttn_right">
</div>
</div>
<div id="btnUpdate" class="bttn_float_left" onclick="onUpdate();">
<div class="bttn_left" onselectstart="return false;">
<div class="compose_bttn_okCancel"><%=uscToken.GetText("[ME_TXT-Save]")%></div>
</div>
<div class="bttn_right"></div>
</div>
<div id="btnDelete" class="bttn_float_left" onclick="onDelete();">
<div class="bttn_left" onselectstart="return false;">
<div class="compose_bttn_okCancel"><%=uscToken.GetText("[ME_TXT-Delete]")%></div>
</div>
<div class="bttn_right"></div>
</div>
<div id="btnClose" class="bttn_float_left" onclick="onClose();">
<div class="bttn_left" onselectstart="return false;">
<div class="compose_bttn_okCancel"><%=uscToken.GetText("[ME_TXT-Close]")%></div>
</div>
<div class="bttn_right"></div>
</div>
<span id="errFeedback" class="options_feedback_success" style="display:none;"></span>
</div>
<div id="FreeBusyDialogDiv">
<iframe id="FreeBusyDialogFrame" name="FreeBusyDialogFrame" allowTransparency="true" style="background-color:Transparent;width:100%;height:400px;" frameborder="0" scrolling="no"></iframe>
</div>
</div><!-- level0_shell cal_compose -->
</body>
<script type="text/javascript" language="Javascript">
<!--
var oFreeBusyDialog = null;
function doup(ev)
{
if (getTopAppWindow() && getTopAppWindow().dodoup)
{
ev = ev || event;
var mouseY = ev.clientY ? ev.clientY : ev.offsetY;
var mouseX = ev.clientX ? ev.clientX : ev.offsetX;
getTopAppWindow().dodoup(mouseX, mouseY, true);
if (ev != null)
{
if (ev.preventDefault)
{
ev.preventDefault();
}
else
{
ev.returnValue = false;
}
}
}
return true;
}
function domove(ev)
{
if (getTopAppWindow() && getTopAppWindow().dodomove)
{
ev = ev || event;
var mouseY = ev.clientY ? ev.clientY : ev.offsetY;
var mouseX = ev.clientX ? ev.clientX : ev.offsetX;
getTopAppWindow().dodomove(mouseX, mouseY, true);
}
return true;
}
function UpdateRecurFields(DatePicker)
{
var selectedDate = DatePicker.getSelectedDate();
var day = selectedDate.getDate();
var month = selectedDate.getMonth();
var year = selectedDate.getFullYear();
var recurMode = GetRecurrenceMode();
SetRecurDayOfMonth(day);
SetRecurMonthOfYear(month + 1);
SetRecurYear(year);
UpdateMonthlyDisplay(true);
if (recurMode == RECURRENCE_TYPE_WEEKLY)
{
var lDOWMask = GetDayOfWeekMask(GetRecurrenceStartDateFromField().getDay());
var lWeeklyInterval = GetRecurInterval();
SetRecurDOWMask(lDOWMask);
ClearWeeklyDOWSelections();
SetWeeklyRecurValues(lWeeklyInterval, lDOWMask);
}
}
function PageLoad()
{
oConfirmation = new MessageDialog("ConfirmDialogCAL");
oAlertDialog = new MessageDialog("AlertDialogCAL");
oFreeBusyDialog = new Dialog("FreeBusyDialog", t_("[ME_TXT-FreeAndBusyTimes]"), $("#FreeBusyDialogDiv"), { Width: 650 });
gAppointmentID = '<%= gAppointmentID %>';
gPageMode = '<%= gPageMode %>';
gAccessType = '<%= gAccessType %>';
gDate = '<%= gDate %>';
gInstanceScope = '<%= gInstanceScope %>';
gSourceURI = encodeURIComponent("<%=EscapeJS(gSourceURI)%>");
document.onmouseup = doup;
document.onmousemove = domove;
$('#RecurrenceTabBody').load('../../dialogs/recurrence.htm?v=' + GetScriptVersion(), null, function () {
recurrence.Localize();
SetRecurrenceType(RECURRENCE_TYPE_NONE);
InitApptGeneralFields(gInstanceScope == 'occurrence');
InitApptRecurFields();
showHideForMode(gPageMode, gAccessType);
if (gInstanceScope == 'occurrence') {
$('#RecurrenceTabBody').hide();
}
if (gPageMode == 'Read')
{
// Load details of an appointment
GetAppointmentDetails(gAppointmentID, gInstanceScope, gDate);
}
else if (gPageMode == 'ReadAttachedVCAL')
{
// Load details of a VCAL attachment
var sMessageID = '<%= gMessageID %>';
var sRelativeFolderPath = '<%= gRelativeFolderPath %>';
var sFilename = '<%= MailEnable.SessionValidation.ParseArgument(Request("Filename")) %>';
GetAttachedAppointmentDetails(sMessageID, escape(sRelativeFolderPath), sFilename)
}
else if ('Add')
{
InitAddDetails(gDate);
}
browserResize();
});
}
-->
</script>
</html>