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

Delta Between Two Patch Sets: options.js

Issue 29339231: Issue 3882 - Make checkbox labels sensitive on the option page (Closed)
Left Patch Set: Created March 31, 2016, 4:39 p.m.
Right Patch Set: Use <label> more consistently Created April 1, 2016, 1:33 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « options.html ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 listItem.appendChild(document.importNode(template.content, true)); 86 listItem.appendChild(document.importNode(template.content, true));
87 listItem.setAttribute("data-access", item.url || item.text); 87 listItem.setAttribute("data-access", item.url || item.text);
88 88
89 var labelId = "label-" + (++maxLabelId); 89 var labelId = "label-" + (++maxLabelId);
90 var label = listItem.querySelector(".display"); 90 var label = listItem.querySelector(".display");
91 label.setAttribute("id", labelId); 91 label.setAttribute("id", labelId);
92 92
93 var control = listItem.querySelector(".control"); 93 var control = listItem.querySelector(".control");
94 if (control) 94 if (control)
95 { 95 {
96 control.setAttribute("aria-labelledby", labelId); 96 control.setAttribute("aria-labelledby", labelId);
Thomas Greiner 2016/03/31 16:54:37 Since we no longer need to prevent the control fro
Sebastian Noack 2016/03/31 17:18:12 I briefly tried that but it somehow breaks the sur
97 control.addEventListener("click", this.details[j].onClick, false); 97 control.addEventListener("click", this.details[j].onClick, false);
98 98
99 if (label.localName == "label") 99 var role = control.getAttribute("role");
100 if (role == "checkbox" && !label.hasAttribute("data-action"))
100 { 101 {
101 var controlId = "control-" + maxLabelId; 102 var controlId = "control-" + maxLabelId;
102 control.setAttribute("id", controlId); 103 control.setAttribute("id", controlId);
103 label.setAttribute("for", controlId); 104 label.setAttribute("for", controlId);
104 } 105 }
105 } 106 }
106 107
107 this._setEmpty(table, null); 108 this._setEmpty(table, null);
108 if (table.hasChildNodes()) 109 if (table.hasChildNodes())
109 { 110 {
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 }); 1144 });
1144 ext.backgroundPage.sendMessage( 1145 ext.backgroundPage.sendMessage(
1145 { 1146 {
1146 type: "subscriptions.listen", 1147 type: "subscriptions.listen",
1147 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1148 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1148 "title"] 1149 "title"]
1149 }); 1150 });
1150 1151
1151 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1152 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1152 })(); 1153 })();
LEFTRIGHT
« options.html ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld