www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit a259a6b8cd8cecc74cc4ce5ee697a47e21bafb31
parent 27b5505661cd450636bc5eb563fa548c3c73c22f
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon,  3 Oct 2011 06:04:37 +0000

First run guidance for creator menu


Diffstat:
Mchrome/content/zotero/bindings/guidancepanel.xml | 20++++++++++++--------
Mchrome/content/zotero/bindings/itembox.xml | 8+++++++-
Mchrome/locale/en-US/zotero/zotero.properties | 5+++--
3 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/chrome/content/zotero/bindings/guidancepanel.xml b/chrome/content/zotero/bindings/guidancepanel.xml @@ -31,22 +31,26 @@ <binding id="guidancepanel"> <implementation> <method name="show"> + <parameter name="forEl"/> <body> <![CDATA[ - var about = this.getAttribute("about"); - var pref = "firstRunGuidanceShown."+about; - - var shown = false; + var about = this.getAttribute("about"), + pref = "firstRunGuidanceShown."+about, + shown = false; try { shown = Zotero.Prefs.get(pref); } catch(e) {}; if(shown) return; - var panel = document.getAnonymousNodes(this)[0], - forEl = this.getAttribute("for"); + var x = this.getAttribute("x"), + 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.openPopup(document.getElementById(forEl), - "after_start", 0, 0, false, true, null); + panel.openPopup(forEl, position ? position : "after_start", + x ? parseInt(x, 10) : 0, y ? parseInt(y, 10) : 0, false, false, null); Zotero.Prefs.set(pref, true); ]]> diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml @@ -1867,6 +1867,11 @@ if(field === 'creator') { // Reset creator mode settings here so that flex attribute gets reset 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) { @@ -2412,7 +2417,8 @@ oncommand="document.getBindingParent(this).textTransform(document.popupNode, 'sentence')"/> </menupopup> </menu> - </menupopup> + </menupopup> + <zoteroguidancepanel id="zotero-author-guidance" about="authorMenu" position="after_end" x="-25"/> </popupset> <grid flex="1"> <columns> diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties @@ -749,4 +749,5 @@ standalone.addonInstallationFailed.body = The add-on "%S" could not be installe 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. -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. -\ No newline at end of file +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. +\ No newline at end of file