commit 255b0318adb3cc224a32bc41f55d97033d74ca17
parent 35dd1bc204a757b8a7bfebd607c7c66746ff1896
Author: Simon Kornblith <simon@simonster.com>
Date: Mon, 28 Apr 2014 20:37:31 -0400
Add guidance for Zotero toolbar button, moved in Australis
Diffstat:
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/bindings/guidancepanel.xml b/chrome/content/zotero/bindings/guidancepanel.xml
@@ -32,6 +32,7 @@
<implementation>
<method name="show">
<parameter name="forEl"/>
+ <parameter name="text"/>
<body>
<![CDATA[
var about = this.getAttribute("about"),
@@ -48,7 +49,8 @@
panel = document.getAnonymousNodes(this)[0];
if(!forEl) forEl = document.getElementById(this.getAttribute("for"));
- var text = Zotero.getString("firstRunGuidance."+about).split("\n");
+ if(!text) text = Zotero.getString("firstRunGuidance."+about);
+ text = text.split("\n");
var descriptionNode = panel.lastChild;
while(text.length) {
var textLine = text.shift();
diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js
@@ -134,6 +134,20 @@ var ZoteroOverlay = new function()
icon.setAttribute('tooltiptext', errMsg);
icon.setAttribute('error', 'true');
}
+
+ if (icon.getAttribute("cui-areatype") == "toolbar") {
+ window.setTimeout(function() {
+ var isUpgrade = false;
+ try {
+ isUpgrade = Zotero.Prefs.get("firstRunGuidanceShown.saveIcon");
+ } catch(e) {}
+
+ var property = "firstRunGuidance.toolbarButton."+(isUpgrade ? "upgrade" : "new");
+ var shortcut = Zotero.getString(Zotero.isMac ? "general.keys.cmdShift" : "general.keys.ctrlShift")+
+ Zotero.Prefs.get("keys.openZotero");
+ document.getElementById("zotero-toolbar-button-guidance").show(null, Zotero.getString(property, shortcut));
+ }, 0);
+ }
// Used for loading pages from upgrade wizard
if (Zotero && Zotero.initialURL) {
diff --git a/chrome/content/zotero/overlay.xul b/chrome/content/zotero/overlay.xul
@@ -52,6 +52,7 @@
<toolbar id="zotero-toolbar" nowindowdrag="true"/>
<vbox id="appcontent">
+ <zoteroguidancepanel id="zotero-toolbar-button-guidance" about="toolbarButton" for="zotero-toolbar-button" position="bottomcenter topleft"/>
<!-- onmouseup shouldn't be necessary but seems to help prevent tag selector from sometimes going off the screen -->
<splitter id="zotero-splitter" resizebefore="closest" resizeafter="closest" hidden="true"
onmouseup="ZoteroPane.updateTagSelectorSize()"/>