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

Unified Diff: chrome/content/ui/sidebar.js

Issue 29329884: Issue 3224 - Unbreak filter assistant (Closed)
Patch Set: Rebased Created Nov. 12, 2015, 3:10 p.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
Index: chrome/content/ui/sidebar.js
===================================================================
--- a/chrome/content/ui/sidebar.js
+++ b/chrome/content/ui/sidebar.js
@@ -494,17 +494,23 @@ function doBlock() {
var item = treeView.getSelectedItem();
if (!item || item.type == "ELEMHIDE")
return;
var filter = getFilter(item);
if (filter && !filter.disabled && filter instanceof WhitelistFilter)
return;
- openDialog("chrome://adblockplus/content/ui/composer.xul", "_blank", "chrome,centerscreen,resizable,dialog=no,dependent", item.nodes, item.orig);
+ if (requestNotifier)
+ {
+ requestNotifier.storeNodesForEntries(item.ids, (nodesID) =>
+ {
+ UI.blockItem(window, nodesID, item.orig);
+ });
+ }
}
function editFilter()
{
var item = treeView.getSelectedItem();
if (treeView.data && !treeView.data.length)
item = treeView.getDummyTooltip();
@@ -1102,17 +1108,17 @@ var treeView = {
existing.ids.push(item.id);
this.invalidateItem(existing);
return;
}
// Add new item to the list
// Store original item in orig property - reading out prototype is messed up in Gecko 1.9.2
- item = {__proto__: item, orig: item, nodes: [], ids: [item.id]};
+ item = {__proto__: item, orig: item, ids: [item.id]};
this.allData.push(item);
this.dataMap[key] = item;
// Show disabled filters if no other filter applies
if (!item.filter)
{
let disabledMatch = disabledMatcher.matchesAny(item.location, RegExpFilter.typeMap[item.type], item.docDomain, item.thirdParty);
if (disabledMatch)

Powered by Google App Engine
This is Rietveld