mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
Fix blueimp download
This commit is contained in:
parent
4bae269e14
commit
cc3584b1fc
@ -427,7 +427,7 @@ export function ExposeMixin<B extends Constructor<LitElement>>(superclass : B)
|
||||
<a title="${egw().lang('Close')}" class="close"></a>
|
||||
<a title="${egw().lang('Play/Pause')}" class="play-pause"></a>
|
||||
<a title="${egw().lang('Fullscreen')}" class="fullscreen"></a>
|
||||
<a title="${egw().lang('Save')}" class="download"></a>
|
||||
<a title="${egw().lang('Save')}" class="download" @click=${this.handleDownload.bind(this)}></a>
|
||||
<ol class="indicator"></ol>
|
||||
</div>
|
||||
`;
|
||||
@ -540,6 +540,8 @@ export function ExposeMixin<B extends Constructor<LitElement>>(superclass : B)
|
||||
|
||||
// @ts-ignore
|
||||
this._gallery = new blueimp.Gallery(mediaContent, options);
|
||||
// @ts-ignore
|
||||
document.body.querySelector("#blueimp-gallery").gallery = this._gallery
|
||||
}
|
||||
|
||||
/**
|
||||
@ -952,5 +954,13 @@ export function ExposeMixin<B extends Constructor<LitElement>>(superclass : B)
|
||||
}
|
||||
|
||||
protected expose_onclosed() {}
|
||||
|
||||
protected handleDownload(e)
|
||||
{
|
||||
const gallery = document.body.querySelector("#blueimp-gallery").gallery;
|
||||
const index = gallery.getIndex();
|
||||
const data = gallery.list[index] ?? {};
|
||||
this.getInstanceManager().download(data.download_href ?? data.download_url ?? data.href);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user