Skip to content

Commit

Permalink
feat(bricks): add an optional customContainerClass parameter to Bricks
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksueiR committed Apr 27, 2015
1 parent fe49347 commit f00feb2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/js/RAMP/Utils/bricks.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ define([
* @default ""
*/

/**
* Any other custom CSS class to be added to the Brick container node.
*
* @property customContainerClass
* @private
* @type {String}
* @default ""
*/

/**
* A name of the specific Brick template.
*
Expand Down Expand Up @@ -254,6 +263,7 @@ define([
* @param {String} [config.baseTemplate] a base template name to be used
* @param {String} [config.noticeTemplate] a notice template name to be used
* @param {String} [config.containerClass] a CSS class of the specific brick container
* @param {String} [config.customContainerClass] any other optional CSS class to be added to the brick container
* @param {String} [config.template] a name of the specific Brick template
* @retun Brick
* @chainable
Expand Down Expand Up @@ -556,6 +566,7 @@ define([
* @param {String} [config.baseTemplate] a base template name to be used
* @param {String} [config.noticeTemplate] a notice template name to be used
* @param {String} [config.containerClass] a CSS class of the specific brick container
* @param {String} [config.customContainerClass] any other optional CSS class to be added to the brick container
* @param {String} [config.template] a name of the specific Brick template
* @retun MultiBrick
* @chainable
Expand Down Expand Up @@ -778,6 +789,7 @@ define([
* @param {Array} [config.freezeStates] a set of rules specifying states Brick should be frozen
* @param {String} [config.baseTemplate] a base template name to be used
* @param {String} [config.noticeTemplate] a notice template name to be used
* @param {String} [config.customContainerClass] any other optional CSS class to be added to the brick container
* @param {String} [config.containerClass] a CSS class of the specific brick container
* @param {String} [config.template] a name of the specific Brick template
* @param {String} [config.buttonClass] a CSS class of the button in the ButtonBrick
Expand Down Expand Up @@ -903,6 +915,7 @@ define([
* @param {String} [config.baseTemplate] a base template name to be used
* @param {String} [config.noticeTemplate] a notice template name to be used
* @param {String} [config.containerClass] a CSS class of the specific brick container
* @param {String} [config.customContainerClass] any other optional CSS class to be added to the brick container
* @param {String} [config.template] a name of the specific Brick template
* @param {String} [config.value] a checkbox value
* @param {String} [config.label] a checkbox label
Expand Down Expand Up @@ -1109,6 +1122,7 @@ define([
* @param {String} [config.baseTemplate] a base template name to be used
* @param {String} [config.noticeTemplate] a notice template name to be used
* @param {String} [config.containerClass] a CSS class of the specific brick container
* @param {String} [config.customContainerClass] any other optional CSS class to be added to the brick container
* @param {String} [config.template] a name of the specific Brick template
* @param {String} [config.value] a checkbox value
* @param {String} [config.label] a checkbox label
Expand Down Expand Up @@ -1272,6 +1286,7 @@ define([
* @param {String} [config.baseTemplate] a base template name to be used
* @param {String} [config.noticeTemplate] a notice template name to be used
* @param {String} [config.containerClass] a CSS class of the specific brick container
* @param {String} [config.customContainerClass] any other optional CSS class to be added to the brick container
* @param {String} [config.template] a name of the specific Brick template
* @param {String} [config.buttonClass] a CSS class of the button in the OkCancelButtonBrick
* @param {String} [config.okLabel] an OK button label
Expand Down Expand Up @@ -1438,6 +1453,7 @@ define([
* @param {String} [config.baseTemplate] a base template name to be used
* @param {String} [config.noticeTemplate] a notice template name to be used
* @param {String} [config.containerClass] a CSS class of the specific brick container
* @param {String} [config.customContainerClass] any other optional CSS class to be added to the brick container
* @param {String} [config.template] a name of the specific Brick template
* @param {Array} [config.choices] a set of choices that will be presented to the user
* @chainable
Expand Down Expand Up @@ -1661,6 +1677,7 @@ define([
* @param {String} [config.baseTemplate] a base template name to be used
* @param {String} [config.noticeTemplate] a notice template name to be used
* @param {String} [config.containerClass] a CSS class of the specific brick container
* @param {String} [config.customContainerClass] any other optional CSS class to be added to the brick container
* @param {String} [config.template] a name of the specific Brick template
* @param {String} [config.label] an input field label. Invisible. Defaults to the Brick's header
* @param {String} [config.placeholder] a placeholder to be displayed inside the input field
Expand Down Expand Up @@ -1916,6 +1933,7 @@ define([
* @param {String} [config.baseTemplate] a base template name to be used
* @param {String} [config.noticeTemplate] a notice template name to be used
* @param {String} [config.containerClass] a CSS class of the specific brick container
* @param {String} [config.customContainerClass] any other optional CSS class to be added to the brick container
* @param {String} [config.template] a name of the specific Brick template
* @retun DropDownBrick
* @chainable
Expand Down Expand Up @@ -2183,6 +2201,7 @@ define([
* @param {String} [config.baseTemplate] a base template name to be used
* @param {String} [config.noticeTemplate] a notice template name to be used
* @param {String} [config.containerClass] a CSS class of the specific brick container
* @param {String} [config.customContainerClass] any other optional CSS class to be added to the brick container
* @param {String} [config.template] a name of the specific Brick template
* @param {String} [config.label] an input field label. Invisible. Defaults to the Brick's header
* @param {String} [config.placeholder] a placeholder to be displayed inside the input field
Expand Down Expand Up @@ -2372,6 +2391,7 @@ define([
* @param {String} [config.baseTemplate] a base template name to be used
* @param {String} [config.noticeTemplate] a notice template name to be used
* @param {String} [config.containerClass] a CSS class of the specific brick container
* @param {String} [config.customContainerClass] any other optional CSS class to be added to the brick container
* @param {String} [config.template] a name of the specific Brick template
* @param {String} [config.label] an input field label. Invisible. Defaults to the Brick's header
* @param {String} [config.placeholder] a placeholder to be displayed inside the input field
Expand Down
2 changes: 1 addition & 1 deletion src/js/RAMP/Utils/templates/bricks_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
",

"default_base_template": "
<div class='brick {%= o.containerClass %} {%= o.header ? '' : 'empty-header' %}'>
<div class='brick {%= o.containerClass %} {%= o.customContainerClass %} {%= o.header ? '' : 'empty-header' %}'>

{% include(o.template, o); %}

Expand Down

0 comments on commit f00feb2

Please sign in to comment.