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

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

Issue 660623002: options: fix "Import" button for idle options pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: estade@ review Created 6 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/resources/options/pref_ui.js » ('j') | 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 Page = cr.ui.pageManager.Page; 6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager; 7 var PageManager = cr.ui.pageManager.PageManager;
8 8
9 /** 9 /**
10 * ImportDataOverlay class 10 * ImportDataOverlay class
(...skipping 14 matching lines...) Expand all
25 __proto__: Page.prototype, 25 __proto__: Page.prototype,
26 26
27 /** @override */ 27 /** @override */
28 initializePage: function() { 28 initializePage: function() {
29 Page.prototype.initializePage.call(this); 29 Page.prototype.initializePage.call(this);
30 30
31 var self = this; 31 var self = this;
32 var checkboxes = 32 var checkboxes =
33 document.querySelectorAll('#import-checkboxes input[type=checkbox]'); 33 document.querySelectorAll('#import-checkboxes input[type=checkbox]');
34 for (var i = 0; i < checkboxes.length; i++) { 34 for (var i = 0; i < checkboxes.length; i++) {
35 checkboxes[i].onchange = function() { 35 checkboxes[i].customPrefChangeHandler = function(e) {
36 options.PrefCheckbox.prototype.defaultPrefChangeHandler.call(this, e);
36 self.validateCommitButton_(); 37 self.validateCommitButton_();
38 return true;
37 }; 39 };
38 } 40 }
39 41
40 $('import-browsers').onchange = function() { 42 $('import-browsers').onchange = function() {
41 self.updateCheckboxes_(); 43 self.updateCheckboxes_();
42 self.validateCommitButton_(); 44 self.validateCommitButton_();
43 self.updateBottomBar_(); 45 self.updateBottomBar_();
44 }; 46 };
45 47
46 $('import-data-commit').onclick = function() { 48 $('import-data-commit').onclick = function() {
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 ImportDataOverlay.getInstance().validateCommitButton_(); 272 ImportDataOverlay.getInstance().validateCommitButton_();
271 273
272 PageManager.showPageByName('importData'); 274 PageManager.showPageByName('importData');
273 }; 275 };
274 276
275 // Export 277 // Export
276 return { 278 return {
277 ImportDataOverlay: ImportDataOverlay 279 ImportDataOverlay: ImportDataOverlay
278 }; 280 };
279 }); 281 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/pref_ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698