Roo.bootstrap.Radio = function(config){
Roo.bootstrap.Radio.superclass.constructor.call(this, config);
- this.addEvents({
- /**
- * @event check
- * Fires when the element is checked or unchecked.
- * @param {Roo.bootstrap.Radio} this This radio
- * @param {Boolean} checked The new checked value
- */
- check : true
- });
};
Roo.extend(Roo.bootstrap.Radio, Roo.bootstrap.Component, {
},
- onClick : function()
+ onClick : function(e)
{
- this.setChecked(true);
+ if(this.parent().fireEvent('click', this.parent(), this, e) !== false){
+ this.setChecked(true);
+ }
},
setChecked : function(state, suppressEvent)
{
- this.parent().setValue(this.value);
+ this.parent().setValue(this.value, suppressEvent);
- if(suppressEvent !== true){
- this.fireEvent('check', this, state);
- }
+ },
+
+ setBoxLabel : function(v)
+ {
+ this.boxLabel = v;
+ if(this.rendered){
+ this.el.select('label.box-label',true).first().dom.innerHTML = (v === null || v === undefined ? '' : v);
+ }
}
});