From 92a6530c0f8bf50e94a0b5d23e3f334ac76a2941 Mon Sep 17 00:00:00 2001 From: "John Molakvoæ (skjnldsv)" Date: Wed, 4 Mar 2020 13:51:40 +0100 Subject: Properly emit Viewer event on files and files_sharing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files_sharing/list.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'apps/files_sharing/list.php') diff --git a/apps/files_sharing/list.php b/apps/files_sharing/list.php index 8197224af52..370ca53c6b4 100644 --- a/apps/files_sharing/list.php +++ b/apps/files_sharing/list.php @@ -23,6 +23,7 @@ */ use OCA\Files\Event\LoadAdditionalScriptsEvent; use OCA\Files\Event\LoadSidebar; +use OCA\Viewer\Event\LoadViewer; use OCP\EventDispatcher\GenericEvent; // Check if we are a user @@ -44,4 +45,9 @@ $eventDispatcher->dispatch('\OCP\Collaboration\Resources::loadAdditionalScripts' $eventDispatcher->dispatch(LoadAdditionalScriptsEvent::class, new LoadAdditionalScriptsEvent()); $eventDispatcher->dispatch(LoadSidebar::class, new LoadSidebar()); +// Load Viewer scripts +if (class_exists(LoadViewer::class)) { + $eventDispatcher->dispatch(LoadViewer::class, new LoadViewer()); +} + $tmpl->printPage(); -- cgit v1.2.3