Chromium Code Reviews| 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 ba7949c8287ede646bc78ec94f99a50db94c9481..7157cfb1ab099c8e6398ea21882bbc7cb8d77780 100644 |
| --- a/chrome/browser/resources/options/import_data_overlay.js |
| +++ b/chrome/browser/resources/options/import_data_overlay.js |
| @@ -57,6 +57,10 @@ cr.define('options', function() { |
| ImportDataOverlay.dismiss(); |
| }; |
| + $('import-choose-file').onclick = function() { |
| + chrome.send('chooseBookmarksFile'); |
| + }; |
| + |
| $('import-data-show-bookmarks-bar').onchange = function() { |
| // Note: The callback 'toggleShowBookmarksBar' is handled within the |
| // browser options handler -- rather than the import data handler -- |
| @@ -111,6 +115,10 @@ cr.define('options', function() { |
| */ |
| updateCheckboxes_: function() { |
| var index = $('import-browsers').selectedIndex; |
| + var bookmarksFileSelected = (index == this.browserProfiles.length - 1); |
|
Dan Beam
2013/08/08 05:34:00
nit: remove extra ()
tfarina
2013/08/10 15:05:39
Done.
|
| + $('import-choose-file').hidden = !bookmarksFileSelected; |
| + $('import-data-commit').hidden = bookmarksFileSelected; |
| + |
| var browserProfile; |
| if (this.browserProfiles.length > index) |
| browserProfile = this.browserProfiles[index]; |
| @@ -118,6 +126,7 @@ cr.define('options', function() { |
| for (var i = 0; i < importOptions.length; i++) { |
| var checkbox = $('import-' + importOptions[i]); |
| var enable = browserProfile && browserProfile[importOptions[i]]; |
| + checkbox.checked = enable; |
| this.setUpCheckboxState_(checkbox, enable); |
| } |
| }, |