Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7720)

Unified Diff: chrome/browser/sync/resources/configure.html

Issue 4355001: When checking "sync everything", only check the other boxes which are visible... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/resources/configure.html
===================================================================
--- chrome/browser/sync/resources/configure.html (revision 64650)
+++ chrome/browser/sync/resources/configure.html (working copy)
@@ -187,18 +187,22 @@
setChooseDataTypesCheckboxes(args);
setEncryptionCheckboxes(args);
setErrorState(args);
- }
-
- function checkAllDataTypeCheckboxes() {
- var checkboxes = document.getElementsByName("dataTypeCheckbox");
- for (var i = 0; i < checkboxes.length; i++) {
- checkboxes[i].checked = true;
- }
- }
-
- function setCheckboxesToKeepEverythingSynced(value) {
- setDataTypeCheckboxesEnabled(!value);
- if (value)
+ }
+
+ function checkAllDataTypeCheckboxes() {
+ var checkboxes = document.getElementsByName("dataTypeCheckbox");
+ for (var i = 0; i < checkboxes.length; i++) {
+ // Only check the visible ones (since there's no way to uncheck
+ // the invisible ones).
+ if (checkboxes[i].parentElement.className == "sync-item-show") {
+ checkboxes[i].checked = true;
+ }
+ }
+ }
+
+ function setCheckboxesToKeepEverythingSynced(value) {
+ setDataTypeCheckboxesEnabled(!value);
+ if (value)
checkAllDataTypeCheckboxes();
}
@@ -302,7 +306,8 @@
var atLeastOneChecked = false;
var atLeastOneEnabled = false;
for (var i = 0; i < checkboxes.length; i++) {
- if (!checkboxes[i].disabled && checkboxes[i].style.display != 'none') {
+ if (!checkboxes[i].disabled &&
+ checkboxes[i].parentElement.className == "sync-item-show") {
atLeastOneEnabled = true;
if (checkboxes[i].checked) {
atLeastOneChecked = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698