commit 9574e56ad67c99eafc56e1a9cb090cce3a15387f
parent 276cd82fe4c5032b63cb11cc147b028f1ba382ee
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date: Tue, 2 Dec 2014 08:15:16 -0600
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
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/items.js b/chrome/content/zotero/xpcom/data/items.js
@@ -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)) {
diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js
@@ -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);