From b7caed7e717cfbe517834f47dad2eb56dddb26c1 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 23 Mar 2007 00:40:26 +0000 Subject: [PATCH] Fixes #576, Stuck at "Loading library..." --- chrome/content/zotero/xpcom/data_access.js | 2 +- chrome/content/zotero/xpcom/itemTreeView.js | 3 +++ chrome/content/zotero/xpcom/report.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/data_access.js b/chrome/content/zotero/xpcom/data_access.js index 6a8faf9bb..6cc50f064 100644 --- a/chrome/content/zotero/xpcom/data_access.js +++ b/chrome/content/zotero/xpcom/data_access.js @@ -574,7 +574,7 @@ Zotero.Item.prototype.setField = function(field, value, loadIn){ } if (!Zotero.ItemFields.isValidForType(fieldID, this.getType())){ - throw ('"' + field + "' is not a valid field for this type."); + throw ('"' + field + "' is not a valid field for type " + this.getType()); } if (!loadIn){ diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js index f099e12ad..bd589bbeb 100644 --- a/chrome/content/zotero/xpcom/itemTreeView.js +++ b/chrome/content/zotero/xpcom/itemTreeView.js @@ -139,6 +139,9 @@ Zotero.ItemTreeView.prototype.refresh = function() // Cache the visible fields so they don't load individually var visibleFields = this.getVisibleFields(); for each(var field in visibleFields) { + if (field == 'year') { + field = 'date'; + } if (cacheFields.indexOf(field) == -1) { cacheFields = cacheFields.concat(field); } diff --git a/chrome/content/zotero/xpcom/report.js b/chrome/content/zotero/xpcom/report.js index 3be0b58e5..368a7ab82 100644 --- a/chrome/content/zotero/xpcom/report.js +++ b/chrome/content/zotero/xpcom/report.js @@ -129,7 +129,7 @@ Zotero.Report = new function() { continue; } - // Convert false to empty string + // Skip empty fields if (!arr[i]) { continue; }