| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |