Relay the attachmentId in `send` event

This commit is contained in:
Tim Düsterhus 2020-11-01 11:57:30 +01:00
parent e9739cd806
commit baa654a37a
Signed by: TimWolla
GPG Key ID: 8FF75566094168AF
1 changed files with 5 additions and 3 deletions

View File

@ -82,9 +82,11 @@ define([ 'WoltLabSuite/Core/Language'
elShow(this.uploadDescription)
}
async send(event) {
async send(attachmentId, event) {
event.preventDefault()
const parameters = { promise: Promise.resolve() }
const parameters = { promise: Promise.resolve()
, attachmentId
}
this.emit('send', parameters)
try {
@ -115,7 +117,7 @@ define([ 'WoltLabSuite/Core/Language'
sendButton.classList.add('button')
sendButton.dataset.objectId = objectID
sendButton.innerText = Language.get('wcf.global.button.submit')
sendButton.addEventListener('click', (e) => this.send(e))
sendButton.addEventListener('click', (e) => this.send(objectID, e))
li.appendChild(sendButton)
buttonGroup.appendChild(li)