Two changes needed to cope with shift-enter being pressed both
with and without changes to current creator row

Signed-off-by: J Richard Snape <rsnape@dmu.ac.uk>
This commit is contained in:
J Richard Snape 2013-04-18 12:18:13 +01:00
parent ecb8cb140d
commit 1e45aed753

View file

@ -552,7 +552,7 @@
this._displayAllCreators = true;
if (this._addCreatorRow) {
this.addCreatorRow(false, false, true);
this.addCreatorRow(false, this.item.getCreator(max-1).creatorTypeID, true);
this._addCreatorRow = false;
this.disableCreatorAddButtons();
}
@ -1555,8 +1555,8 @@
this._focusNextField(this._dynamicFields, this._lastTabIndex, false);
}
else {
// TODO: should use current creator type
this.addCreatorRow(false, false, true);
var creatorFields = this.getCreatorFields(Zotero.getAncestorByTagName(target, 'row'));
this.addCreatorRow(false, creatorFields.creatorTypeID, true);
}
}
// Value has changed