// 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