var appConfig = getAppConfig();
var uiTheme = getUItheme();
var dateTimeDataformID = getEventDateTimeFormID();
var dtDataArray = ArrayNew(1);
var retForm = "";
var formHeaderHTML = "";
var formFooterHTML = "";
var formHeaderCSS = "";
var formHeaderJS = "";
var submitStatusHTML = ' Submitting...';
var endTimeRequired = getEndTimeRequiredStatus();
var dateTimeDataPageID = 0;
var dtID = arguments.dateTimeID;
var calEventID = arguments.eventID;
var cbAction = "edit";
// Has a valid dataPageID been passed in, if not leave dpID as 0
if ( IsNumeric(arguments.dataPageID) AND arguments.dataPageID GT 0 )
dateTimeDataPageID = arguments.dataPageID;
// If a dataPageID was not passed in but we have a dateTimeID, get the datapageID by the records uniqueID
if ( dateTimeDataPageID LTE 0 AND LEN(TRIM(dtID)) )
{
// Get the CE data for the uuid
dtDataArray = application.ptCalendar.dateTimeBuilderDAO.getDateTimeData(uuid=dtID);
// Check that we have dtDataArray and set the dataPageID
if ( ArrayLen(dtDataArray) )
dateTimeDataPageID = dtDataArray[1].pageid;
}
// Check if we have the UUID from arguments. if not, we are creating a new record, so make the UUID
if ( dateTimeDataPageID LTE 0 AND LEN(TRIM(dtID)) EQ 0 )
{
dateTimeDataPageID = 0;
dtID = createUUID();
cbAction = "add";
}
// Set the request.params values for the dateTimeID and the eventID
request.params.dateTimeID = dtID; // populates the uniqueID field
request.params.eventID = calEventID; // populates the calEventID field
application.ptCalendar.scripts.loadJQuery();
application.ptCalendar.scripts.loadJQueryUI(themeName=uiTheme);
// Load the DateJS Plugin Headers
application.ptCalendar.scripts.loadDateJS();
// Load the inline CSS as a CSS Resource
application.ptCalendar.scripts.addHeaderCSS(formHeaderCSS, "TERTIARY");
// Load the inline JavaScript after the libraries have loaded
application.ptCalendar.scripts.addFooterJS(formHeaderJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY
retForm = formHeaderHTML;
retForm = retForm & application.ptCalendar.forms.renderAddEditForm(
formID = dateTimeDataformID,
dataPageId = dateTimeDataPageID,
callback = arguments.callback,
cbAction = cbAction,
formResultCallback="application.ptCalendar.dateTimeBuilderForms.renderDateTimeFormResult"
);
retForm = retForm & formFooterHTML;
return retForm;
var formResultFooterJS = "";
var calEventID = "";
var dateTimeID = "";
var submitStatusMSG = "Saving Date/Time Entry...";
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;
}
application.ptCalendar.scripts.loadJQuery();
application.ptCalendar.scripts.loadADFLightbox();
callback: #arguments.callback#
cbAction: #arguments.cbAction#
dateTimeID: #dateTimeID#
calEventID: #calEventID#
// Load the inline JavaScript after the libraries have loaded
application.ptCalendar.scripts.addFooterJS(formResultFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY
#submitStatusMSG#
var dateTimeDataformID = application.ptCalendar.getEventDateTimeFormID();
// Get the Date/Time data based on the UUID
var dateTimeArray = application.ptCalendar.dateTimeBuilderDAO.getDateTimeData(uuid=arguments.dateTimeID);
// Check that we have data
if ( ArrayLen(dateTimeArray) )
dataPageID = dateTimeArray[1].pageid;
else
dataPageID = 0;
// Call the FORMS delete function
return application.ptCalendar.forms.renderDeleteForm(
formID=dateTimeDataformID
,dataPageID=dataPageID
,title=arguments.title
,callback=arguments.callback
,cbIDlist=arguments.cbIDlist);
// Call the FORMS delete function
return application.ptCalendar.forms.renderDeleteForm(
formID=arguments.formID,
dataPageID=arguments.dataPageID,
title=arguments.title,
callback=arguments.callback,
cbIDlist=arguments.cbIDlist);