// Set defaults for the label and description includeLabel = true; includeDescription = true; //-- Update for CS 6.x / backwards compatible for CS 5.x -- // If it does not exist set the Field Permission variable to a default value if ( NOT StructKeyExists(variables,"fieldPermission") ) variables.fieldPermission = ""; // Create a script obj application.ADF.scripts.loadJQuery(); // 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]; // WriteDump(var=xparams, expand='no'); // Validate if the property field has been defined if ( NOT StructKeyExists(xparams, "fldID") OR LEN(xparams.fldID) LTE 0 ) xparams.fldID = fqFieldName; if ( NOT StructKeyExists(xparams, "fieldID") ) xparams.fieldID = fqFieldName; if ( (NOT StructKeyExists(xparams, "fieldClass")) OR ( LEN(TRIM(xparams.fieldClass)) LTE 0) ) xparams.fieldClass = ""; // Remove any labels from the possibleValues String if ( StructKeyExists(xparams, "possibleValues") AND LEN(TRIM(xparams.possibleValues)) ) xparams.possibleValues = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=xparams.possibleValues); else xparams.possibleValues = ""; if( CurrentValue eq '' ) { top = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=xparams.top); right = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=xparams.right); bottom = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=xparams.bottom); left = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=xparams.left); } else { //top = ListGetAt( currentValue, 1, ' ' ); //right = ListGetAt( currentValue, 2, ' ' ); //bottom = ListGetAt( currentValue, 3, ' ' ); //left = ListGetAt( currentValue, 4, ' ' ); top = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=ListGetAt( currentValue, 1, ' ' ) ); right = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=ListGetAt( currentValue, 2, ' ' ) ); bottom = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=ListGetAt( currentValue, 3, ' ' ) ); left = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=ListGetAt( currentValue, 4, ' ' ) ); } currentValue = top & 'px ' & right & 'px ' & bottom & 'px ' & left & 'px'; if( NOT StructKeyExists( xparams, 'ShowTop' ) ) xparams.ShowTop = 0; if( NOT StructKeyExists( xparams, 'ShowRight' ) ) xparams.ShowRight = 0; if( NOT StructKeyExists( xparams, 'ShowBottom' ) ) xparams.ShowBottom = 0; if( NOT StructKeyExists( xparams, 'ShowLeft' ) ) xparams.ShowLeft = 0; // TODO: add a function that strips the px off of each value in the possible values string // TODO: make sure each value int the possible values string is numeric // TODO: strip the px of of the current value string before converting to individual values
#application.ADF.paddingSettings.renderSelectionList(xparams.showTop,'Top:',xparams.FieldID,'Top',top,xparams.possibleValues)# #application.ADF.paddingSettings.renderSelectionList(xparams.showRight,'Right:',xparams.FieldID,'Right',right,xparams.possibleValues)# #application.ADF.paddingSettings.renderSelectionList(xparams.showBottom,'Bottom:',xparams.FieldID,'Bottom',bottom,xparams.possibleValues)# #application.ADF.paddingSettings.renderSelectionList(xparams.showLeft,'Left:',xparams.FieldID,'Left',left,xparams.possibleValues)# #application.ADF.paddingSettings.renderTextInput(xparams.showTop,'Top:',xparams.FieldID,'Top',top)# #application.ADF.paddingSettings.renderTextInput(xparams.showRight,'Right:',xparams.FieldID,'Right',right)# #application.ADF.paddingSettings.renderTextInput(xparams.showBottom,'Bottom:',xparams.FieldID,'Bottom',bottom)# #application.ADF.paddingSettings.renderTextInput(xparams.showLeft,'Left:',xparams.FieldID,'Left',left)#
#application.ADF.forms.wrapFieldHTML(inputHTML,fieldQuery,attributes,variables.fieldPermission,includeLabel,includeDescription)#