base.js revision d8a453d703387a8f8168c110b3a052dc60e4a794
/**
* Provides an interface for working with button-like DOM nodes
*
* @module button
* @main button
* @since 3.5.0
*/
/**
* returns a properly formed yui class name
*
* @method
* @param str {String} string to be appended at the end of class name
* @return
* @private
*/
function makeClassName(str) {
if (str) {
} else {
}
}
/**
* Creates a button
*
* @class Button
* @param config {Object} Configuration object
* @constructor
*/
this.initializer(config);
}
TEMPLATE: '<button/>',
enable: function() {
this.set('disabled', false);
},
disable: function() {
this.set('disabled', true);
},
_initAttributes: function(config) {
},
} else {
}
},
_uiSetLabel: function(value) {
return value;
},
_uiSetDisabled: function(value) {
return value;
},
_uiGetLabel: function() {
return value;
},
getNode: function() {
return this._host;
},
/**
* @method initializer
* @description Internal init() handler.
* @param config {Object} Config object.
* @private
*/
initializer: function(config) {
this._initAttributes(config);
},
/**
* @method renderUI
* @private
*/
// Set some default node attributes
}
};
/**
* Attribute configuration.
*
* @property ATTRS
* @type {Object}
* @private
* @static
*/
label: {
value: 'default 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 = {
BUTTON : makeClassName(),
};
// Export Button
Y.ButtonBase = Button;