yui-ext is cool
17 Nov 2006, 11:18 AM
It appears that disabling toolbar buttons is not working in .33 RC1
in YAHOO.ext.ToolbarButton.prototype, it appears that this.el is being reset to nothing somewhere. Additionally, once you get to the mouseover event, this.disabled property is being reset to false as well.
To reproduce:
var toolBar =
{
init : function()
{
this.toolBar = new YAHOO.ext.Toolbar('divToolbar');
this.btnSave = new YAHOO.ext.ToolbarButton({text: 'Save', tooltip: 'Save Image', className: 'toolBarButtonSave'});
this.toolBar.addButton(this.btnSave);
this.btnSave.disable();
}
}
after calling toolBar.init(); The toolbar is built and renders correctly, but the button does not appear disabled and the mouseover, click etc events are still triggered.
if you check the value of toolBar.btnSave.isDisabled() after rendering, it returns true.
if you check the value of this.el in the disable function, it returns undefined.
if you check the value in the mouseover event, this.disabled = false;
I'm kind of stumped on this one.
in YAHOO.ext.ToolbarButton.prototype, it appears that this.el is being reset to nothing somewhere. Additionally, once you get to the mouseover event, this.disabled property is being reset to false as well.
To reproduce:
var toolBar =
{
init : function()
{
this.toolBar = new YAHOO.ext.Toolbar('divToolbar');
this.btnSave = new YAHOO.ext.ToolbarButton({text: 'Save', tooltip: 'Save Image', className: 'toolBarButtonSave'});
this.toolBar.addButton(this.btnSave);
this.btnSave.disable();
}
}
after calling toolBar.init(); The toolbar is built and renders correctly, but the button does not appear disabled and the mouseover, click etc events are still triggered.
if you check the value of toolBar.btnSave.isDisabled() after rendering, it returns true.
if you check the value of this.el in the disable function, it returns undefined.
if you check the value in the mouseover event, this.disabled = false;
I'm kind of stumped on this one.