group.js revision e52e720a4fcf905ad7e7da26903648588eff6ce3
/**
* Allows Y.Button instances to be grouped together
*
* @module buttongroup
* @main ButtonGroup
* @since 3.5.0
*/
/**
* Creates a ButtonGroup
*
* @class ButtonGroup
* @extends Base
* @param config {Object} Configuration object
* @constructor
*/
function ButtonGroup(config) {
}
/* ButtonGroup extends the Base class */
/**
* @method initializer
* @description Internal init() handler.
* @param config {Object} Config object.
* @private
*/
initializer: function(config){
}
});
}
}, this);
}
},
/**
* @method getButtons
* @description Returns all Y.Buttons instances assigned to this group
* @public
*/
getButtons: function() {
},
/**
* @method getSelectedButtons
* @description Returns all Y.Buttons instances that are selected
* @public
*/
getSelectedButtons: function() {
}
});
return selected;
},
/**
* @method getSelectedValues
* @description Returns the values of all Y.Button instances that are selected
* @public
*/
getSelectedValues: function() {
selected = this.getSelectedButtons();
});
return values;
},
/**
* @method addButton
* @description Assigns a Y.Button instance to this group
* @public
*/
if (type === 'checkbox') {
}
else if (type === 'radio') {
}
},
/**
* @method _onButtonClick
* @description Triggered when a button is clicked and this is a radio group
* @protected
*/
_onRadioButtonClick: function(e) {
var clickedButton = e.target;
var selectedButtons = this.getSelectedButtons();
});
// Fire change event
this.fire('selectionChange');
}
else {
// TODO: anything?
}
},
/**
* @method _onButtonClick
* @description Triggered when a button is clicked and this is a checkbox group
* @protected
*/
_onCBButtonClick: function(e) {
// Fire change event
this.fire('selectionChange');
}
}, {
/**
* Array of attributes
*
* @property ATTRS
* @type {Array}
* @private
* @static
*/
ATTRS: {
type: {
writeOnce: 'initOnly',
value: 'radio'
}
}
});
// -- Static Properties ----------------------------------------------------------
/**
* Name of this component.
*
* @property NAME
* @type String
* @static
*/
// Export ButtonGroup
Y.ButtonGroup = ButtonGroup;