From 81186be07664a78aed51de5e573f5d6903b34bc2 Mon Sep 17 00:00:00 2001 From: gracile-fr Date: Thu, 7 Feb 2013 00:10:49 +0100 Subject: [PATCH] -Display the Year for types which don't have a proper "date" field (case, patent, statute) in the item description box and in the bubble. (includeBaseMapped set to true in item.getField). -Display the Title for types which don't have a proper "title" field (case, email, statute) in the bubble (use getDisplayTitle). --- chrome/content/zotero/integration/quickFormat.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index 802ddcb49..5c7d57586 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -470,7 +470,7 @@ var Zotero_QuickFormat = new function () { var author, authorDate = ""; if(item.firstCreator) author = authorDate = item.firstCreator; - var date = item.getField("date", true); + var date = item.getField("date", true, true); if(date && (date = date.substr(0, 4)) !== "0000") { authorDate += " ("+date+")"; } @@ -590,14 +590,13 @@ var Zotero_QuickFormat = new function () { var title, delimiter; var str = item.getField("firstCreator"); - // Title, if no creator - if(!str) { - // TODO localize quotes - str = '"'+item.getField("title")+'"'; + // Title, if no creator (getDisplayTitle in order to get case, e-mail, statute which don't have a title field) + if(!str) { + str = Zotero.getString("punctuation.openingQMark") + item.getDisplayTitle() + Zotero.getString("punctuation.closingQMark"); } // Date - var date = item.getField("date", true); + var date = item.getField("date", true, true); if(date && (date = date.substr(0, 4)) !== "0000") { str += ", "+date; }