www

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

commit 7fed34fa30754ed6157159f572d3c24b1084b963
parent 30b59ebc952f7ad64f2827631b1c7d394089e5af
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun, 18 Feb 2018 15:24:28 -0500

Hide Accessed row in attachment box when provided

If, say, a link without an access date is created via an import

Diffstat:
Mchrome/content/zotero/bindings/attachmentbox.xml | 15+++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/bindings/attachmentbox.xml b/chrome/content/zotero/bindings/attachmentbox.xml @@ -260,10 +260,17 @@ if (this.displayAccessed) { this._id("accessed-label").value = Zotero.getString('itemFields.accessDate') + Zotero.getString('punctuation.colon'); - this._id("accessed").value = Zotero.Date.sqlToDate( - this.item.getField('accessDate'), true - ).toLocaleString(); - accessed.hidden = false; + let val = this.item.getField('accessDate'); + if (val) { + val = Zotero.Date.sqlToDate(val, true); + } + if (val) { + this._id("accessed").value = val.toLocaleString(); + accessed.hidden = false; + } + else { + accessed.hidden = true; + } } else { accessed.hidden = true;