123504 - menuitem/tooltip conflict. r/sr=hewitt

This commit is contained in:
blakeross%telocity.com 2006-07-29 05:40:10 +00:00
parent 67abf4ee30
commit dd8895cb0b
2 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,8 @@ function toggleOfflineStatus()
function setOfflineUI(offline)
{
var broadcaster = document.getElementById("Communicator:WorkMode");
if (!broadcaster) return;
var panel = document.getElementById("offline-status");
if (!broadcaster || !panel) return;
//Checking for a preference "network.online", if it's locked, disabling
// network icon and menu item
@ -98,13 +99,13 @@ function setOfflineUI(offline)
if (offline)
{
broadcaster.setAttribute("offline", "true");
broadcaster.setAttribute("tooltiptext", bundle.GetStringFromName("offlineTooltip"));
panel.setAttribute("tooltiptext", bundle.GetStringFromName("offlineTooltip"));
broadcaster.setAttribute("label", bundle.GetStringFromName("goonline"));
}
else
{
broadcaster.removeAttribute("offline");
broadcaster.setAttribute("tooltiptext", bundle.GetStringFromName("onlineTooltip"));
panel.setAttribute("tooltiptext", bundle.GetStringFromName("onlineTooltip"));
broadcaster.setAttribute("label", bundle.GetStringFromName("gooffline"));
}
}

View File

@ -29,7 +29,6 @@
oncommand="toggleOfflineStatus();"/>
<statusbarpanel id="offline-status"
tooltip="aTooltip"
observes="Communicator:WorkMode"/>
<menuitem id="offlineGoOfflineCmd"