diff --git a/js/galleryview.js b/js/galleryview.js index c9f30db10..a4cd4411c 100644 --- a/js/galleryview.js +++ b/js/galleryview.js @@ -311,9 +311,15 @@ if (!$uploadEl.exists()) { return; } + + this._operationProgressBar = new OCA.Files.OperationProgressBar(); + this._operationProgressBar.render(); + $('#content').find('#uploadprogresswrapper').replaceWith(this._operationProgressBar.$el); + this._uploader = new OC.Uploader($uploadEl, { fileList: FileList, - dropZone: $('#content') + dropZone: $('#content'), + progressBar: this._operationProgressBar }); this._uploader.on('add', function (e, data) { data.targetDir = '/' + Gallery.currentAlbum; diff --git a/js/merged.json b/js/merged.json index c504ed466..68bc5c3db 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 b0cd5dd30..e0a81c852 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 917855684..99a75288a 100644 --- a/templates/part.content.php +++ b/templates/part.content.php @@ -7,7 +7,9 @@ */ script( $_['appName'], - 'merged' + [ + 'upload-helper', + ] ); script( 'files', @@ -15,6 +17,15 @@ 'upload', 'file-upload', 'jquery.fileupload', + 'operationprogressbar', + 'templates', + 'semaphore' + ] +); +script( + $_['appName'], + [ + 'merged' ] ); style(