From 1b1af48be08651759135fd9d454ab258a777d9ed Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 31 May 2011 06:34:21 +0000 Subject: [PATCH] add Help menu items and About dialog --- .../mac/standalone/baseMenuOverlay.xul | 28 ++++++++----------- .../unix/standalone/baseMenuOverlay.xul | 24 +++++++--------- .../win/standalone/baseMenuOverlay.xul | 28 ++++++++----------- chrome/content/zotero/standalone.js | 10 +++++++ chrome/content/zotero/zoteroPane.js | 11 ++++++-- chrome/content/zotero/zoteroPane.xul | 2 +- .../zotero/standalone/baseMenuOverlay.dtd | 5 +++- 7 files changed, 58 insertions(+), 50 deletions(-) diff --git a/chrome/content/zotero-platform/mac/standalone/baseMenuOverlay.xul b/chrome/content/zotero-platform/mac/standalone/baseMenuOverlay.xul index 6dadfb47ad..45561b22c7 100644 --- a/chrome/content/zotero-platform/mac/standalone/baseMenuOverlay.xul +++ b/chrome/content/zotero-platform/mac/standalone/baseMenuOverlay.xul @@ -88,38 +88,34 @@ - + diff --git a/chrome/content/zotero-platform/unix/standalone/baseMenuOverlay.xul b/chrome/content/zotero-platform/unix/standalone/baseMenuOverlay.xul index 501fb689bf..03d36212cc 100644 --- a/chrome/content/zotero-platform/unix/standalone/baseMenuOverlay.xul +++ b/chrome/content/zotero-platform/unix/standalone/baseMenuOverlay.xul @@ -42,38 +42,34 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - + diff --git a/chrome/content/zotero-platform/win/standalone/baseMenuOverlay.xul b/chrome/content/zotero-platform/win/standalone/baseMenuOverlay.xul index b5797441bd..04ac84befc 100644 --- a/chrome/content/zotero-platform/win/standalone/baseMenuOverlay.xul +++ b/chrome/content/zotero-platform/win/standalone/baseMenuOverlay.xul @@ -42,38 +42,34 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - + diff --git a/chrome/content/zotero/standalone.js b/chrome/content/zotero/standalone.js index 94cbaae8dd..9873b3a26f 100644 --- a/chrome/content/zotero/standalone.js +++ b/chrome/content/zotero/standalone.js @@ -53,6 +53,16 @@ var ZoteroStandalone = new function() } + this.openHelp = function(type) { + if(type === "troubleshooting") { + ZoteroPane.loadURI("http://www.zotero.org/support/getting_help"); + } else if(type === "feedback") { + ZoteroPane.loadURI("http://forums.zotero.org/categories/"); + } else { + ZoteroPane.loadURI("http://www.zotero.org/support/"); + } + } + this.onUnload = function() { ZoteroPane.destroy(); } diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 38b38c927b..389b6231ea 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -204,7 +204,7 @@ var ZoteroPane = new function() // -- this way the page won't be displayed when they sync their DB to // another profile or if the DB is initialized erroneously (e.g. while // switching data directory locations) - else if (Zotero.Prefs.get('firstRun2')) { + else if (Zotero.Prefs.get('firstRun2') && !Zotero.isStandalone) { if (Zotero.Schema.dbInitialized || !Zotero.Sync.Server.enabled) { setTimeout(function () { var url = "http://zotero.org/start"; @@ -3604,7 +3604,7 @@ var ZoteroPane = new function() * Moves around the toolbar when the user moves around the pane */ this.updateToolbarPosition = function() { - const PANES = ["collections", "items"]; + const PANES = ["collections", "items"]; for each(var paneName in PANES) { var pane = document.getElementById("zotero-"+paneName+"-pane"); var toolbar = document.getElementById("zotero-"+paneName+"-toolbar"); @@ -3613,6 +3613,13 @@ var ZoteroPane = new function() toolbar.style.width = computedStyle.getPropertyValue("width"); } } + + /** + * Opens the about dialog + */ + this.openAboutDialog = function() { + window.openDialog('chrome://zotero/content/about.xul', 'about', 'chrome'); + } } /** diff --git a/chrome/content/zotero/zoteroPane.xul b/chrome/content/zotero/zoteroPane.xul index 19083a1024..cabcf12e35 100644 --- a/chrome/content/zotero/zoteroPane.xul +++ b/chrome/content/zotero/zoteroPane.xul @@ -106,7 +106,7 @@ oncommand="ZoteroPane_Local.openPreferences()"/> - + diff --git a/chrome/locale/en-US/zotero/standalone/baseMenuOverlay.dtd b/chrome/locale/en-US/zotero/standalone/baseMenuOverlay.dtd index b8e6d75d35..fb3121d1aa 100644 --- a/chrome/locale/en-US/zotero/standalone/baseMenuOverlay.dtd +++ b/chrome/locale/en-US/zotero/standalone/baseMenuOverlay.dtd @@ -12,7 +12,7 @@ - + @@ -24,6 +24,9 @@ + + +