request.ptProfile.configStruct = application.ptProfile.getAppConfig();
// 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
uiTheme = "";
if ( attributes.buttonLibrary EQ "jQueryUI" AND StructKeyExists(request.ptProfile.configStruct,"JQUERY_UI_THEME") AND LEN(TRIM(request.ptProfile.configStruct.JQUERY_UI_THEME)) )
uiTheme = request.ptProfile.configStruct.JQUERY_UI_THEME;
// Load the jQuery scripts
application.ptProfile.scripts.loadJQuery(noConflict=1);
application.ptProfile.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.ptProfile.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.ptProfile.scripts.loadBootstrap();
application.ptProfile.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.ptProfile.scripts.loadJQueryUI(themeName=attributes.themeName);
else if ( LEN(TRIM(uiTheme)) )
application.ptProfile.scripts.loadJQueryUI(themeName=uiTheme);
else
application.ptProfile.scripts.loadJQueryUI();
}
request.ptProfile.formid = application.ptProfile.getProfileFormID();
request.ptProfile.addButtonTitle = "Add New Profile";
// OBSOLETE VARIABLES
//request.ptProfile.editLBWidth = request.ptProfile.configStruct.LB_WIDTH;
//request.ptProfile.editLBHeight = request.ptProfile.configStruct.LB_HEIGHT;
appName = application.ptProfile.getAppBeanName();
ceName = application.ptProfile.getProfileCEName();
profileAddBean = "profileForms";
profileAddMethod = "profileAddEdit";
// Load the inline JavaScript after the libraries have loaded
application.ptProfile.scripts.addHeaderCSS(manageProfilesHeaderCSS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY
// Load the inline JavaScript after the libraries have loaded
application.ptProfile.scripts.addFooterJS(manageProfilesFooterJS, "TERTIARY"); // PRIMARY, SECONDARY, TERTIARY
#application.ptProfile.ui.buildAddEditLink(
appName=appName
,formBean=profileAddBean
,formMethod=profileAddMethod
,linkTitle=request.ptProfile.addButtonTitle
,formName=ceName
,dataPageID=0
,refreshparent=false
,urlParams=""
,lbTitle=request.ptProfile.addButtonTitle
,linkClass=buttonLinkClass
,uiTheme=uiTheme
,buttonLibrary=attributes.buttonLibrary
,buttonStyleClass=attributes.addButtonStyle
,buttonSizeClass=attributes.addButtonSize
)#
Please LOGIN to manage your profile.