Add FieldStyler docblocks
* src/ui/styler/FieldStyler.js (getId, applyStyle, revokeStyle, addClass, removeClass): Docblocks addedmaster
parent
a3b16f33c9
commit
d126f618ae
|
@ -23,17 +23,53 @@ var AbstractClass = require( 'easejs' ).AbstractClass;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Style fields using CSS
|
* Style DOM fields
|
||||||
|
*
|
||||||
|
* @todo perhaps this should be called DomFieldStyler
|
||||||
*/
|
*/
|
||||||
module.exports = AbstractClass( 'FieldStyler',
|
module.exports = AbstractClass( 'FieldStyler',
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Retrieve unique identifier
|
||||||
|
*
|
||||||
|
* @return {string} unique identifier
|
||||||
|
*/
|
||||||
'abstract public getId': [],
|
'abstract public getId': [],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Apply style to field
|
||||||
|
*
|
||||||
|
* @param {DomField} field field to style
|
||||||
|
* @param {HTMLElement} element DOM element to style
|
||||||
|
* @param {Array.<HTMLElement>} row DOM elements of containing row
|
||||||
|
*
|
||||||
|
* @return {FieldStyler} self
|
||||||
|
*/
|
||||||
'abstract public applyStyle': [ 'field', 'element', 'row' ],
|
'abstract public applyStyle': [ 'field', 'element', 'row' ],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove style from field
|
||||||
|
*
|
||||||
|
* @param {DomField} field field to unstyle
|
||||||
|
* @param {HTMLElement} element DOM element to unstyle
|
||||||
|
* @param {Array.<HTMLElement>} row DOM elements of containing row
|
||||||
|
*
|
||||||
|
* @return {FieldStyler} self
|
||||||
|
*/
|
||||||
'abstract public revokeStyle': [ 'field', 'element', 'row' ],
|
'abstract public revokeStyle': [ 'field', 'element', 'row' ],
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add CSS class CLS to element ELEMENT
|
||||||
|
*
|
||||||
|
* This method is needed until support is dropped for browsers that do
|
||||||
|
* not support classList.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} element DOM element to style
|
||||||
|
* @param {string} cls class name
|
||||||
|
*
|
||||||
|
* @return {FieldStyler} self
|
||||||
|
*/
|
||||||
'protected addClass': function( element, cls )
|
'protected addClass': function( element, cls )
|
||||||
{
|
{
|
||||||
if ( !element )
|
if ( !element )
|
||||||
|
@ -60,6 +96,17 @@ module.exports = AbstractClass( 'FieldStyler',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add CSS class CLS to element ELEMENT
|
||||||
|
*
|
||||||
|
* This method is needed until support is dropped for browsers that do
|
||||||
|
* not support classList.
|
||||||
|
*
|
||||||
|
* @param {HTMLElement} element DOM element to style
|
||||||
|
* @param {string} cls class name
|
||||||
|
*
|
||||||
|
* @return {FieldStyler} self
|
||||||
|
*/
|
||||||
'protected removeClass': function( element, cls )
|
'protected removeClass': function( element, cls )
|
||||||
{
|
{
|
||||||
if ( !element )
|
if ( !element )
|
||||||
|
|
Loading…
Reference in New Issue