Populate both creator fields on Tab autocomplete select

Closes #926
This commit is contained in:
Dan Stillman 2016-04-02 04:10:27 -04:00
parent a315e4eced
commit eecd625298

View file

@ -1462,7 +1462,11 @@
params.creatorTypeID = creatorTypeID;
}
// Return
t.setAttribute('ontextentered',
'document.getBindingParent(this).handleCreatorAutoCompleteSelect(this, true)');
// Tab/Shift-Tab
t.setAttribute('onchange',
'document.getBindingParent(this).handleCreatorAutoCompleteSelect(this)');
};
t.setAttribute(
@ -1517,6 +1521,7 @@
-->
<method name="handleCreatorAutoCompleteSelect">
<parameter name="textbox"/>
<parameter name="noAdvance"/>
<body>
<![CDATA[
var comment = false;
@ -1545,8 +1550,10 @@
textbox.getAttribute('fieldname').split('-');
// Stay focused
if (noAdvance) {
this._lastTabIndex = parseInt(textbox.getAttribute('ztabindex')) - 1;
this._tabDirection = 1;
}
var creator = Zotero.Creators.get(creatorID);