Projects:Alert icon dynamic/Technical Documentation
Change alert icon dynamically - Technical Documentation
VerticalMenu.html
The number of alerts is print by a Javascript function, in this function can be added the check for change the alert icon.
function callback() { ... if(parseFloat(strText) == 0 && document.getElementById("alertImage").className.indexOf("Menu_ToolBar_Button_Icon_alertActive") != -1) setAlertIcon(false); else if(parseFloat(strText) != 0 && document.getElementById("alertImage").className.indexOf("Menu_ToolBar_Button_Icon_alertActive") == -1) setAlertIcon(true); ... }
appStatus.js
In this file is necessary to create the function to change the alert icon image, the icon is changed by changing the class attribute.
function setAlertIcon(value) { if (value==true) changeClass("alertImage", "Menu_ToolBar_Button_Icon_alert", "Menu_ToolBar_Button_Icon_alertActive"); if (value==false) changeClass("alertImage", "Menu_ToolBar_Button_Icon_alertActive", "Menu_ToolBar_Button_Icon_alert"); return true; }