Chromium Code Reviews| 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].onchange = this.validateCommitButton_.bind(this); |
|
Evan Stade
2014/10/15 21:51:50
this is still necessary even with the new customPr
Dan Beam
2014/10/16 01:32:56
Nope. Good call (bummer I didn't see it).
| |
| 36 checkboxes[i].customPrefChangeHandler = function(e) { | |
| 37 options.PrefCheckbox.prototype.defaultPrefChangeHandler.call(this, e); | |
| 36 self.validateCommitButton_(); | 38 self.validateCommitButton_(); |
| 39 return true; | |
| 37 }; | 40 }; |
| 38 } | 41 } |
| 39 | 42 |
| 40 $('import-browsers').onchange = function() { | 43 $('import-browsers').onchange = function() { |
| 41 self.updateCheckboxes_(); | 44 self.updateCheckboxes_(); |
| 42 self.validateCommitButton_(); | 45 self.validateCommitButton_(); |
| 43 self.updateBottomBar_(); | 46 self.updateBottomBar_(); |
| 44 }; | 47 }; |
| 45 | 48 |
| 46 $('import-data-commit').onclick = function() { | 49 $('import-data-commit').onclick = function() { |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 270 ImportDataOverlay.getInstance().validateCommitButton_(); | 273 ImportDataOverlay.getInstance().validateCommitButton_(); |
| 271 | 274 |
| 272 PageManager.showPageByName('importData'); | 275 PageManager.showPageByName('importData'); |
| 273 }; | 276 }; |
| 274 | 277 |
| 275 // Export | 278 // Export |
| 276 return { | 279 return { |
| 277 ImportDataOverlay: ImportDataOverlay | 280 ImportDataOverlay: ImportDataOverlay |
| 278 }; | 281 }; |
| 279 }); | 282 }); |
| OLD | NEW |