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

Side by Side Diff: lib/ui.js

Issue 29329884: Issue 3224 - Unbreak filter assistant (Closed)
Patch Set: Created Nov. 9, 2015, 1:45 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/requestNotifier.js ('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 <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 * version of the page can be selected. 739 * version of the page can be selected.
740 */ 740 */
741 loadDocLink: function(/**String*/ linkID, /**Window*/ window) 741 loadDocLink: function(/**String*/ linkID, /**Window*/ window)
742 { 742 {
743 let link = Utils.getDocLink(linkID); 743 let link = Utils.getDocLink(linkID);
744 this.loadInBrowser(link, window); 744 this.loadInBrowser(link, window);
745 }, 745 },
746 746
747 747
748 /** 748 /**
749 * Brings up the filter composer dialog to block an item. 749 * Brings up the filter composer dialog to block an item. The optional nodesID
750 * parameter must be a unique ID returned by
751 * RequestNotifier.storeNodesForEntry() or similar.
750 */ 752 */
751 blockItem: function(/**Window*/ window, /**Node*/ node, /**RequestEntry*/ item ) 753 blockItem: function(/**Window*/ window, /**string*/ nodesID, /**RequestEntry*/ item)
752 { 754 {
753 if (!item) 755 if (!item)
754 return; 756 return;
755 757
756 window.openDialog("chrome://adblockplus/content/ui/composer.xul", "_blank", "chrome,centerscreen,resizable,dialog=no,dependent", [node], item); 758 window.openDialog("chrome://adblockplus/content/ui/composer.xul", "_blank",
759 "chrome,centerscreen,resizable,dialog=no,dependent", nodesID, item);
757 }, 760 },
758 761
759 /** 762 /**
760 * Opens filter preferences dialog or focuses an already open dialog. 763 * Opens filter preferences dialog or focuses an already open dialog.
761 * @param {Filter} [filter] filter to be selected 764 * @param {Filter} [filter] filter to be selected
762 */ 765 */
763 openFiltersDialog: function(filter) 766 openFiltersDialog: function(filter)
764 { 767 {
765 let existing = Services.wm.getMostRecentWindow("abp:filters"); 768 let existing = Services.wm.getMostRecentWindow("abp:filters");
766 if (existing) 769 if (existing)
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1940 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)], 1943 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)],
1941 ["abp-command-toggleshownotifications", "command", Notification.toggleIgnoreCa tegory.bind(Notification, "*", null)] 1944 ["abp-command-toggleshownotifications", "command", Notification.toggleIgnoreCa tegory.bind(Notification, "*", null)]
1942 ]; 1945 ];
1943 1946
1944 onShutdown.add(function() 1947 onShutdown.add(function()
1945 { 1948 {
1946 for (let window of UI.applicationWindows) 1949 for (let window of UI.applicationWindows)
1947 if (UI.isBottombarOpen(window)) 1950 if (UI.isBottombarOpen(window))
1948 UI.toggleBottombar(window); 1951 UI.toggleBottombar(window);
1949 }); 1952 });
OLDNEW
« no previous file with comments | « lib/requestNotifier.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld