From 8172f00941967ff7bab3b9999cc4fa7489be5d71 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 4 Jan 2020 00:51:43 -0500 Subject: [PATCH] Fix loading of reports and timelines Regression from df40ee72 --- chrome/content/zotero/reportInterface.js | 8 ++++---- chrome/content/zotero/timelineInterface.js | 2 +- chrome/content/zotero/zoteroPane.js | 4 ++-- chrome/content/zotero/zoteroPane.xul | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/chrome/content/zotero/reportInterface.js b/chrome/content/zotero/reportInterface.js index 16147af0e6..bcb9542288 100644 --- a/chrome/content/zotero/reportInterface.js +++ b/chrome/content/zotero/reportInterface.js @@ -28,7 +28,7 @@ var Zotero_Report_Interface = new function() { /* * Load a report for the currently selected collection */ - this.loadCollectionReport = function (event) { + this.loadCollectionReport = function () { var sortColumn = ZoteroPane_Local.getSortField(); var sortDirection = ZoteroPane_Local.getSortDirection(); var queryString = '?sort=' + sortColumn @@ -55,14 +55,14 @@ var Zotero_Report_Interface = new function() { url += '/items' + queryString; - ZoteroPane_Local.loadURI(url, event); + Zotero.openInViewer(url); } /* * Load a report for the currently selected items */ - this.loadItemReport = function (event) { + this.loadItemReport = function () { var libraryID = ZoteroPane_Local.getSelectedLibraryID(); var items = ZoteroPane_Local.getSelectedItems(); @@ -72,6 +72,6 @@ var Zotero_Report_Interface = new function() { var url = 'zotero://report/' + Zotero.API.getLibraryPrefix(libraryID) + '/items' + '?itemKey=' + items.map(item => item.key).join(','); - ZoteroPane_Local.loadURI(url, event); + Zotero.openInViewer(url); } } diff --git a/chrome/content/zotero/timelineInterface.js b/chrome/content/zotero/timelineInterface.js index d2a6151e4d..6352b3c159 100644 --- a/chrome/content/zotero/timelineInterface.js +++ b/chrome/content/zotero/timelineInterface.js @@ -47,6 +47,6 @@ var Zotero_Timeline_Interface = new function() { } } } - ZoteroPane_Local.loadURI(uri); + Zotero.openInViewer(uri); } } diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 31f49a406a..a4a518493b 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -2422,7 +2422,7 @@ var ZoteroPane = new function() }, { id: "loadReport", - oncommand: event => Zotero_Report_Interface.loadCollectionReport(event) + oncommand: () => Zotero_Report_Interface.loadCollectionReport() }, { id: "emptyTrash", @@ -3287,7 +3287,7 @@ var ZoteroPane = new function() } } - this.launchURL(uri); + Zotero.launchURL(uri); } } diff --git a/chrome/content/zotero/zoteroPane.xul b/chrome/content/zotero/zoteroPane.xul index 141059d2b7..e9a501ebcd 100644 --- a/chrome/content/zotero/zoteroPane.xul +++ b/chrome/content/zotero/zoteroPane.xul @@ -276,7 +276,7 @@ - +