diff --git a/src/dbp-official-signature-pdf-upload.js b/src/dbp-official-signature-pdf-upload.js index 811bcbad08639b6ae81a3e9c19b1b4728d48fe85..93eca0fd0341bb0a5bafd083b4c1d930a2022b8e 100644 --- a/src/dbp-official-signature-pdf-upload.js +++ b/src/dbp-official-signature-pdf-upload.js @@ -769,12 +769,12 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem const file = this.signedFiles[id]; results.push(html` - <div class="file-block"> + <div class="file-block" id="file-block-${id}"> <div class="header"> <span class="filename"><strong>${file.name}</strong> (${humanFileSize(file.contentSize)})</span> <button class="button close" title="${i18n.t('official-pdf-upload.download-file-button-title')}" - @click="${() => { this.downloadFileClickHandler(file); }}"> + @click="${() => { this.downloadFileClickHandler(file, 'file-block-' + id); }}"> <dbp-icon name="download"></dbp-icon></button> </div> </div> diff --git a/src/dbp-signature-lit-element.js b/src/dbp-signature-lit-element.js index bdcd73d14efeb96e4deeeea8bdf30322d1273675..a2ea68698c92508b7ab22dd83f7e067cb63a9a4c 100644 --- a/src/dbp-signature-lit-element.js +++ b/src/dbp-signature-lit-element.js @@ -401,13 +401,16 @@ export default class DBPSignatureLitElement extends BaseLitElement { * Open Filesink for a single File * * @param file + * @param id of element to mark */ - async downloadFileClickHandler(file) { + async downloadFileClickHandler(file, id) { let files = []; const arr = utils.convertDataURIToBinary(file.contentUrl); const binaryFile = new File([arr], file.name, { type: utils.getDataURIContentType(file.contentUrl) }); files.push(binaryFile); this.signedFilesToDownload = files.length; this._("#file-sink").files = files; + const div = this.shadowRoot.querySelector('#' + id); + div.style.background='#c8dcc8'; } }