View source | View content page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Show collection (0 pages)
Collections help

Search

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;
}

Retrieved from "http://wiki.openbravo.com/wiki/Projects:Alert_icon_dynamic/Technical_Documentation"

This page has been accessed 2,359 times. This page was last modified on 8 June 2012, at 05:26. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.