diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml index 6c1d1a1741..46416ecb4d 100644 --- a/chrome/content/zotero/bindings/itembox.xml +++ b/chrome/content/zotero/bindings/itembox.xml @@ -417,7 +417,9 @@ if (fieldIsClickable && !Zotero.Items.isPrimaryField(fieldName) - && Zotero.ItemFields.isFieldOfBase(Zotero.ItemFields.getID(fieldName), 'date') + && (Zotero.ItemFields.isFieldOfBase(Zotero.ItemFields.getID(fieldName), 'date') + // TEMP - filingDate + || fieldName == 'filingDate') // TEMP - NSF && fieldName != 'dateSent') { this.addDateRow(fieldNames[i], this.item.getField(fieldName, true), tabindex); @@ -1269,7 +1271,8 @@ if (fieldID) { // Display the SQL date as a tooltip for date fields - if (Zotero.ItemFields.isFieldOfBase(fieldID, 'date')) { + // TEMP - filingDate + if (Zotero.ItemFields.isFieldOfBase(fieldID, 'date') || fieldName == 'filingDate') { valueElement.setAttribute('tooltiptext', Zotero.Date.multipartToSQL(this.item.getField(fieldName, true))); } diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 6d4f234284..d982ea69e4 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -211,7 +211,8 @@ Zotero.Item.prototype.getField = function(field, unformatted, includeBaseMapped) if (!unformatted) { // Multipart date fields - if (Zotero.ItemFields.isFieldOfBase(fieldID, 'date')) { + // TEMP - filingDate + if (Zotero.ItemFields.isFieldOfBase(fieldID, 'date') || field == 'filingDate') { value = Zotero.Date.multipartToStr(value); } } @@ -753,7 +754,8 @@ Zotero.Item.prototype.setField = function(field, value, loadIn) { if (!loadIn) { // Save date field as multipart date - if (Zotero.ItemFields.isFieldOfBase(fieldID, 'date') && + // TEMP - filingDate + if ((Zotero.ItemFields.isFieldOfBase(fieldID, 'date') || field == 'filingDate') && !Zotero.Date.isMultipart(value)) { value = Zotero.Date.strToMultipart(value); }