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

Unified Diff: new-options.js

Issue 29480624: Issue 5374 - Add filter list popup (Closed)
Patch Set: Created July 7, 2017, 6:12 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: new-options.js
===================================================================
--- a/new-options.js
+++ b/new-options.js
@@ -219,8 +219,18 @@
control.setAttribute("aria-checked", item.disabled == false);
if (item.url == acceptableAdsUrl && this == collections.filterLists)
control.disabled = true;
+
+ if (this.details[i].checkedDisabled)
+ {
+ control.disabled = item.disabled == false;
+ element.setAttribute("aria-disabled", true);
+ }
}
+ let descriptionElem = element.querySelector(".description");
+ if (descriptionElem)
+ descriptionElem.textContent = item.description;
+
let dateElement = element.querySelector(".date");
let timeElement = element.querySelector(".time");
if (dateElement && timeElement)
@@ -305,6 +315,10 @@
collections.popular = new Collection([
{
id: "recommend-list-table"
+ },
+ {
+ id: "recommend-general-list-table",
+ checkedDisabled: true
}
]);
collections.langs = new Collection([
@@ -322,6 +336,10 @@
id: "all-lang-table",
emptyText: ["options_dialog_language_other_empty"],
searchable: true
+ },
+ {
+ id: "recommend-ads-list-table",
+ checkedDisabled: true
}
]);
collections.acceptableAds = new Collection([
@@ -364,7 +382,6 @@
}
else
{
- collections.allLangs.removeItem(subscription);
collections.langs.addItem(subscription);
}
}
@@ -442,13 +459,16 @@
if (prefix)
{
prefix = prefix.replace(/\W/g, "_");
- subscription.title = getMessage("options_language_" + prefix);
+ subscription.title = element.getAttribute("specialization");
+ subscription.description = getMessage("options_language_" + prefix);
saroyanm 2017/07/07 18:22:11 The strings will need to be updated after the spec
saroyanm 2017/07/13 17:09:22 Updated the reference -> https://bitbucket.org/adb
}
else
{
type = type.replace(/\W/g, "_");
- subscription.title = getMessage("common_feature_" +
+ subscription.title = getMessage("options_feature_" +
type + "_title");
+ subscription.description = getMessage("options_feature_" +
saroyanm 2017/07/07 18:22:11 I don't think that TYPE is a unique identifier for
saroyanm 2017/07/13 17:09:22 As discussed we can still use type, while we are p
+ type + "_description");
}
addSubscription(subscription);
@@ -506,7 +526,7 @@
case "add-domain-exception":
addWhitelistedDomain();
break;
- case "add-language-subscription":
+ case "add-enable-subscription":
addEnableSubscription(findParentData(element, "access", false));
break;
case "add-predefined-subscription": {

Powered by Google App Engine
This is Rietveld