request.element.isStatic = 0;
appName = application.ptCalendar.getAppBeanName();
// Get the Configuration and Page Map Values
appConfig = application.ptCalendar.getAppConfig();
// Set the UI theme from the Configuration Element
uiTheme = application.ptCalendar.getUItheme();
// Set the Verbose Output setting from the Configuration Element
useVerboseOutput = application.ptCalendar.getVerboseOutputStatus();
// Set the useEventCache flag for the management events search filtering from the configuration element
useEventsCache = application.ptCalendar.getEventsManagementEventCacheStatus();
// Set whether or not to update the Events Cache based on the Main Events Cache Status cache setting (not the management cache flag)
useEventsCacheCallbacks = application.ptCalendar.getEventCacheStatus();
// - EventsCache Manual Override
//useEventsCache = false; // (true/false) - Use this as an override for the Global settings that are managed via the Configuration element
// set to 'true' to debug ajax calls (ie. after cs delete process)
debugCallbackOutput = false; //Default: false
// Get custom element name that this manager is working with.
ceName = application.ptCalendar.getEventDetailsCEName();
// Set the text for the button to Add New.
request.ptCalendar.addButtonTitle = "Add a New Calendar Event";
// Set the buttonLibrary
if ( !StructKeyExists(attributes,"buttonLibrary") OR LEN(TRIM(attributes.buttonLibrary)) EQ 0 )
attributes.buttonLibrary = "jQueryUI"; // jQueryUI, Bootstrap or FontAwesome
buttonLinkClass = "ds-add-button ui-state-default ui-corner-all"; // default for jqueryUI
if ( StructKeyExists(attributes,"buttonLinkClass") )
buttonLinkClass = attributes.buttonLinkClass;
// START - Bootstrap Button Options
if ( !StructKeyExists(attributes,"addButtonStyle") OR LEN(TRIM(attributes.addButtonStyle)) EQ 0 )
attributes.addButtonStyle = "";
if ( !StructKeyExists(attributes,"addButtonSize") OR LEN(TRIM(attributes.addButtonSize)) EQ 0 )
attributes.addButtonSize = "";
if ( !StructKeyExists(attributes,"editDeleteButtonsStyle") OR LEN(TRIM(attributes.editDeleteButtonsStyle)) EQ 0 )
attributes.editDeleteButtonsStyle = attributes.addButtonStyle;
if ( !StructKeyExists(attributes,"editDeleteButtonsSize") OR LEN(TRIM(attributes.editDeleteButtonsSize)) EQ 0 )
attributes.editDeleteButtonsSize = "";
// END - Bootstrap Button Options
// Load the jQuery scripts
application.ptCalendar.scripts.loadJQuery(noConflict=1);
//application.ptCalendar.scripts.loadJQueryUI(themeName=UItheme);
application.ptCalendar.scripts.loadADFLightbox();
// Load Icon Library Script (if not already loaded)
if ( attributes.buttonLibrary EQ "bootstrap" )
{
request.adfDSmodule.useBootstrap = true;
request.adfDSmodule.buttonStyle = attributes.editDeleteButtonsStyle;
request.adfDSmodule.buttonSize = attributes.editDeleteButtonsSize;
buttonLinkClass = ""; // Set Blank - Normally used with jQueryUI
application.ptCalendar.scripts.loadBootstrap();
}
if ( attributes.buttonLibrary EQ "fontawesome" )
{
attributes.buttonLibrary = "bootstrap"; // Uses bootstrap for non-icon buttons
request.adfDSmodule.useFontAwesome = true;
request.adfDSmodule.buttonStyle = attributes.editDeleteButtonsStyle;
request.adfDSmodule.buttonSize = attributes.editDeleteButtonsSize;
buttonLinkClass = ""; // Set Blank - Normally used with jQueryUI
application.ptCalendar.scripts.loadBootstrap();
application.ptCalendar.scripts.loadFontAwesome();
}
if ( attributes.buttonLibrary EQ "jQueryUI" )
{
request.adfDSmodule.useJQueryUI = true;
request.adfDSmodule.buttonStyle = "";
request.adfDSmodule.buttonSize = "";
if ( StructKeyExists(attributes,"themeName") AND LEN(TRIM(attributes.themeName)) )
application.ptCalendar.scripts.loadJQueryUI(themeName=attributes.themeName);
else
application.ptCalendar.scripts.loadJQueryUI();
}
// load header for the Calendar Admin CSS
application.ptCalendar.calService.loadCalendarAdminCSS();
// Get the CE Form ID
//request.ptCalendar.formid = application.ptCalendar.getCalOrganizationsFormID();
eventAddBean = "calEventsForms";
eventAddMethod = "renderEventEditForm";
//dtbController = "dateTimeBuilderController";
//rbController = "recurrenceBuilderController";
// Load the inline JavaScript after the libraries have loaded
application.ptCalendar.scripts.addHeaderCSS(manageEventDetailsHeaderCSS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY
// Load the inline JavaScript after the libraries have loaded
application.ptCalendar.scripts.addFooterJS(manageEventDetailsFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY
#application.ptCalendar.ui.buildAddEditLink(
appName=appName
,formBean=eventAddBean
,formMethod=eventAddMethod
,linkTitle=request.ptCalendar.addButtonTitle
,formName=ceName
,dataPageID=0
,refreshparent=true
,urlParams="callback=newEvent_cbFunct"
,lbTitle=request.ptCalendar.addButtonTitle
,linkClass=buttonLinkClass
,uiTheme=uiTheme
,buttonLibrary=attributes.buttonLibrary
,buttonStyleClass=attributes.addButtonStyle
,buttonSizeClass=attributes.addButtonSize
)#
Please LOGIN to add new records.