Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/ui.js

Issue 5276432552951808: Some fixes related to the new Australis Firefox theme (Closed)
Patch Set: Created Nov. 20, 2013, 11:26 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chrome/skin/overlay.css ('K') | « chrome/skin/overlay.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/ui.js
===================================================================
--- a/lib/ui.js
+++ b/lib/ui.js
@@ -708,16 +708,30 @@ let UI = exports.UI =
{
let {getBrowser} = require("appSupport");
window.openDialog("chrome://adblockplus/content/ui/sendReport.xul", "_blank", "chrome,centerscreen,resizable=no", getBrowser(window).contentWindow, uri);
}
}
},
/**
+ * Closes icon's menu when a button is clicked to prevent ugly effects such
+ * as https://bugzilla.mozilla.org/show_bug.cgi?id=940693.
+ */
+ closeIconMenu: function(/**Window*/ window)
+ {
+ for each (let id in ["abp-toolbar-popup", "abp-status-popup"])
+ {
+ let element = window.document.getElementById(id);
+ if (element && element.state == "open")
+ element.hidePopup();
+ }
+ },
+
+ /**
* Opens our contribution page.
*/
openContributePage: function(/**Window*/ window)
{
this.loadDocLink("contribute", window);
},
/**
@@ -2018,17 +2032,19 @@ let eventHandlers = [
["abp-command-toggleobjtabs", "command", UI.togglePref.bind(UI, "frameobjects")],
["abp-command-togglecollapse", "command", UI.togglePref.bind(UI, "fastcollapse")],
["abp-command-togglesavestats", "command", UI.toggleSaveStats.bind(UI)],
["abp-command-togglesync", "command", UI.toggleSync.bind(UI)],
["abp-command-toggleshowintoolbar", "command", UI.toggleToolbarIcon.bind(UI)],
["abp-command-toggleshowinstatusbar", "command", UI.togglePref.bind(UI, "showinstatusbar")],
["abp-command-enable", "command", UI.togglePref.bind(UI, "enabled")],
["abp-command-contribute", "command", UI.openContributePage.bind(UI)],
- ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)]
+ ["abp-command-contribute", "command", UI.closeIconMenu.bind(UI)],
+ ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)],
+ ["abp-command-contribute-hide", "command", UI.closeIconMenu.bind(UI)]
];
onShutdown.add(function()
{
for (let window in UI.applicationWindows)
if (UI.isBottombarOpen(window))
UI.toggleBottombar(window);
});
« chrome/skin/overlay.css ('K') | « chrome/skin/overlay.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld