Index: chrome/browser/resources/options/import_data_overlay.js |
diff --git a/chrome/browser/resources/options/import_data_overlay.js b/chrome/browser/resources/options/import_data_overlay.js |
index 600c9fa89b86771285d54a8b8d55779bd1d8caa0..02d2587f5ffe3861ca817baf935b7327a2395042 100644 |
--- a/chrome/browser/resources/options/import_data_overlay.js |
+++ b/chrome/browser/resources/options/import_data_overlay.js |
@@ -75,9 +75,16 @@ cr.define('options', function() { |
*/ |
validateCommitButton_: function() { |
var somethingToImport = |
- $('import-history').checked || $('import-favorites').checked || |
- $('import-passwords').checked || $('import-search').checked || |
- $('import-autofill-form-data').checked; |
+ ($('import-history-with-label').style.display != 'none' && |
Dan Beam
2014/10/07 17:05:15
i think asking the checkbox itself if it's > 0 wid
Gaja
2014/10/08 04:50:07
I tried using '$(id).offsetWidth > 0', but during
Gaja
2014/10/08 05:02:48
So, falling back to previous check, i.e $(id).styl
Dan Beam
2014/10/08 21:36:23
well, if the markup ever changes or these checkbox
Gaja
2014/10/10 05:19:30
Done. Adding '-with-label' to 'el' and then passin
|
+ $('import-history').checked) || |
+ ($('import-favorites-with-label').style.display != 'none' && |
+ $('import-favorites').checked) || |
+ ($('import-passwords-with-label').style.display != 'none' && |
+ $('import-passwords').checked) || |
+ ($('import-search-with-label').style.display != 'none' && |
+ $('import-search').checked) || |
+ ($('import-autofill-form-data-with-label').style.display != 'none' && |
+ $('import-autofill-form-data').checked); |
Dan Beam
2014/10/07 17:05:15
helper function?
function importable(type) {
Gaja
2014/10/08 04:50:07
Done. Thanks for the snippet.
|
$('import-data-commit').disabled = !somethingToImport; |
$('import-choose-file').disabled = !$('import-favorites').checked; |
}, |