Don't bind the slideshow downloading to the richdocuments...
... decide based on the DownloadAsPostMessage wopi value instead. The idea is that the Nextcloud app actually sets the DownloadAsPostMessage wopi value to true, which means that all the downloading (including slideshow) is passed as Download_As postMessage anyway. So deciding here based on the existence of the Nextcloud app is not necessary, because there might be others who set the DownloadAsPostMessage and rely on the Download_As postMessage, but would get a non-functional iframe over the top of the editing window. Change-Id: I4a5c1d9ef6276908a1b3910a4269091955cdc490 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89382 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
This commit is contained in:
parent
4ca5089d56
commit
6f3f52304f
1 changed files with 4 additions and 8 deletions
|
@ -29,7 +29,7 @@ L.Map.SlideShow = L.Handler.extend({
|
|||
return;
|
||||
}
|
||||
|
||||
if (!window.RichDocumentsMobileInterface) {
|
||||
if (!this._map['wopi'].DownloadAsPostMessage) {
|
||||
this._slideShow = L.DomUtil.create('iframe', 'leaflet-slideshow', this._map._container);
|
||||
if (this._slideShow.requestFullscreen) {
|
||||
this._slideShow.requestFullscreen();
|
||||
|
@ -53,7 +53,7 @@ L.Map.SlideShow = L.Handler.extend({
|
|||
},
|
||||
|
||||
_onFullScreenChange: function () {
|
||||
if (window.RichDocumentsMobileInterface) {
|
||||
if (this._map['wopi'].DownloadAsPostMessage) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -67,13 +67,9 @@ L.Map.SlideShow = L.Handler.extend({
|
|||
},
|
||||
|
||||
_onSlideDownloadReady: function (e) {
|
||||
if (window.RichDocumentsMobileInterface) {
|
||||
window.RichDocumentsMobileInterface.slideShow(e.url);
|
||||
} else {
|
||||
this._slideShow.src = e.url;
|
||||
this._slideShow.contentWindow.focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
L.Map.addInitHook('addHandler', 'slideShow', L.Map.SlideShow);
|
||||
|
|
Loading…
Reference in a new issue