diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js index 76b035536..7a02860dd 100644 --- a/chrome/content/zotero/standalone/standalone.js +++ b/chrome/content/zotero/standalone/standalone.js @@ -99,6 +99,21 @@ var ZoteroStandalone = new function() } } + /** + * Opens a URL in the basic viewer + */ + this.openInViewer = function(uri) { + var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] + .getService(Components.interfaces.nsIWindowMediator); + var win = wm.getMostRecentWindow("zotero:basicViewer"); + if(win) { + win.loadURI(uri); + } else { + window.openDialog("chrome://zotero/content/standalone/basicViewer.xul", + "basicViewer", "chrome,resizable,centerscreen", uri); + } + } + /** * Handles help menu requests */ diff --git a/chrome/content/zotero/standalone/standalone.xul b/chrome/content/zotero/standalone/standalone.xul index cf2532f24..be8b44778 100644 --- a/chrome/content/zotero/standalone/standalone.xul +++ b/chrome/content/zotero/standalone/standalone.xul @@ -168,6 +168,9 @@ command="cmd_zotero_createTimeline"/> + + diff --git a/chrome/locale/en-US/zotero/standalone/standalone.dtd b/chrome/locale/en-US/zotero/standalone/standalone.dtd index 7a6ef84a5..5746b2a5e 100644 --- a/chrome/locale/en-US/zotero/standalone/standalone.dtd +++ b/chrome/locale/en-US/zotero/standalone/standalone.dtd @@ -63,6 +63,7 @@ +