You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my menu bar I would like to hide/show certain buttons based on the overall status of fhem. E.g. if a battery is low, I would like to see a red icon whereas for all batteries ok, a green check-icon would be desired.
However, this approach did not work, as only the classchanger-div gets the "hide" added as class attribute. I tried modifiying the children-attribues as well in widget-classchanger.js in function update() and this seems to work ok but I have not yet tested other cases.
if (value == elem.data('get-on')) {
elem.removeClass(elem.data('off-class'));
elem.addClass(elem.data('on-class'));
// modify children as well
elem.children().removeClass(elem.data('off-class'));
elem.children().addClass(elem.data('on-class'));
} else {
elem.removeClass(elem.data('on-class'));
elem.addClass(elem.data('off-class'));
// modify children as well
elem.children().removeClass(elem.data('on-class'));
elem.children().addClass(elem.data('off-class'));
}
The text was updated successfully, but these errors were encountered:
In my menu bar I would like to hide/show certain buttons based on the overall status of fhem. E.g. if a battery is low, I would like to see a red icon whereas for all batteries ok, a green check-icon would be desired.
I have setup my menu.html as follows:
However, this approach did not work, as only the classchanger-div gets the "hide" added as class attribute. I tried modifiying the children-attribues as well in widget-classchanger.js in function update() and this seems to work ok but I have not yet tested other cases.
The text was updated successfully, but these errors were encountered: