From 976f13d3bcf328cc7871bcae0060dd8826b17492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 5 Mar 2019 18:47:18 +0100 Subject: [PATCH] Fix loading of files/gallery script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- js/merged.json | 12 ++++++------ js/upload-helper.js | 4 ++-- templates/part.content.php | 10 +++++++++- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/js/merged.json b/js/merged.json index c504ed46..68bc5c3d 100644 --- a/js/merged.json +++ b/js/merged.json @@ -1,7 +1,10 @@ [ - "app.js", + "upload-helper.js", + "vendor/bigshot/bigshot-compressed.js", "vendor/jquery-touch-events/src/1.0.8/jquery.mobile-events.min.js", "vendor/jquery.ui.touch-punch-custom.js", + "vendor/modified-eventsource-polyfill/eventsource-polyfill.js", + "vendor/commonmark/dist/commonmark.min.js", "gallery.js", "templates.js", "galleryutility.js", @@ -13,16 +16,13 @@ "galleryrow.js", "galleryimage.js", "thumbnail.js", - "vendor/modified-eventsource-polyfill/eventsource-polyfill.js", "eventsource.js", "vendor/nextcloud/share.js", - "vendor/commonmark/dist/commonmark.min.js", "vendor/dompurify/src/purify.js", - "vendor/bigshot/bigshot-compressed.js", "slideshow.js", "slideshowcontrols.js", "slideshowzoomablepreview.js", - "upload-helper.js", "vendor/nextcloud/newfilemenu.js", - "newfilemenuplugins.js" + "newfilemenuplugins.js", + "app.js" ] diff --git a/js/upload-helper.js b/js/upload-helper.js index b0cd5dd3..e0a81c85 100644 --- a/js/upload-helper.js +++ b/js/upload-helper.js @@ -217,5 +217,5 @@ var Files = { } }; -OCA.Files = Files; -OCA.Files.App.fileList = FileList; +OCA.Files = Object.assign({}, OCA.Files, Files); +OCA.Files.App.fileList = Object.assign({}, OCA.Files.App.fileList, FileList); diff --git a/templates/part.content.php b/templates/part.content.php index 2bfe5576..99a75288 100644 --- a/templates/part.content.php +++ b/templates/part.content.php @@ -7,7 +7,9 @@ */ script( $_['appName'], - 'merged' + [ + 'upload-helper', + ] ); script( 'files', @@ -20,6 +22,12 @@ script( 'semaphore' ] ); +script( + $_['appName'], + [ + 'merged' + ] +); style( 'files', [