variables.eventStepLogging = false;
var retForm = "";
var appConfig = getAppConfig();
var eventFormID = getCalEventDetailsFormID();
//var eventDataPageID = arguments.dataPageID;
var formResultHTML = "";
var formHeader = "";
var formFooter = "";
var eventsEditFormFooterJS = "";
var uiTheme = getUItheme();
var submitStatusHTML = ' Submitting...';
var processStatusHTML = ' Processing...';
application.ptCalendar.scripts.loadJquery();
application.ptCalendar.scripts.loadJQueryUI(themeName=uiTheme);
application.ptCalendar.scripts.loadADFLightbox();
// Load the inline JavaScript after the libraries have loaded
application.ptCalendar.scripts.addFooterJS(eventsEditFormFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY
retForm = formHeader;
retForm = retForm & application.ptCalendar.forms.renderAddEditForm(
formID = eventFormID
,dataPageId = arguments.dataPageID
,lbAction=arguments.lbAction
,callback=arguments.callback
,appcallback=arguments.appcallback
,cbIDlist=arguments.cbIDlist
,formResultCallback="application.ptCalendar.calEventsForms.renderEventEditFormResult"
);
retForm = retForm & formFooter;
return retForm;
var eventFormID = getCalEventDetailsFormID();
var formResultFooterJS = "";
var calEventID = "";
var dateTimeID = "";
//var submitStatusMSG = "Saving Event...";
//var submitStatusIMG = "/ADF/apps/pt_calendar/images/ajax-loader-arrows.gif";
if ( StructKeyExists(arguments,"FormValues") )
{
if ( StructKeyExists(arguments.FormValues,"uniqueID") )
dateTimeID = arguments.FormValues.uniqueID;
if ( StructKeyExists(arguments.FormValues,"calEventID") )
calEventID = arguments.FormValues.calEventID;
}
if ( LEN(TRIM(arguments.appCallback)) )
{
arguments.FormValues.formID = eventFormID;
arguments.FormValues.datapageid = arguments.datapageid;
arguments.FormValues.cbIDlist = arguments.cbIDlist;
//if ( StructKeyExists(request.params,"cbIDlist") )
// arguments.FormValues.cbIDlist = request.params.cbIDlist;
}
application.ptCalendar.scripts.loadJQuery();
application.ptCalendar.scripts.loadADFLightbox();
// Load the inline JavaScript after the libraries have loaded
application.ptCalendar.scripts.addFooterJS(formResultFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY
#renderEventEditFormProcessingMsg()#
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 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();
An Event ID was NOT provided!
This Event CANNOT be copied!The Event Data could NOT be found!
This Event CANNOT be copied!
// Load the inline JavaScript after the libraries have loaded
application.ptCalendar.scripts.addFooterJS(eventCopyFormFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY
#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 eventEditTypeFooterJS = "";
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 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();
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!
#noIDMsg#
#noIDMsg#
#noDataMsg#
// Load the inline JavaScript after the libraries have loaded
application.ptCalendar.scripts.addFooterJS(eventCopyFormFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY