From 99690742f904be13c1bacb27f8190a75e6e4d24d Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sun, 28 Mar 2010 07:21:17 +0000 Subject: [PATCH] support for standalone Zotero --- chrome/content/zotero/browser.js | 6 +- chrome/content/zotero/overlay.js | 5 + chrome/content/zotero/overlay.xul | 82 ++++---- chrome/content/zotero/standalone.xul | 221 ++++++++++++++++++++++ chrome/content/zotero/xpcom/schema.js | 15 +- chrome/content/zotero/xpcom/zotero.js | 54 ++++-- chrome/locale/en-US/zotero/standalone.dtd | 80 ++++++++ 7 files changed, 388 insertions(+), 75 deletions(-) create mode 100644 chrome/content/zotero/standalone.xul create mode 100644 chrome/locale/en-US/zotero/standalone.dtd diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js index e9159e1689..86d65b173a 100644 --- a/chrome/content/zotero/browser.js +++ b/chrome/content/zotero/browser.js @@ -302,11 +302,11 @@ var Zotero_Browser = new function() { var reset = document.getElementById('cmd_fullZoomReset'); } - reduce.addEventListener("command", + if(reduce) reduce.addEventListener("command", function(e) { Zotero_Browser.resize(e) }, false); - enlarge.addEventListener("command", + if(enlarge) enlarge.addEventListener("command", function(e) { Zotero_Browser.resize(e) }, false); - reset.addEventListener("command", + if(reset) reset.addEventListener("command", function(e) { Zotero_Browser.resize(e) }, false); } diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index c154bc1338..87ba97bb95 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -218,6 +218,11 @@ var ZoteroPane = new function() document.getElementById("zotero-tb-search-label").hidden = false; document.getElementById("zotero-tb-search").setAttribute("type", "conditional-timed"); } + + if(Zotero.isStandalone) { + this.toggleDisplay(); + this.fullScreen(true); + } } diff --git a/chrome/content/zotero/overlay.xul b/chrome/content/zotero/overlay.xul index d7af99ae5b..2f8958a9bc 100644 --- a/chrome/content/zotero/overlay.xul +++ b/chrome/content/zotero/overlay.xul @@ -475,49 +475,51 @@ + + + + + +%globalDTD; + +%globalRegionDTD; + +%charsetDTD; + +%textcontextDTD; + +%standaloneDTD; +]> + + +