mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 17:59:34 +00:00
Bug 220626 - Enable keyboard access to Blocked Popups notification bar. r=mconnor,a=mkaply
This commit is contained in:
parent
479cc410ea
commit
271626f6de
@ -218,12 +218,14 @@ const gPopupBlockerObserver = {
|
||||
var brandShortName = brandBundle.getString("brandShortName");
|
||||
var message;
|
||||
var popupCount = gBrowser.selectedBrowser.pageReport.length;
|
||||
var popupButtonText = bundle_browser.getString("popupWarningButton");
|
||||
if (popupCount > 1)
|
||||
message = bundle_browser.getFormattedString("popupWarningMultiple", [brandShortName, popupCount]);
|
||||
else
|
||||
message = bundle_browser.getFormattedString("popupWarning", [brandShortName]);
|
||||
|
||||
gBrowser.showMessage(gBrowser.selectedBrowser, "chrome://browser/skin/Info.png",
|
||||
message, "", null, null, "blockedPopupOptions", "top", true);
|
||||
message, popupButtonText, null, null, "blockedPopupOptions", "top", true);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -68,8 +68,9 @@ xpinstallDisabledWarning=Software installation is currently disabled. Click Edit
|
||||
xpinstallDisabledWarningButton=Edit Options...
|
||||
themeWarning=To protect your computer, %S prevented this site (%S) from installing themes.
|
||||
themeWarningButton=Edit Options...
|
||||
popupWarning=%S prevented this site from opening a popup window. Click here for options...
|
||||
popupWarningMultiple=%S prevented this site from opening %S popup windows. Click here for options...
|
||||
popupWarning=%S prevented this site from opening a popup window.
|
||||
popupWarningMultiple=%S prevented this site from opening %S popup windows.
|
||||
popupWarningButton=Options
|
||||
popupAllow=Allow popups for %S
|
||||
popupBlock=Block popups for %S
|
||||
popupWarningDontShowFromMessage=Don't show this message when popups are blocked
|
||||
|
@ -886,7 +886,7 @@
|
||||
|
||||
<binding id="browsermessage" extends="xul:hbox">
|
||||
<content align="center">
|
||||
<xul:hbox anonid="messagePopupContainer" align="center" flex="1">
|
||||
<xul:hbox align="center" flex="1">
|
||||
<xul:image anonid="messageImage" class="messageImage"/>
|
||||
<xul:description anonid="messageText" class="messageText" flex="1"/>
|
||||
</xul:hbox>
|
||||
@ -935,19 +935,30 @@
|
||||
<field name="source">
|
||||
"";
|
||||
</field>
|
||||
|
||||
<field name="_popup">
|
||||
"";
|
||||
</field>
|
||||
<property name="popup">
|
||||
<setter>
|
||||
<![CDATA[
|
||||
if (val)
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "messagePopupContainer").setAttribute("popup", val);
|
||||
else
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "messagePopupContainer").removeAttribute("popup");
|
||||
this._popup = val;
|
||||
|
||||
// store scope
|
||||
var myThis = this;
|
||||
var lambda = function (event) {myThis.showPopup(event);}
|
||||
|
||||
if (val) {
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "messageButton").addEventListener("command", lambda, false);
|
||||
} else {
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "messageButton").removeEventListener("command", lambda, false);
|
||||
}
|
||||
return val;
|
||||
]]>
|
||||
</setter>
|
||||
<getter>
|
||||
<![CDATA[
|
||||
return document.getAnonymousElementByAttribute(this, "anonid", "messagePopupContainer").getAttribute("popup");
|
||||
return this._popup;
|
||||
]]>
|
||||
</getter>
|
||||
</property>
|
||||
@ -1017,6 +1028,15 @@
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
<method name="showPopup">
|
||||
<parameter name="event"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
document.getElementById(this.popup).showPopup(event.originalTarget, -1, -1, "popup", "bottomleft", "topleft");
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
</implementation>
|
||||
<handlers>
|
||||
<handler event="command">
|
||||
|
Loading…
x
Reference in New Issue
Block a user