| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 if (state) { | 159 if (state) { |
| 160 var checkboxes = | 160 var checkboxes = |
| 161 document.querySelectorAll('#import-checkboxes input[type=checkbox]'); | 161 document.querySelectorAll('#import-checkboxes input[type=checkbox]'); |
| 162 for (var i = 0; i < checkboxes.length; i++) { | 162 for (var i = 0; i < checkboxes.length; i++) { |
| 163 checkboxes[i].disabled = true; | 163 checkboxes[i].disabled = true; |
| 164 } | 164 } |
| 165 } else { | 165 } else { |
| 166 ImportDataOverlay.getInstance().updateCheckboxes_(); | 166 ImportDataOverlay.getInstance().updateCheckboxes_(); |
| 167 } | 167 } |
| 168 $('import-browsers').disabled = state; | 168 $('import-browsers').disabled = state; |
| 169 $('import-data-commit').disabled = state; | |
| 170 $('import-throbber').style.visibility = state ? "visible" : "hidden"; | 169 $('import-throbber').style.visibility = state ? "visible" : "hidden"; |
| 170 ImportDataOverlay.getInstance().validateCommitButton_(); |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 /** | 173 /** |
| 174 * Remove the import overlay from display. | 174 * Remove the import overlay from display. |
| 175 */ | 175 */ |
| 176 ImportDataOverlay.dismiss = function() { | 176 ImportDataOverlay.dismiss = function() { |
| 177 ImportDataOverlay.setImportingState(false); | 177 ImportDataOverlay.setImportingState(false); |
| 178 OptionsPage.closeOverlay(); | 178 OptionsPage.closeOverlay(); |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 // Export | 181 // Export |
| 182 return { | 182 return { |
| 183 ImportDataOverlay: ImportDataOverlay | 183 ImportDataOverlay: ImportDataOverlay |
| 184 }; | 184 }; |
| 185 }); | 185 }); |
| OLD | NEW |