Add guidance for Zotero toolbar button, moved in Australis
This commit is contained in:
parent
35dd1bc204
commit
255b0318ad
3 changed files with 18 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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()"/>
|
||||
|
|
Loading…
Reference in a new issue