зеркало из https://github.com/mozilla/pjs.git
Bug 158976 r=timeless sr=blake
`Work Offline' menu item isn't checked like in most other browsers
This commit is contained in:
Родитель
9526c6d56e
Коммит
9973336954
|
@ -78,6 +78,7 @@ function setOfflineUI(offline)
|
|||
{
|
||||
var broadcaster = document.getElementById("Communicator:WorkMode");
|
||||
var panel = document.getElementById("offline-status");
|
||||
var menuItem = document.getElementById("offlineGoOfflineCmd");
|
||||
if (!broadcaster || !panel) return;
|
||||
|
||||
//Checking for a preference "network.online", if it's locked, disabling
|
||||
|
@ -100,13 +101,15 @@ function setOfflineUI(offline)
|
|||
{
|
||||
broadcaster.setAttribute("offline", "true");
|
||||
panel.setAttribute("tooltiptext", bundle.GetStringFromName("offlineTooltip"));
|
||||
broadcaster.setAttribute("label", bundle.GetStringFromName("goonline"));
|
||||
if (menuItem)
|
||||
menuItem.setAttribute("checked", "true");
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcaster.removeAttribute("offline");
|
||||
panel.setAttribute("tooltiptext", bundle.GetStringFromName("onlineTooltip"));
|
||||
broadcaster.setAttribute("label", bundle.GetStringFromName("gooffline"));
|
||||
if (menuItem)
|
||||
broadcaster.removeAttribute("checked");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
<!-- online/offline status indicators -->
|
||||
<broadcaster id="Communicator:WorkMode"
|
||||
label="&offlineGoOfflineCmd.label;"
|
||||
type="checkbox"
|
||||
oncommand="toggleOfflineStatus();"/>
|
||||
|
||||
<statusbarpanel id="offline-status"
|
||||
|
|
|
@ -2,6 +2,3 @@
|
|||
onlineTooltip=You are online. Click the icon to go offline.
|
||||
offlineTooltip=You are offline. Click the icon to go online.
|
||||
|
||||
gooffline=Work Offline
|
||||
goonline=Work Online
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче