From 3ac6d4d0a0f0a73ab195772f27268fac7e951b97 Mon Sep 17 00:00:00 2001 From: Florian Martin-Bariteau Date: Sat, 26 Apr 2014 20:01:35 +0200 Subject: [PATCH] Update item.js regarding display of case law title from https://github.com/zotero/zotero/pull/467 --- chrome/content/zotero/xpcom/data/item.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 89e6d6ff6..2485df86d 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -949,7 +949,12 @@ Zotero.Item.prototype.getDisplayTitle = function (includeAuthorAndDate) { if (title) { // common law cases always have case names var reporter = this.getField('reporter'); if (reporter) { - title = Zotero.localeJoin([title, '(' + reporter + ')']); + title = title + ' (' + reporter + ')'; + } else { + var court = this.getField('court'); + if (court) { + title = title + ' (' + court + '); + } } } else { // civil law cases have only shortTitle as case name @@ -965,6 +970,11 @@ Zotero.Item.prototype.getDisplayTitle = function (includeAuthorAndDate) { if (part) { strParts.push(part); } + + part = this.getField('shortTitle'); + if (part) { + strParts.push(part); + } var creators = this.getCreators(); if (creators.length && creators[0].creatorTypeID === 1) {