Use return to exit arrow panel and move locator to top
This commit is contained in:
parent
a66555e45b
commit
352a49723e
2 changed files with 12 additions and 10 deletions
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -53,13 +53,19 @@
|
|||
</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/>
|
||||
<column flex="1"/>
|
||||
</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"/>
|
||||
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue