var retForm = "";
var appConfig = getAppConfig();
var eventFormID = getCalEventDetailsFormID();
var eventDataPageID = arguments.dataPageID;
var formResultHTML = "";
var uiTheme = getUItheme();
var formFooter = "";
var submitStatusHTML = " Submitting...";
var processStatusHTML = " Processing...";
application.ptCalendar.scripts.loadJquery();
application.ptCalendar.scripts.loadJQueryUI(themeName=uiTheme);
application.ptCalendar.scripts.loadADFLightbox();
#renderEventEditFormProcessingMsg()#
application.ptCalendar.scripts.loadJQuery();
// Force jQueryUI to make sure the DateTime Builder CFT and Recurrence CFT Builder buttons and details render properly
application.ptCalendar.scripts.loadJQueryUI(force=1,themeName=uiTheme);
application.ptCalendar.scripts.loadADFLightbox();
retForm = formHeader;
retForm = retForm & application.ptCalendar.forms.renderAddEditForm(
formID = eventFormID
,dataPageId = eventDataPageID
,customizedFinalHtml=formResultHTML
,lbAction=arguments.lbAction
,callback=arguments.callback
);
retForm = retForm & formFooter;
return retForm;
var retMsgHTML = "";
var processStatusHTML = " Processing...";
#processStatusHTML#
Please wait while this event is being processed!!
(This window will close when the process has completed.)
var appConfig = getAppConfig();
var reHTML = "";
var uiTheme = getUItheme();
var submitStatusHTML = " Copying...";
var actionApp = getAppBeanName();
var actionBean = "calEventsCopyController";
var actionMethod = "processEventCopyForm";
var actionURL = application.ADF.lightboxProxy;
var dataStruct = StructNew();
var dateTimeDataArray = ArrayNew(1);
var recurDataArray = ArrayNew(1);
var dateTimeIDList = "";
var recurrenceIDList = "";
var noSrcIDMsg = "";
var noSrcDataMsg = "";
var dtCopyDefault = 1;
var recurCopyDefault = 1;
An Event ID was NOT provided!
This Event CANNOT be copied!The Event Data could NOT be found!
This Event CANNOT be copied!
application.ptCalendar.scripts.loadJQuery();
application.ptCalendar.scripts.loadJQueryUI(themeName=uiTheme);
// Include the Calendar Admin Style Sheet
application.ptCalendar.calService.loadCalendarAdminCSS();
#noSrcIDMsg#
// Get the Event Details
dataStruct = application.ptCalendar.calEventDetailsDAO.getEventDetailsDataByUniqueID(TRIM(arguments.eventID));
if ( StructKeyExists(dataStruct,"values") ) {
if ( StructKeyExists(dataStruct.values,"EventDateTimeIDList") AND LEN(TRIM(dataStruct.values.EventDateTimeIDList)) ) {
dateTimeIDList = dataStruct.values.EventDateTimeIDList;
// Get the rendered Event Dates and Times
dateTimeDataArray = application.ptCalendar.dateTimeBuilderController.buildDateTimeRenderData(dateTimeIDList=dateTimeIDList);
}
if ( StructKeyExists(dataStruct.values,"EventRecurrenceID") AND LEN(TRIM(dataStruct.values.EventRecurrenceID)) ) {
recurrenceIDList = dataStruct.values.EventRecurrenceID;
// Get the rendered Recurrence Properties
recurDataArray = application.ptCalendar.recurrenceBuilderController.buildRecurrenceRenderData(uuidList=recurrenceIDList);
}
}
#noSrcDataMsg#
var appConfig = getAppConfig();
var dataQry = QueryNew("temp");
var retHTML = "";
var useEventsCache = false;
// TODO: use this when Events Cache is dyanmic and is always current
// var useEventsCache = application.ptCalendar.getEventCacheStatus();
var uiTheme = getUItheme();
var submitStatusHTML = " Opening...";
var actionURL = application.ADF.lightboxProxy;
var actionApp = application.ptCalendar.getAppBeanName();
var confirmBean = "calEventsConfirmController";
var confirmMethod = "processEditConfirmForm";
var editBean = "calEventsForms";
var editMethod = "renderEventEditForm";
var editTitle = "Edit Event";
//var editLBAction = "refreshparent"; //TODO: DELETE - THIS IS NOT NEEDED WHEN USING EVENT CACHE
var editSeriesDefault="series"; //occurrence
var showEditConfirmDialog = true;
var noIDMsg = "";
var noDataMsg = "";
var currData = StructNew();
var occurrDataPageID = "";
var occurrEventID = "";
var seriesDataPageID = "";
var seriesEventID = "";
var eventType = ""; // Options: recurrencePattern, brokenRecurrence, orphanDateTime
var eventData = StructNew();
var callbackAction = "updateEventCache_cbFunct";
var callbackActionID = "";
// Get the Event Details
// - Determine if we need to open the dialog or just open the edit form
if ( LEN(TRIM(arguments.dateTimeID)) AND LEN(TRIM(arguments.hashID)) ) {
// DateTimeID and a HashID
// - If we have both the DateTimeID and a HashID then this is a recurrence exception
// - This event has a static dataTime
// - Open the confirmation dialog
showEditConfirmDialog = true;
// Get Current Occurrence and Series IDs for the selected event
// - TODO: When the Events Cache can be dynamically updated and is always current this can be changed to use the dymanic 'useEventsCache'
currData = application.ptCalendar.calEventsSeriesService.getOccurrenceData(
hashid=TRIM(arguments.hashID)
,dateTimeID=TRIM(arguments.dateTimeID)
,useCache=useEventsCache
);
occurrEventID = currData.occurrEventID;
occurrDataPageID = currData.occurrDataPageID; // Use this to open the OCCURRENCE
seriesEventID = currData.seriesEventID;
seriesDataPageID = currData.seriesDataPageID; // Use this to open the SEREIS
eventType = currData.eventType;
eventData = currData.occurrEventData;
}
else if ( LEN(TRIM(arguments.dateTimeID)) ) {
// DateTimeID (only - no hashID)
// - if we only have a dateTimeID then this is a static date/time
// - Open the Event Details form directly
// - No Confrim Dialog needed
showEditConfirmDialog = false;
// Get Current Occurrence and Series IDs for the selected event
// - TODO: When the Events Cache can be dynamically updated and is always current this can be changed to use the dymanic 'useEventsCache'
currData = application.ptCalendar.calEventsSeriesService.getOccurrenceData(
hashid=TRIM(arguments.hashID)
,dateTimeID=TRIM(arguments.dateTimeID)
,useCache=useEventsCache
);
occurrEventID = currData.occurrEventID;
occurrDataPageID = currData.occurrDataPageID; // Use this to open the OCCURRENCE
eventType = currData.eventType;
eventData = currData.occurrEventData;
// Only set the eventDataPageID if we are opening the form directly with no Confirmation Dialog
eventDataPageID = occurrDataPageID;
// Set the Callback ActionID tothe Event ID to update the Cache
if ( LEN(TRIM(occurrEventID)) )
callbackActionID = occurrEventID;
}
else if ( LEN(TRIM(arguments.hashID)) ) {
// HashID (only - no dateTimeID)
// - If we only have a hashID then this is part of a Recurrence Series
// - Open the confirmation dialog
showEditConfirmDialog = true;
// Get Current Occurrence and Series IDs for the selected event
// - TODO: When the Events Cache can be dynamically updated and is always current this can be changed to use the dymanic 'useEventsCache'
currData = application.ptCalendar.calEventsSeriesService.getOccurrenceData(
hashid=TRIM(arguments.hashID)
,dateTimeID=TRIM(arguments.dateTimeID)
,useCache=useEventsCache
);
seriesEventID = currData.seriesEventID;
seriesDataPageID = currData.seriesDataPageID; // Use this to open the SEREIS
eventType = currData.eventType;
eventData = currData.seriesEventData;
}
// TODO: Right this to a log file
if ( arguments.appDebug ) {
application.ptCalendar.utils.dodump(currData,"currData",0);
application.ptCalendar.utils.dodump(eventData,"eventData",0);
application.ptCalendar.utils.doDump(occurrEventID,"occurrEventID",1);
application.ptCalendar.utils.doDump(occurrDataPageID,"occurrDataPageID",1);
application.ptCalendar.utils.doDump(seriesEventID,"seriesEventID",1);
application.ptCalendar.utils.doDump(seriesDataPageID,"seriesDataPageID",1);
application.ptCalendar.utils.doDump(eventType,"eventType",1);
application.ptCalendar.utils.doDump(eventDataPageID,"eventDataPageID",1);
application.ptCalendar.utils.doDump(callbackAction,"callbackAction",1);
application.ptCalendar.utils.doDump(callbackActionID,"callbackActionID",1);
}
An ID was NOT provided!
This Event Form CAN NOT be opened!A Event Data was not found!
This Event Form CAN NOT be opened!
// Include the Calendar Admin Style Sheet
application.ptCalendar.calService.loadCalendarAdminCSS();
#noIDMsg#
application.ptCalendar.scripts.loadJQuery();
application.ptCalendar.scripts.loadJQueryUI(themeName=uiTheme);
// Include the Calendar Admin Style Sheet
application.ptCalendar.calService.loadCalendarAdminCSS();