Hide Accessed row in attachment box when provided

If, say, a link without an access date is created via an import
This commit is contained in:
Dan Stillman 2018-02-18 15:24:28 -05:00
parent 30b59ebc95
commit 7fed34fa30

View file

@ -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;