If I set disabled attribute to true for a menuPopUpItem, text appears disabled but the icon (specified through background image) has no change in style. Is there a different attribute to specify image to use when menu is disabled?
It is because it only add btl-disable class and the class only change text color to #CCC (disableElement.xml line 40). You could try to add opacity in btl-disable class for instance : .btl-menuBarItem .btl-disabled {opacity: 0.8;} but it will make the text a bit disappeared.
If you want to make the icon to be change when the menu is disabled, you could set another icon attribute value in the "DOMNodeInsertedIntoDocument" event. For example:
<e:handlerevent="DOMNodeInsertedIntoDocument"type="text/javascript">
if(this.getAttribute('disabled')=='true'){
this.setAttribute('icon','disabled-icon');// put another icon image in the disable-icon class
}
.....other code....
Disable menuPopUpItem
8 August, 2008 - 17:01 — yudiIt is because it only add btl-disable class and the class only change text color to #CCC (disableElement.xml line 40). You could try to add opacity in btl-disable class for instance : .btl-menuBarItem .btl-disabled {opacity: 0.8;} but it will make the text a bit disappeared.
If you want to make the icon to be change when the menu is disabled, you could set another icon attribute value in the "DOMNodeInsertedIntoDocument" event. For example:
if(this.getAttribute('disabled')=='true'){
this.setAttribute('icon','disabled-icon');// put another icon image in the disable-icon class
}
.....other code....
~Yudi