diff --git a/chrome/content/zotero/import/importWizard.js b/chrome/content/zotero/import/importWizard.js
index cd45adcb2c..c7331d44fa 100644
--- a/chrome/content/zotero/import/importWizard.js
+++ b/chrome/content/zotero/import/importWizard.js
@@ -57,14 +57,38 @@ var Zotero_Import_Wizard = {
},
+ /**
+ * When a file is clicked on in the file list
+ */
onFileSelected: async function () {
this._wizard.canAdvance = true;
},
+ /**
+ * When the user clicks "Other…" to choose a file not in the list
+ */
+ chooseMendeleyDB: async function () {
+ const nsIFilePicker = Components.interfaces.nsIFilePicker;
+ var fp = Components.classes["@mozilla.org/filepicker;1"]
+ .createInstance(nsIFilePicker);
+ fp.init(window, Zotero.getString('fileInterface.import'), nsIFilePicker.modeOpen);
+ fp.appendFilter("Mendeley Database", "*.sqlite"); // TODO: Localize
+ var rv = fp.show();
+ if (rv != nsIFilePicker.returnOK) {
+ return false;
+ }
+ this._file = fp.file.path;
+ this._wizard.canAdvance = true;
+ this._wizard.advance();
+ },
+
+
onFileChosen: async function () {
- var index = document.getElementById('file-list').selectedIndex;
- this._file = this._dbs[index].path;
+ if (!this._file) {
+ let index = document.getElementById('file-list').selectedIndex;
+ this._file = this._dbs[index].path;
+ }
this._disableCancel();
this._wizard.canRewind = false;
this._wizard.canAdvance = false;
diff --git a/chrome/content/zotero/import/importWizard.xul b/chrome/content/zotero/import/importWizard.xul
index 6e6da62dfc..f907303651 100644
--- a/chrome/content/zotero/import/importWizard.xul
+++ b/chrome/content/zotero/import/importWizard.xul
@@ -42,6 +42,9 @@
+
+
+
+
diff --git a/chrome/skin/default/zotero/importWizard.css b/chrome/skin/default/zotero/importWizard.css
index 308fe0d420..98869f3e27 100644
--- a/chrome/skin/default/zotero/importWizard.css
+++ b/chrome/skin/default/zotero/importWizard.css
@@ -37,8 +37,11 @@ listbox, #result-description {
font-size: 13px;
}
+button {
+ font-size: 13px;
+}
+
#result-report-error {
margin-top: 13px;
margin-left: 0;
- font-size: 13px;
}