// If the ptCalendar bean name has been defined get the app config var appConfig = structKeyExists(application,"ptCalendar") ? application.ptCalendar.getAppConfig() : {}; var rbController = "recurrenceBuilderController"; var rbService = "recurrenceBuilderService"; var rbForm = "recurrenceBuilderForms"; // the param structure which will hold all of the fields from the props dialog var params = setParamDefaults(arguments.fieldName, arguments.parameters); // Set the NO Records Text var noRecordsText = "Recurrence has not been setup for this event.
Click '#params.btnAddText#' to select recurrence properties."; var ajaxIMG = ''; // Set the newDefaultPickerDate to be prepared if nothing is passed in var newDefaultPickerDate = ""; var cftRecurrenceBuilderCSS = ''; var cftRecurrenceBuilderJS = ''; var CSRF_Token = application.ADF.csSecurity.getCSRF_Token(); if ( len(trim(arguments.value)) EQ 0 ) { // Pass new date URL variable through to the Calendar Picker if ( StructKeyExists(request.params,"newSelectedDate") AND application.ptCalendar.date.IsRealDate(request.params.newSelectedDate) ) newDefaultPickerDate = request.params.newSelectedDate; }
if ( !StructKeyExists(Request, 'cftRecurrenceBuilderStylesheet') ) { application.ADF.scripts.loadUnregisteredResource('/ADF/apps/pt_calendar/style/calendar-recurrence-builder.css', "stylesheet", "head", "TERTIARY", 0, 0); Request.cftRecurrenceBuilderStylesheet = 1; } application.ptCalendar.scripts.addHeaderCSS(cftRecurrenceBuilderCSS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY application.ptCalendar.scripts.addFooterJS(cftRecurrenceBuilderJS,"TERTIARY");
/*private string function getValidationMsg() { if (arguments.parameters.bindRequired EQ 'one' AND len(arguments.parameters.recurrFieldID)) return "Please add a Date/Time entry or\nset-up Recurrence Properties."; return "Please add a Date/Time entry."; }*/ private struct function setParamDefaults(required string fieldName, required struct parameters) { var params = arguments.parameters; if ( NOT StructKeyExists(params, "fieldID") ) params.fieldID = arguments.fieldName; if ( (NOT StructKeyExists(params, "fieldClass")) OR ( len(trim(params.fieldClass)) LTE 0) ) params.fieldClass = ""; if ( (NOT StructKeyExists(params, "btnAddText")) OR ( len(trim(params.btnAddText)) LTE 0) ) params.btnAddText = "Setup Recurrence"; if ( (NOT StructKeyExists(params, "btnEditText")) OR ( len(trim(params.btnEditText)) LTE 0) ) params.btnEditText = "Edit Recurrence"; return params; } private boolean function isMultiline() { return true; } public string function getResourceDependencies() { return listAppend(super.getResourceDependencies(), "jQuery,jQueryUI,ADFLightbox"); } public string function loadResourceDependencies() { application.ptCalendar.scripts.loadJQuery(); application.ptCalendar.scripts.loadJQueryUI(themeName=application.ptCalendar.getUItheme()); application.ptCalendar.scripts.loadADFLightbox(); }