From f161b1afb8972065261934aa407517d957db7dc7 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 28 Feb 2007 11:33:08 +0000 Subject: [PATCH] Closes #359, Ability to store Zotero directory outside of Firefox profile directory Customizable in the preferences Also improves handling of Zotero startup errors, adding the ability to customize the tooltiptext of the status bar error icon and to have ZoteroPane.toggleDisplay() run a customizable error function (it no longer opens an empty and broken Zotero pane). For example, a missing Z directory now prompts the user to locate the directory. Various code parts now check for the Zotero object and Zotero.initialized before trying to do stuff, which should cut down on redundant error lines in the console and generally make things cleaner. Refs #542, Better icons for preferences window -- need icon for Advanced prefpane --- chrome/content/zotero/itemPane.js | 8 +- chrome/content/zotero/overlay.js | 31 +++- chrome/content/zotero/overlay.xul | 19 +- chrome/content/zotero/preferences.js | 69 ++++++++ chrome/content/zotero/preferences.xul | 22 +++ chrome/content/zotero/xpcom/zotero.js | 172 +++++++++++++++++-- chrome/locale/en-US/zotero/preferences.dtd | 17 +- chrome/locale/en-US/zotero/zotero.properties | 13 +- chrome/skin/default/zotero/preferences.css | 18 +- defaults/preferences/zotero.js | 3 + 10 files changed, 347 insertions(+), 25 deletions(-) diff --git a/chrome/content/zotero/itemPane.js b/chrome/content/zotero/itemPane.js index d3d1e9e082..c5bd5d3934 100644 --- a/chrome/content/zotero/itemPane.js +++ b/chrome/content/zotero/itemPane.js @@ -82,12 +82,16 @@ var ZoteroItemPane = new function() function onLoad() { + if (!Zotero || !Zotero.initialized) { + return; + } + _tabs = document.getElementById('zotero-view-tabs'); // Not in item pane, so skip the introductions if (!_tabs) { - return false; + return; } _dynamicFields = document.getElementById('zotero-editpane-dynamic-fields'); @@ -104,8 +108,6 @@ var ZoteroItemPane = new function() for(var i = 0; i @@ -350,7 +361,7 @@ oncommand="ZoteroPane.toggleDisplay();" label="Zotero" key="key_openZotero"/> - +