www

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

commit 936142b1317998c43299a915d3b69e5b3ec812e1
parent ac31012da7665dc28a7205759281d1112edcf89c
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 26 Jan 2010 09:51:53 +0000

Temporary fix to retain special date handling for filingDate even though it's been unmapped from Date base field


Diffstat:
Mchrome/content/zotero/bindings/itembox.xml | 7+++++--
Mchrome/content/zotero/xpcom/data/item.js | 6++++--
2 files changed, 9 insertions(+), 4 deletions(-)

diff --git 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 @@ -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); }