Convert itemType to itemTypeID in itemTreeView.js, not items.js

itemType comes from the column name in the tree view, so it makes most sense to do it there. Otherwise, Zotero was complaining about invalid field somewhere
This commit is contained in:
Aurimas Vinckevicius 2014-12-02 08:15:16 -06:00
parent 276cd82fe4
commit 9574e56ad6
2 changed files with 4 additions and 3 deletions

View File

@ -256,9 +256,6 @@ Zotero.Items = function() {
if (this.isPrimaryField(field)) {
primaryFields.push(field);
}
else if (field == 'itemType') {
primaryFields.push('itemTypeID');
}
else {
fieldIDs.push(Zotero.ItemFields.getID(field));
if (Zotero.ItemFields.isBaseField(field)) {

View File

@ -302,6 +302,10 @@ Zotero.ItemTreeView.prototype.refresh = Zotero.serial(Zotero.Promise.coroutine(f
case 'year':
field = 'date';
break;
case 'itemType':
field = 'itemTypeID';
break;
}
if (cacheFields.indexOf(field) == -1) {
cacheFields = cacheFields.concat(field);