From 9574e56ad67c99eafc56e1a9cb090cce3a15387f Mon Sep 17 00:00:00 2001 From: Aurimas Vinckevicius Date: Tue, 2 Dec 2014 08:15:16 -0600 Subject: [PATCH] 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 --- chrome/content/zotero/xpcom/data/items.js | 3 --- chrome/content/zotero/xpcom/itemTreeView.js | 4 ++++ 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 index a9dea54073..fa541111f5 100644 --- 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 index 61ad19d702..9a2d2b7130 100644 --- 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);