// If the ptCalendar bean name has been defined get the app config
if ( StructKeyExists(application,"ptCalendar") )
appConfig = application.ptCalendar.getAppConfig();
else
appConfig = StructNew();
// Set the UI theme from the Configuration Element
uiTheme = application.ptCalendar.getUItheme();
// Add/Edit button default labels
rbAddButtonText = "Setup Recurrence";
rbEditButtonText = "Edit Recurrence";
rbController = "recurrenceBuilderController";
rbService = "recurrenceBuilderService";
rbForm = "recurrenceBuilderForms";
// the fields current value
currentValue = attributes.currentValues[fqFieldName];
// the param structure which will hold all of the fields from the props dialog
xparams = parameters[fieldQuery.inputID];
// Set defaults for the label and description
includeLabel = true;
includeDescription = false;
//-- Update for CS 6.x / backwards compatible for CS 5.x --
// If it does not exist set the Field Security variable to a default value
if ( NOT StructKeyExists(variables,"fieldPermission") )
variables.fieldPermission = "";
//-- Read Only Check w/ cs6 fieldPermission parameter --
readOnly = application.ptCalendar.forms.isFieldReadOnly(xparams,variables.fieldPermission);
if ( NOT StructKeyExists(xparams, "fieldID") )
xparams.fieldID = fqFieldName;
if ( (NOT StructKeyExists(xparams, "fieldClass")) OR ( LEN(TRIM(xparams.fieldClass)) LTE 0) )
xparams.fieldClass = "";
if ( (NOT StructKeyExists(xparams, "btnAddText")) OR ( LEN(TRIM(xparams.btnAddText)) LTE 0) )
xparams.btnAddText = rbAddButtonText;
if ( (NOT StructKeyExists(xparams, "btnEditText")) OR ( LEN(TRIM(xparams.btnEditText)) LTE 0) )
xparams.btnEditText = rbEditButtonText;
// Set the NO Records Text
noRecordsText = "Recurrence has not been setup for this event. Click '#xparams.btnAddText#' to select recurrence properties.";
// Get the DateTime element Name
dtDataElementName = application.ptCalendar.getEventDateTimeCEName();
// Get the DateTime formid
dtDataFormID = application.ptCalendar.getEventDateTimeFormID();
// Set the the Ajax Loader Image
ajaxIMG = '';
// Set the newDefaultPickerDate to be prepared if nothing is passed in
newDefaultPickerDate = "";
if ( LEN(TRIM(currentValue)) EQ 0 ) {
// Pass new date URL variable through to the Calendar Picker
if ( StructKeyExists(request.params,"newSelectedDate") AND IsDate(request.params.newSelectedDate) )
newDefaultPickerDate = request.params.newSelectedDate;
}
// Create a script obj
application.ptCalendar.scripts.loadJQuery();
application.ptCalendar.scripts.loadJQueryUI(themeName=uiTheme);
application.ptCalendar.scripts.loadADFLightbox();