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

Side by Side Diff: chrome/browser/resources/options/import_data_overlay.js

Issue 23717032: Disable "Choose file" button if "Favorites" checkbox is unchecked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 7
8 /** 8 /**
9 * ImportDataOverlay class 9 * ImportDataOverlay class
10 * Encapsulated handling of the 'Import Data' overlay page. 10 * Encapsulated handling of the 'Import Data' overlay page.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 /** 80 /**
81 * Sets the enabled and checked state of the commit button. 81 * Sets the enabled and checked state of the commit button.
82 * @private 82 * @private
83 */ 83 */
84 validateCommitButton_: function() { 84 validateCommitButton_: function() {
85 var somethingToImport = 85 var somethingToImport =
86 $('import-history').checked || $('import-favorites').checked || 86 $('import-history').checked || $('import-favorites').checked ||
87 $('import-passwords').checked || $('import-search').checked; 87 $('import-passwords').checked || $('import-search').checked;
88 $('import-data-commit').disabled = !somethingToImport; 88 $('import-data-commit').disabled = !somethingToImport;
89 $('import-choose-file').disabled = !$('import-favorites').checked;
89 }, 90 },
90 91
91 /** 92 /**
92 * Sets the enabled state of all the checkboxes and the commit button. 93 * Sets the enabled state of all the checkboxes and the commit button.
93 * @private 94 * @private
94 */ 95 */
95 setAllControlsEnabled_: function(enabled) { 96 setAllControlsEnabled_: function(enabled) {
96 var checkboxes = 97 var checkboxes =
97 document.querySelectorAll('#import-checkboxes input[type=checkbox]'); 98 document.querySelectorAll('#import-checkboxes input[type=checkbox]');
98 for (var i = 0; i < checkboxes.length; i++) 99 for (var i = 0; i < checkboxes.length; i++)
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 ImportDataOverlay.getInstance().validateCommitButton_(); 267 ImportDataOverlay.getInstance().validateCommitButton_();
267 268
268 OptionsPage.navigateToPage('importData'); 269 OptionsPage.navigateToPage('importData');
269 }; 270 };
270 271
271 // Export 272 // Export
272 return { 273 return {
273 ImportDataOverlay: ImportDataOverlay 274 ImportDataOverlay: ImportDataOverlay
274 }; 275 };
275 }); 276 });
OLDNEW
« 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