Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(396)

Unified Diff: chrome/browser/resources/options/import_data_overlay.js

Issue 22332003: Add option to import from bookmarks html file to "Import Bookmarks..." dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm debug code Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
},

Powered by Google App Engine
This is Rietveld 408576698