Add guidance for Zotero toolbar button, moved in Australis
This commit is contained in:
parent
35dd1bc204
commit
255b0318ad
|
@ -32,6 +32,7 @@
|
||||||
<implementation>
|
<implementation>
|
||||||
<method name="show">
|
<method name="show">
|
||||||
<parameter name="forEl"/>
|
<parameter name="forEl"/>
|
||||||
|
<parameter name="text"/>
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var about = this.getAttribute("about"),
|
var about = this.getAttribute("about"),
|
||||||
|
@ -48,7 +49,8 @@
|
||||||
panel = document.getAnonymousNodes(this)[0];
|
panel = document.getAnonymousNodes(this)[0];
|
||||||
|
|
||||||
if(!forEl) forEl = document.getElementById(this.getAttribute("for"));
|
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;
|
var descriptionNode = panel.lastChild;
|
||||||
while(text.length) {
|
while(text.length) {
|
||||||
var textLine = text.shift();
|
var textLine = text.shift();
|
||||||
|
|
|
@ -135,6 +135,20 @@ var ZoteroOverlay = new function()
|
||||||
icon.setAttribute('error', 'true');
|
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
|
// Used for loading pages from upgrade wizard
|
||||||
if (Zotero && Zotero.initialURL) {
|
if (Zotero && Zotero.initialURL) {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
<toolbar id="zotero-toolbar" nowindowdrag="true"/>
|
<toolbar id="zotero-toolbar" nowindowdrag="true"/>
|
||||||
|
|
||||||
<vbox id="appcontent">
|
<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 -->
|
<!-- 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"
|
<splitter id="zotero-splitter" resizebefore="closest" resizeafter="closest" hidden="true"
|
||||||
onmouseup="ZoteroPane.updateTagSelectorSize()"/>
|
onmouseup="ZoteroPane.updateTagSelectorSize()"/>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user