Skip to content

Commit

Permalink
Hide Accessed row in attachment box when provided
Browse files Browse the repository at this point in the history
If, say, a link without an access date is created via an import
  • Loading branch information
dstillman committed Feb 18, 2018
1 parent 30b59eb commit 7fed34f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions chrome/content/zotero/bindings/attachmentbox.xml
Expand Up @@ -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;
Expand Down

0 comments on commit 7fed34f

Please sign in to comment.