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

Unified Diff: new-options.js

Issue 29545663: Issue 5631 - do not show disabled filters in more section (Closed)
Patch Set: Created Sept. 15, 2017, 4:33 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
« no previous file with comments | « new-options.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: new-options.js
===================================================================
--- a/new-options.js
+++ b/new-options.js
@@ -352,9 +352,9 @@
emptyText: ["options_dialog_language_other_empty"]
}
]);
- collections.custom = new Collection([
+ collections.more = new Collection([
saroyanm 2017/09/15 16:38:00 I changed name from custom to more, as custom was
Thomas Greiner 2017/09/15 17:06:05 Acknowledged.
{
- id: "custom-list-table"
+ id: "more-list-table"
}
]);
collections.whitelist = new Collection([
@@ -372,12 +372,13 @@
function addSubscription(subscription)
{
+ let disabled = subscription.disabled;
let collection = null;
if (subscription.recommended)
{
if (subscription.recommended == "ads")
{
- if (subscription.disabled == false)
+ if (disabled == false)
collection = collections.langs;
collections.allLangs.addItem(subscription);
@@ -387,9 +388,9 @@
collection = collections.protection;
}
}
- else if (!isAcceptableAds(subscription.url))
+ else if (!isAcceptableAds(subscription.url) && disabled == false)
{
- collection = collections.custom;
+ collection = collections.more;
}
if (collection)
@@ -415,12 +416,12 @@
{
if (subscription.disabled == false)
{
- collections.custom.addItem(subscription);
+ collections.more.addItem(subscription);
updateTooltips();
}
else
{
- collections.custom.removeItem(subscription);
+ collections.more.removeItem(subscription);
}
}
}
@@ -1196,7 +1197,7 @@
}
else
{
- collections.custom.removeItem(subscription);
+ collections.more.removeItem(subscription);
}
}
collections.filterLists.removeItem(subscription);
« no previous file with comments | « new-options.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld