www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 161a21b18007b2ab299fbc4174201964d059c8fe
parent b3366741005bea1c2f0b77c68d09419795e05f77
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 11 Aug 2009 00:21:33 +0000

- Fix display of related items in reports
- Fix redundant display of case/statute/email titles in report tables


Diffstat:
Mchrome/content/zotero/xpcom/data/item.js | 7+++++++
Mchrome/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 @@ -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 @@ -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 += '<h3 class="related">' + escapeXML(Zotero.getString('itemFields.related')) + '</h3>\n'; content += '<ul class="related">\n'; - var relateds = Zotero.Items.get(arr['seeAlso']); + var relateds = Zotero.Items.get(arr.related); for each(var related in relateds) { content += '<li id="i' + related.getID() + '">'; content += escapeXML(related.getField('title')); @@ -203,7 +203,7 @@ Zotero.Report = new function() { case 'firstCreator': case 'creators': case 'tags': - case 'seeAlso': + case 'related': case 'notes': case 'note': case 'attachments':