core.js revision b90d3fc725a0a4b62fcc7dd8b3516571fd8582ff
/**
* Provides an interface for working with button-like DOM nodes
*
* @module button-core
* @since 3.5.0
*/
/**
* Creates a button
*
* @class Button
* @param config {Object} Configuration object
* @constructor
*/
this.initializer(config);
}
TEMPLATE: '<button/>',
/**
* @method initializer
* @description Internal init() handler.
* @param config {Object} Config object.
* @private
*/
initializer: function(config) {
this._initAttributes(config);
},
/**
* @method _initNode
* @description
* @param config {Object} Config object.
* @private
*/
} else {
}
},
/**
* @method _initAttributes
* @description
* @param config {Object} Config object.
* @private
*/
_initAttributes: function(config) {
},
/**
* @method renderUI
* @private
*/
// Set some default node attributes
}
},
/**
* @method enable
* @description
* @public
*/
enable: function() {
this.set('disabled', false);
},
/**
* @method disable
* @public
*/
disable: function() {
this.set('disabled', true);
},
/**
* @method getNode
* @description Gets the host node
* @public
*/
getNode: function() {
return this._host;
},
/**
* @method _uiGetLabel
* @description Getter for a button's 'label' ATTR
* @private
*/
_uiGetLabel: function() {
return value;
},
/**
* @method _uiSetLabel
* @description Setter for a button's 'label' ATTR
* @private
*/
_uiSetLabel: function(value) {
return value;
},
/**
* @method _uiSetDisabled
* @description Setter for the 'disabled' ATTR
* @private
*/
_uiSetDisabled: function(value) {
return value;
},
/**
* @method _getLabelNode
* @description Utility method to obtain a button's label node
* @private
*/
_getLabelNode: function(node) {
},
/**
* @method _getLabel
* @description Utility method to obtain a button's label text
* @private
*/
return label;
}
};
/**
* Attribute configuration.
*
* @property ATTRS
* @type {Object}
* @private
* @static
*/
label: {
setter: '_uiSetLabel',
getter: '_uiGetLabel',
lazyAdd: false
},
disabled: {
value: false,
setter: '_uiSetDisabled',
lazyAdd: false
}
};
/**
* Name of this component.
*
* @property NAME
* @type String
* @static
*/
/**
* Array of static constants used to identify the classnames applied to the Button DOM objects
*
* @property CLASS_NAMES
* @type {Array}
* @static
*/
Button.CLASS_NAMES = {
};
// Export Button
Y.ButtonCore = Button;