Class idx.form.buttons
Extension to dijit.form.Button to add functionality and features to all instances of
dijit.form.Button and its descendants. These extensions provide things like well-defined
button "type" attribute for common button types as well as alternate "placement",
"displayMode", and "profile" as well as styling the button with additional
CSS class to make it easier to style buttons of any type with a CSS selector.
Defined in: <idx\form\buttons.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Field Summary
Field Attributes | Field Name and Description |
---|---|
The buttonType can be used to provide a default "iconClass" and "label" if an explicit one is not defined. |
|
The display mode controls whether to show the icon, label, or both. |
|
The character symbol to show for an icon in high-contrast mode.
|
|
The placement can be used to indicate the location of a button to help provide a hint for styling it in some themes. |
|
The profile controls the minimum size for the button in some themes. |
Method Summary
Method Attributes | Method Name and Description |
---|---|
<static> |
idx.form.buttons.getButtonTypes()
Returns an array of strings containing the possible button type names.
|
<static> |
idx.form.buttons.getButtonTypeStore()
Returns a dojo.data.ItemFileReadStore containing the possible button type names.
|
onButtonTypeClick(e, buttonTypeState)
An on-click event added to dijit.form.Button that also communicates the
"buttonTypeState" associated with the button type.
|
|
onButtonTypeDblClick(e, buttonTypeState)
An on-double-click event added to dijit.form.Button that also communicates the
"buttonTypeState" associated with the button type.
|
|
<static> |
idx.form.buttons.setDefaultDisplayMode(displayModeName, placementName)
Sets the default display mode for either all possible button placement positions
or for a specific one.
|
<static> |
idx.form.buttons.setDefaultProfile(profileName, placementName)
Sets the default "profile" for either all possible button placement positions
or for a specific one.
|
Field Detail
buttonType
The buttonType can be used to provide a default "iconClass" and "label" if an explicit one is not defined. Certain button types also provide automatic toggling of the icon and label through a series of possibilities (usually two) with each click of the button. This is useful for buttons that change state when clicked (e.g.: "maximize / restore" or "filter / clear filter")
Possible values are:
- "close"
- "configure"
- "edit"
- "filter"
- "clearFilter"
- "toggleFilter"
- "help"
- "info"
- "minimize"
- "maximize"
- "print"
- "refresh"
- "restore"
- "maxRestore"
- "nextPage"
- "previousPage"
- "lastPage"
- "firstPage"
displayMode
The display mode controls whether to show the icon, label, or both. If not set then the default for the specified "placement" is used.
The possible values for displayMode are:
- "labelOnly"
- "iconOnly"
- "iconAndLabel"
iconSymbol
- Default Value:
- ""
idxBaseClass
- Default Value:
- "idxButtonDerived"
placement
The placement can be used to indicate the location of a button to help provide a hint for styling it in some themes. The placement can also govern the default "displayMode" and "profile" if not explicitly set otherwise.
The possible values for placement are:
- "primary"
- "secondary"
- "special"
- "toolbar"
profile
The profile controls the minimum size for the button in some themes. If not set then the default for the specified "placement" is used.
The possible values for profile are:
- "standard"
- "compact"
Method Detail
<static> {String[]} idx.form.buttons.getButtonTypes()
- Returns:
- {String[]} The array of strings contianing the button type names that are recognized.
<static> {dojo.data.ItemFileReadStore} idx.form.buttons.getButtonTypeStore()
- Returns:
- {dojo.data.ItemFileReadStore} A read store containing all possuble button types.
onButtonTypeClick(e, buttonTypeState)
- Parameters:
- {Event} e
- The event.
- {String} buttonTypeState
- The toggle state for the button or the button type itself.
onButtonTypeDblClick(e, buttonTypeState)
- Parameters:
- {Event} e
- The event.
- {String} buttonTypeState
- The toggle state for the button or the button type itself.
<static> idx.form.buttons.setDefaultDisplayMode(displayModeName, placementName)
- Parameters:
- {String} displayModeName
- A string that can be one of "labelOnly", "iconOnly", or "iconAndLabel"
- {String} placementName
- If null then the call affects all possible button placements, otherwise this should be one of "primary", "secondary", "special" or "toolbar".
<static> idx.form.buttons.setDefaultProfile(profileName, placementName)
- Parameters:
- {String} profileName
- A string that can be one of "standard" or "compact".
- {String} placementName
- If null then the call affects all possible button placements, otherwise this should be one of "primary", "secondary", "special" or "toolbar".