mirror of
https://github.com/zotero/zotero.git
synced 2026-10-08 03:08:19 +00:00
Temporary fix to retain special date handling for filingDate even though it's been unmapped from Date base field
This commit is contained in:
parent
ac31012da7
commit
936142b131
2 changed files with 9 additions and 4 deletions
|
|
@ -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)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue