diff --git a/chrome/content/zotero/elements/attachmentBox.js b/chrome/content/zotero/elements/attachmentBox.js index db168bbf0c..163754cafe 100644 --- a/chrome/content/zotero/elements/attachmentBox.js +++ b/chrome/content/zotero/elements/attachmentBox.js @@ -37,6 +37,10 @@ ondragstart="let dt = event.dataTransfer; dt.setData('text/x-moz-url', this.value); dt.setData('text/uri-list', this.value); dt.setData('text/plain', this.value);"/> + + + + @@ -243,6 +247,11 @@ this._id('url-menu').openPopupAtScreen(event.screenX, event.screenY, true); }); + this._id("title").addEventListener('blur', () => { + this.item.setField('title', this._id('title').value); + this.item.saveTx(); + }); + let fileName = this._id("fileName"); fileName.addEventListener('focus', () => { this._isEditingFilename = true; @@ -403,6 +412,8 @@ else { accessed.hidden = true; } + + this._id("title").value = this.item.getField('title'); if (this.displayFileName && !isLinkedURL) { let fileName = ""; diff --git a/chrome/locale/en-US/zotero/zotero.ftl b/chrome/locale/en-US/zotero/zotero.ftl index d43a5a941d..93dd19d122 100644 --- a/chrome/locale/en-US/zotero/zotero.ftl +++ b/chrome/locale/en-US/zotero/zotero.ftl @@ -527,6 +527,7 @@ new-collection-dialog = new-collection-name = Name: new-collection-create-in = Create in: +attachment-info-title = Title attachment-info-filename = Filename attachment-info-accessed = Accessed attachment-info-pages = Pages