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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« chrome/skin/overlay.css ('K') | « chrome/skin/overlay.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 let uri = this.getCurrentLocation(window); 706 let uri = this.getCurrentLocation(window);
707 if (uri) 707 if (uri)
708 { 708 {
709 let {getBrowser} = require("appSupport"); 709 let {getBrowser} = require("appSupport");
710 window.openDialog("chrome://adblockplus/content/ui/sendReport.xul", "_bl ank", "chrome,centerscreen,resizable=no", getBrowser(window).contentWindow, uri) ; 710 window.openDialog("chrome://adblockplus/content/ui/sendReport.xul", "_bl ank", "chrome,centerscreen,resizable=no", getBrowser(window).contentWindow, uri) ;
711 } 711 }
712 } 712 }
713 }, 713 },
714 714
715 /** 715 /**
716 * Closes icon's menu when a button is clicked to prevent ugly effects such
717 * as https://bugzilla.mozilla.org/show_bug.cgi?id=940693.
718 */
719 closeIconMenu: function(/**Window*/ window)
720 {
721 for each (let id in ["abp-toolbar-popup", "abp-status-popup"])
722 {
723 let element = window.document.getElementById(id);
724 if (element && element.state == "open")
725 element.hidePopup();
726 }
727 },
728
729 /**
716 * Opens our contribution page. 730 * Opens our contribution page.
717 */ 731 */
718 openContributePage: function(/**Window*/ window) 732 openContributePage: function(/**Window*/ window)
719 { 733 {
720 this.loadDocLink("contribute", window); 734 this.loadDocLink("contribute", window);
721 }, 735 },
722 736
723 /** 737 /**
724 * Executed on first run, adds a filter subscription and notifies that user 738 * Executed on first run, adds a filter subscription and notifies that user
725 * about that. 739 * about that.
(...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
2016 ["abp-command-togglesitewhitelist", "command", function() { UI.toggleFilter(si teWhitelist); }], 2030 ["abp-command-togglesitewhitelist", "command", function() { UI.toggleFilter(si teWhitelist); }],
2017 ["abp-command-togglepagewhitelist", "command", function() { UI.toggleFilter(pa geWhitelist); }], 2031 ["abp-command-togglepagewhitelist", "command", function() { UI.toggleFilter(pa geWhitelist); }],
2018 ["abp-command-toggleobjtabs", "command", UI.togglePref.bind(UI, "frameobjects" )], 2032 ["abp-command-toggleobjtabs", "command", UI.togglePref.bind(UI, "frameobjects" )],
2019 ["abp-command-togglecollapse", "command", UI.togglePref.bind(UI, "fastcollapse ")], 2033 ["abp-command-togglecollapse", "command", UI.togglePref.bind(UI, "fastcollapse ")],
2020 ["abp-command-togglesavestats", "command", UI.toggleSaveStats.bind(UI)], 2034 ["abp-command-togglesavestats", "command", UI.toggleSaveStats.bind(UI)],
2021 ["abp-command-togglesync", "command", UI.toggleSync.bind(UI)], 2035 ["abp-command-togglesync", "command", UI.toggleSync.bind(UI)],
2022 ["abp-command-toggleshowintoolbar", "command", UI.toggleToolbarIcon.bind(UI)], 2036 ["abp-command-toggleshowintoolbar", "command", UI.toggleToolbarIcon.bind(UI)],
2023 ["abp-command-toggleshowinstatusbar", "command", UI.togglePref.bind(UI, "showi nstatusbar")], 2037 ["abp-command-toggleshowinstatusbar", "command", UI.togglePref.bind(UI, "showi nstatusbar")],
2024 ["abp-command-enable", "command", UI.togglePref.bind(UI, "enabled")], 2038 ["abp-command-enable", "command", UI.togglePref.bind(UI, "enabled")],
2025 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], 2039 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)],
2026 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] 2040 ["abp-command-contribute", "command", UI.closeIconMenu.bind(UI)],
2041 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)],
2042 ["abp-command-contribute-hide", "command", UI.closeIconMenu.bind(UI)]
2027 ]; 2043 ];
2028 2044
2029 onShutdown.add(function() 2045 onShutdown.add(function()
2030 { 2046 {
2031 for (let window in UI.applicationWindows) 2047 for (let window in UI.applicationWindows)
2032 if (UI.isBottombarOpen(window)) 2048 if (UI.isBottombarOpen(window))
2033 UI.toggleBottombar(window); 2049 UI.toggleBottombar(window);
2034 }); 2050 });
OLDNEW
« 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