www

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

commit 352a49723e896f5e0fcfc8b91ca60d4aa8684479
parent a66555e45b5e0a8cf958211d0a15fda6bf5669a5
Author: Simon Kornblith <simon@simonster.com>
Date:   Fri, 29 Jul 2011 05:43:42 +0000

Use return to exit arrow panel and move locator to top


Diffstat:
Mchrome/content/zotero/integration/quickFormat.js | 8+++++---
Mchrome/content/zotero/integration/quickFormat.xul | 14+++++++-------
2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js @@ -1,7 +1,7 @@ /* ***** BEGIN LICENSE BLOCK ***** - Copyright © 2009 Center for History and New Media + Copyright © 2011 Center for History and New Media George Mason University, Fairfax, Virginia, USA http://zotero.org @@ -432,7 +432,7 @@ var Zotero_QuickFormat = new function () { /** * Accepts current selection and adds citation */ - _accept = function() { + function _accept() { var nodes = qfe.childNodes; io.citation.citationItems = []; for(var i=0, n=nodes.length; i<n; i++) { @@ -548,6 +548,7 @@ var Zotero_QuickFormat = new function () { target.setAttribute("selected", "true"); panel.openPopup(target, "after_start", target.clientWidth/2, 0, false, false, event); + locator.focus(); var closeListener = function(event) { panel.removeEventListener("popuphidden", closeListener, false); @@ -603,8 +604,9 @@ var Zotero_QuickFormat = new function () { * Makes "Enter" work in the panel */ this.onPanelKeyPress = function(event) { + var keyCode = event.keyCode; if(keyCode === event.DOM_VK_RETURN || keyCode === event.DOM_VK_ENTER) { - event.target.hidePopup(); + document.getElementById("citation-properties").hidePopup(); } }; diff --git a/chrome/content/zotero/integration/quickFormat.xul b/chrome/content/zotero/integration/quickFormat.xul @@ -53,7 +53,7 @@ </hbox> <richlistbox id="quick-format-reference-list" hidden="true" flex="1"/> </vbox> - <panel id="citation-properties" type="arrow" orient="vertical" onkeypress="Zotero_QuickStart.onPanelKeyPress(event)"> + <panel id="citation-properties" type="arrow" orient="vertical" onkeypress="Zotero_QuickFormat.onPanelKeyPress(event)"> <grid flex="1"> <columns> <column/> @@ -61,6 +61,12 @@ </columns> <rows> <row align="center"> + <menulist id="locator-label" sizetopopup="none"> + <menupopup id="locator-label-popup"/> + </menulist> + <textbox id="locator" flex="1"/> + </row> + <row align="center"> <label value="&zotero.citation.prefix.label;"/> <textbox class="citation-textbox" id="prefix" flex="1"/> </row> @@ -68,12 +74,6 @@ <label value="&zotero.citation.suffix.label;"/> <textbox class="citation-textbox" id="suffix" flex="1"/> </row> - <row align="center"> - <menulist id="locator-label" sizetopopup="none"> - <menupopup id="locator-label-popup"/> - </menulist> - <textbox id="locator" flex="1"/> - </row> <checkbox id="suppress-author" label="&zotero.citation.suppressAuthor.label;"/> </rows> </grid>