Bricks Class
Item Index
Methods
Properties
- Brick static
- ButtonBrick static
- CheckboxBrick static
- CheckboxfaBrick static
- ChoiceBrick static
- ColorPickerBrick static
- containerClass
- containerClass
- containerClass
- DropDownBrick static
- FileInputBrick static
- label
- label
- MultiBrick static
- offLabel
- OkCancelButtonBrick static
- onLabel
- SimpleInputBrick static
- template
- template
- ToggleBrick static
- value
- value
Methods
isUserEntered
()
Boolean
Checks if the checkbox was checked by the user or not.
Returns:
true if the user checked the checkbox; false, otherwise
new
-
id
-
config
Initializes the CheckboxBrick by generating a specified template and setting defaults. Also sets a click listener on the template input checkbox. CheckboxBrick is a simple button in the Brick container.
If the header
is provided, the Brick display it as a header element while hiding checkbox label and displaying on/off labels beside the checkbox depending on the state.
If the header
is no provided, Brick's label is displayed beside the checkbox.
Provide header if the checkbox is a standalone feature or you have lots of space; omit header if the checkbox is a part of a group of checkboxes or you want to conserve space.
Parameters:
-
id
Stringspecified id of the Brick
-
config
Objecta configuration object for the Brick
-
[header]
String optionala Brick header
-
[instructions]
String optionala configuration object for the Brick
-
[required]
Array | Object optionalcollection of rules specifying what external conditions must be valid for the Brick to be enabled
-
[isEnabled]
Boolean optionalspecifies if the brick is disabled from the start
-
[freezeStates]
Array optionala set of rules specifying states Brick should be frozen
-
[baseTemplate]
String optionala base template name to be used
-
[noticeTemplate]
String optionala notice template name to be used
-
[containerClass]
String optionala CSS class of the specific brick container
-
[customContainerClass]
String optionalany other optional CSS class to be added to the brick container
-
[template]
String optionala name of the specific Brick template
-
[value]
String optionala checkbox value
-
[label]
String optionala checkbox label
-
[onLabel]
String optionala checkbox on label
-
[offLabel]
String optionala checkbox off label
-
Returns:
new
-
id
-
config
Initializes the CheckboxfsBrick by generating a specified template and setting defaults. Also sets a change listener on the template input checkbox. CheckboxfsBrick is a simple checkbox styles with a Formstone lib in the Brick container.
Parameters:
-
id
Stringspecified id of the Brick
-
config
Objecta configuration object for the Brick
-
[header]
String optionala Brick header
-
[instructions]
String optionala configuration object for the Brick
-
[required]
Array | Object optionalcollection of rules specifying what external conditions must be valid for the Brick to be enabled
-
[isEnabled]
Boolean optionalspecifies if the brick is disabled from the start
-
[freezeStates]
Array optionala set of rules specifying states Brick should be frozen
-
[baseTemplate]
String optionala base template name to be used
-
[noticeTemplate]
String optionala notice template name to be used
-
[containerClass]
String optionala CSS class of the specific brick container
-
[customContainerClass]
String optionalany other optional CSS class to be added to the brick container
-
[template]
String optionala name of the specific Brick template
-
[value]
String optionala checkbox value
-
[label]
String optionala checkbox label
-
[onLabel]
String optionala checkbox on label
-
[offLabel]
String optionala checkbox off label
-
Returns:
new
-
id
-
config
Initializes the ToggleBrick by generating a specified template and setting defaults. Also sets a change listener on the template input checkbox. ToggleBrick is a simple toggle in the Brick container.
Parameters:
-
id
Stringspecified id of the Brick
-
config
Objecta configuration object for the Brick
-
[header]
String optionala Brick header
-
[instructions]
String optionala configuration object for the Brick
-
[required]
Array | Object optionalcollection of rules specifying what external conditions must be valid for the Brick to be enabled
-
[isEnabled]
Boolean optionalspecifies if the brick is disabled from the start
-
[freezeStates]
Array optionala set of rules specifying states Brick should be frozen
-
[baseTemplate]
String optionala base template name to be used
-
[noticeTemplate]
String optionala notice template name to be used
-
[containerClass]
String optionala CSS class of the specific brick container
-
[customContainerClass]
String optionalany other optional CSS class to be added to the brick container
-
[template]
String optionala name of the specific Brick template
-
[value]
String optionala checkbox value
-
[label]
String optionala checkbox label
-
[onLabel]
String optionala checkbox on label
-
[offLabel]
String optionala checkbox off label
- @chainable
-
Returns:
setChecked
-
value
-
userChecked
Check or uncheck the checkbox.
Parameters:
Returns:
itself
setData
-
data
Sets CheckboxBrick's data. First calls setChecked and calls set data on the Brick prototype.
Parameters:
-
data
Objecta wrapper object for the data to be set.
Returns:
itself
Properties
Brick
Brick
static
The basic Brick prototype with no special functions. A base from all other Bricks.
CheckboxBrick
CheckboxBrick
static
The CheckboxBrick prototype. A simple Brick with a checkbox template.
CheckboxfaBrick
CheckboxfaBrick
static
The CheckboxfaBrick prototype. A simple Brick with a checkbox template styled with Formstone lib.
ChoiceBrick
ChoiceBrick
static
The ChoiceBrick prototype. Provides a user the ability to choose a single item among several.
ColorPickerBrick
ColorPickerBrick
static
The ColorPickerBrick prototype. Provides a control to select a color.
containerClass
String
private
A container CSS class of the Brick.
Default: "checkbox-brick-container formstone-checkbox"
containerClass
String
private
A CSS class of the ToggleBrick container node.
Default: "toggle-brick-container"
containerClass
String
private
A CSS class of the CheckboxBrick container node.
Default: "checkbox-brick-container"
DropDownBrick
DropDownBrick
static
The DropDownBrick prototype. Provides a dropdown control to choose an item from.
FileInputBrick
FileInputBrick
static
The FileInputBrick prototype extends SimpleInputBrick. Provides a control to either select a local file or enter its URL.
MultiBrick
MultiBrick
static
The MultiBrick prototype. Used as a container for multiple independent Bricks if they are required to be displayed side by side.
OkCancelButtonBrick
OkCancelButtonBrick
static
The OkCancelButtonBrick prototype. A MultiBrick with two ButtonBricks displayed side by side and styled as OK and Cancel buttons.
SimpleInputBrick
SimpleInputBrick
static
The SimpleInputBrick prototype. Provides a control for a simple text input. Can be potentially extended to serve more specific purposes.
template
String
private
A name of the default CheckboxBrick template.
Default: "default_checkbox_brick_template"
template
String
private
A name of the default ToggleBrick template.
Default: "default_toggle_brick_template"
ToggleBrick
ToggleBrick
static
The ToggleBrick prototype. A simple Brick with a checkbox toggle template.