From 161a21b18007b2ab299fbc4174201964d059c8fe Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 11 Aug 2009 00:21:33 +0000 Subject: [PATCH] - Fix display of related items in reports - Fix redundant display of case/statute/email titles in report tables --- chrome/content/zotero/xpcom/data/item.js | 7 +++++++ chrome/content/zotero/xpcom/report.js | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 3313c75467..17d5997767 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -3921,6 +3921,13 @@ Zotero.Item.prototype.toArray = function (mode) { } if (!arr.title) { + var titleFieldID = Zotero.ItemFields.getFieldIDFromTypeAndBase(this.itemTypeID, 'title'); + var titleFieldName = Zotero.ItemFields.getName(titleFieldID); + if (arr[titleFieldName]) { + arr.title = titleFieldName; + delete arr[titleFieldName]; + } + switch (this.typeID) { case Zotero.ItemTypes.getID('note'): break; diff --git a/chrome/content/zotero/xpcom/report.js b/chrome/content/zotero/xpcom/report.js index 659a809a71..0df9f1bde0 100644 --- a/chrome/content/zotero/xpcom/report.js +++ b/chrome/content/zotero/xpcom/report.js @@ -116,10 +116,10 @@ Zotero.Report = new function() { } // Related - if (arr.reportSearchMatch && arr['seeAlso'] && arr['seeAlso'].length) { + if (arr.reportSearchMatch && arr.related && arr.related.length) { content += '\n'; content += '