From dbe7d6ca3afe050cccbd198e4900a4a69b1c9b4a Mon Sep 17 00:00:00 2001 From: Florian Martin-Bariteau Date: Sat, 26 Apr 2014 20:01:35 +0200 Subject: [PATCH 1/2] 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 88468f242a..7f45b19303 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) { From 72a99d32f3a6c69ede9475290d1a4b999baf0ad6 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 26 Apr 2014 14:36:00 -0400 Subject: [PATCH 2/2] Fix breakage from #467 / #475 --- chrome/content/zotero/xpcom/data/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 7f45b19303..08a15a0c17 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -953,7 +953,7 @@ Zotero.Item.prototype.getDisplayTitle = function (includeAuthorAndDate) { } else { var court = this.getField('court'); if (court) { - title = title + ' (' + court + '); + title = title + ' (' + court + ')'; } } }