Submitting...';
var processStatusHTML = '
Processing...';
application.ptCalendar.scripts.loadJquery();
application.ptCalendar.scripts.loadJQueryUI(themeName=uiTheme);
application.ptCalendar.scripts.loadADFLightbox();
Processing...";
#processStatusHTML#
Please wait while this event is being processed!!
(This window will close when the process has completed.)
Copying...';
var eventCopyFormFooterJS = "";
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;
// Load the Scripts resources
application.ptCalendar.scripts.loadJQuery(noConflict=1);
application.ptCalendar.scripts.loadJQueryUI(themeName=uiTheme);
// Include the Calendar Admin Style Sheet
application.ptCalendar.calService.loadCalendarAdminCSS();
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 eventDataPageID = "";
var callbackAction = "updateEventCache_cbFunct";
var callbackActionID = "";
// Overwrite the CommonSpot Variable for CD_DialogName with the arguments.title
//var CD_DialogName = arguments.title;
var logMsg = "";
var logProcess = "Edit-Event";
if ( variables.eventStepLogging )
{
doStepLogging(processName=logProcess,methodName="calEventsForms.renderEditTypeConfirmHTMLForm",logMsg="",addBreak=false);
//logMsg = "dateTimeID: " & arguments.dateTimeID;
//doStepLogging(processName=logProcess,methodName="",logMsg=logMsg);
//logMsg = "hashID: " & arguments.hashID;
//doStepLogging(processName=logProcess,methodName="",logMsg=logMsg);
doStepLogging(processName=logProcess,methodName="",logMsg="arguments",logData=arguments);
}
// 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 Confirm 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;
if ( variables.eventStepLogging )
{
logMsg = "seriesEventID: " & seriesEventID;
doStepLogging(processName=logProcess, methodName="", logMsg=logMsg, addBreak=false);
logMsg = "seriesDataPageID: " & seriesDataPageID;
doStepLogging(processName=logProcess, methodName="", logMsg=logMsg, addBreak=false);
logMsg = "eventType: " & eventType;
doStepLogging(processName=logProcess, methodName="", logMsg=logMsg, addBreak=false);
}
}
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);
}
if ( variables.eventStepLogging )
{
logMsg = "showEditConfirmDialog: " & showEditConfirmDialog;
doStepLogging(processName=logProcess, methodName="", logMsg=logMsg, addBreak=false);
logMsg = "callbackAction: " & callbackAction;
doStepLogging(processName=logProcess, methodName="", logMsg=logMsg, addBreak=false);
logMsg = "callbackActionID: " & callbackActionID;
doStepLogging(processName=logProcess, methodName="", logMsg=logMsg, addBreak=true, size=60);
}
// Load the Scripts resources
application.ptCalendar.scripts.loadJQuery(noConflict=1);
application.ptCalendar.scripts.loadJQueryUI(themeName=uiTheme);
// Include the Calendar Admin Style Sheet
application.ptCalendar.calService.loadCalendarAdminCSS();