From d35719d0e83fbafaaf95428bda090ffee7febea7 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 28 Apr 2021 23:45:48 -0400 Subject: [PATCH] Mendeley online import tweaks - Add "(online import)" and "(local import)" next to "Mendeley Referance Manager" and "Mendeley Desktop", respectively - Adjust size of OAuth window - Use bound parameter instead of string literal for Fx78 compatibility --- chrome/content/zotero/fileInterface.js | 4 ++-- chrome/content/zotero/import/importWizard.js | 4 ++++ chrome/content/zotero/import/importWizard.xul | 4 ++-- chrome/content/zotero/import/mendeley/mendeleyImport.js | 4 ++-- chrome/locale/en-US/zotero/zotero.properties | 2 ++ 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index b503f07aaa..31751fd2aa 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -901,8 +901,8 @@ var Zotero_File_Interface = new function() { }; let innerFunc = function () { browser.removeEventListener("pageshow", innerFunc); - win.outerWidth = Math.max(640, Math.min(1024, win.screen.availHeight)); - win.outerHeight = Math.max(480, Math.min(768, win.screen.availWidth)); + win.outerWidth = Math.max(640, Math.min(1000, win.screen.availHeight)); + win.outerHeight = Math.max(480, Math.min(800, win.screen.availWidth)); }; win.addEventListener("load", func); diff --git a/chrome/content/zotero/import/importWizard.js b/chrome/content/zotero/import/importWizard.js index 158372f2d0..5db6b0dbc4 100644 --- a/chrome/content/zotero/import/importWizard.js +++ b/chrome/content/zotero/import/importWizard.js @@ -40,6 +40,10 @@ var Zotero_Import_Wizard = { } // Update labels + document.getElementById('radio-import-source-mendeley-online').label + = `Mendeley Reference Manager (${Zotero.getString('import.onlineImport')})`; + document.getElementById('radio-import-source-mendeley').label + = `Mendeley Desktop (${Zotero.getString('import.localImport')})`; document.getElementById('file-handling-store').label = Zotero.getString( 'import.fileHandling.store', Zotero.appName diff --git a/chrome/content/zotero/import/importWizard.xul b/chrome/content/zotero/import/importWizard.xul index 9603f25bb6..e59b2c0693 100644 --- a/chrome/content/zotero/import/importWizard.xul +++ b/chrome/content/zotero/import/importWizard.xul @@ -21,8 +21,8 @@ onpageadvanced="Zotero_Import_Wizard.onModeChosen(); return false;"> - - diff --git a/chrome/content/zotero/import/mendeley/mendeleyImport.js b/chrome/content/zotero/import/mendeley/mendeleyImport.js index 003d84287a..3a8d7704c4 100644 --- a/chrome/content/zotero/import/mendeley/mendeleyImport.js +++ b/chrome/content/zotero/import/mendeley/mendeleyImport.js @@ -877,7 +877,7 @@ Zotero_Import_Mendeley.prototype._getGroupsAPI = async function () { Zotero_Import_Mendeley.prototype._getGroupsDB = async function () { const rows = await this._db.queryAsync( - 'SELECT id, remoteUUid, name, isOwner FROM Groups WHERE remoteUuID != ""' + "SELECT id, remoteUUid, name, isOwner FROM Groups WHERE remoteUuID != ?", [''] ); return rows; }; @@ -892,7 +892,7 @@ Zotero_Import_Mendeley.prototype._getProfileAPI = async function () { Zotero_Import_Mendeley.prototype._getProfileDB = async function () { const rows = await this._db.queryAsync( - 'SELECT uuid as id, firstName, lastName, displayName FROM Profiles ORDER BY ROWID LIMIT 1' + "SELECT uuid as id, firstName, lastName, displayName FROM Profiles ORDER BY ROWID LIMIT 1" ); return rows[0]; diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index 1c39ec23bd..2275a0ff4d 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -749,6 +749,8 @@ fileInterface.exportError = An error occurred while trying to export the selecte fileInterface.importOPML = Import Feeds from OPML fileInterface.OPMLFeedFilter = OPML Feed List +import.onlineImport = online import +import.localImport = local import import.fileHandling.store = Copy files to the %S storage folder import.fileHandling.link = Link to files in original location import.fileHandling.description = Linked files cannot be synced by %S.