First run guidance for creator menu
This commit is contained in:
parent
27b5505661
commit
a259a6b8cd
|
@ -31,22 +31,26 @@
|
||||||
<binding id="guidancepanel">
|
<binding id="guidancepanel">
|
||||||
<implementation>
|
<implementation>
|
||||||
<method name="show">
|
<method name="show">
|
||||||
|
<parameter name="forEl"/>
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var about = this.getAttribute("about");
|
var about = this.getAttribute("about"),
|
||||||
var pref = "firstRunGuidanceShown."+about;
|
pref = "firstRunGuidanceShown."+about,
|
||||||
|
shown = false;
|
||||||
var shown = false;
|
|
||||||
try {
|
try {
|
||||||
shown = Zotero.Prefs.get(pref);
|
shown = Zotero.Prefs.get(pref);
|
||||||
} catch(e) {};
|
} catch(e) {};
|
||||||
if(shown) return;
|
if(shown) return;
|
||||||
|
|
||||||
var panel = document.getAnonymousNodes(this)[0],
|
var x = this.getAttribute("x"),
|
||||||
forEl = this.getAttribute("for");
|
y = this.getAttribute("y"),
|
||||||
|
position = this.getAttribute("position"),
|
||||||
|
panel = document.getAnonymousNodes(this)[0];
|
||||||
|
|
||||||
|
if(!forEl) forEl = document.getElementById(this.getAttribute("for"));
|
||||||
panel.lastChild.textContent = Zotero.getString("firstRunGuidance."+about);
|
panel.lastChild.textContent = Zotero.getString("firstRunGuidance."+about);
|
||||||
panel.openPopup(document.getElementById(forEl),
|
panel.openPopup(forEl, position ? position : "after_start",
|
||||||
"after_start", 0, 0, false, true, null);
|
x ? parseInt(x, 10) : 0, y ? parseInt(y, 10) : 0, false, false, null);
|
||||||
|
|
||||||
Zotero.Prefs.set(pref, true);
|
Zotero.Prefs.set(pref, true);
|
||||||
]]>
|
]]>
|
||||||
|
|
|
@ -1867,6 +1867,11 @@
|
||||||
if(field === 'creator') {
|
if(field === 'creator') {
|
||||||
// Reset creator mode settings here so that flex attribute gets reset
|
// Reset creator mode settings here so that flex attribute gets reset
|
||||||
this.switchCreatorMode(row, (otherFields.fieldMode ? 1 : 0), true);
|
this.switchCreatorMode(row, (otherFields.fieldMode ? 1 : 0), true);
|
||||||
|
|
||||||
|
if(Zotero.ItemTypes.getName(this.item.itemTypeID) === "bookSection") {
|
||||||
|
var creatorTypeLabels = document.getAnonymousNodes(this)[0].getElementsByClassName("creator-type-label");
|
||||||
|
document.getElementById("zotero-author-guidance").show(creatorTypeLabels[creatorTypeLabels.length-1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._tabDirection) {
|
if (this._tabDirection) {
|
||||||
|
@ -2413,6 +2418,7 @@
|
||||||
</menupopup>
|
</menupopup>
|
||||||
</menu>
|
</menu>
|
||||||
</menupopup>
|
</menupopup>
|
||||||
|
<zoteroguidancepanel id="zotero-author-guidance" about="authorMenu" position="after_end" x="-25"/>
|
||||||
</popupset>
|
</popupset>
|
||||||
<grid flex="1">
|
<grid flex="1">
|
||||||
<columns>
|
<columns>
|
||||||
|
|
|
@ -750,3 +750,4 @@ connector.error.title = Zotero Connector Error
|
||||||
connector.standaloneOpen = Your database cannot be accessed because Zotero Standalone is currently open. Please view your items in Zotero Standalone.
|
connector.standaloneOpen = Your database cannot be accessed because Zotero Standalone is currently open. Please view your items in Zotero Standalone.
|
||||||
|
|
||||||
firstRunGuidance.saveIcon = Zotero can recognize a reference on this page. Click this icon in the address bar to save this reference to your Zotero library.
|
firstRunGuidance.saveIcon = Zotero can recognize a reference on this page. Click this icon in the address bar to save this reference to your Zotero library.
|
||||||
|
firstRunGuidance.authorMenu = Zotero lets you specify editors and translators, too. You can turn an author into an editor or translator by selecting from this menu.
|
Loading…
Reference in New Issue
Block a user