From dc48b4b9c7b2246ba78a9538e0ee5c00d37c7749 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 26 Apr 2022 11:47:46 +0200 Subject: [PATCH 1/2] Fix #581: Collabora / wopi: le bouton "imprimer" ne fonctionne pas. --- .../src/Resources/public/page/editor/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillWopiBundle/src/Resources/public/page/editor/index.js b/src/Bundle/ChillWopiBundle/src/Resources/public/page/editor/index.js index 99b4ae707..e830c41fd 100644 --- a/src/Bundle/ChillWopiBundle/src/Resources/public/page/editor/index.js +++ b/src/Bundle/ChillWopiBundle/src/Resources/public/page/editor/index.js @@ -14,7 +14,10 @@ window.addEventListener('DOMContentLoaded', function(e) { office_frame.setAttribute('allowfullscreen', 'true'); // The sandbox attribute is needed to allow automatic redirection to the O365 sign-in page in the business user flow - office_frame.setAttribute('sandbox', 'allow-downloads allow-scripts allow-same-origin allow-forms allow-popups allow-top-navigation allow-popups-to-escape-sandbox'); + office_frame.setAttribute( + 'sandbox', + 'allow-downloads allow-scripts allow-same-origin allow-forms allow-modals allow-popups allow-top-navigation allow-popups-to-escape-sandbox' + ); frameholder.appendChild(office_frame); document.getElementById('office_form').submit(); From 81edaef0629d0e5bb5a9072283da5835451978aa Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 26 Apr 2022 11:50:59 +0200 Subject: [PATCH 2/2] Fix: Route name change. --- .../ChillWopiBundle/src/Resources/config/routes/routes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillWopiBundle/src/Resources/config/routes/routes.php b/src/Bundle/ChillWopiBundle/src/Resources/config/routes/routes.php index 81ecb4e55..1dfb5e6af 100644 --- a/src/Bundle/ChillWopiBundle/src/Resources/config/routes/routes.php +++ b/src/Bundle/ChillWopiBundle/src/Resources/config/routes/routes.php @@ -9,11 +9,11 @@ declare(strict_types=1); -use Chill\WopiBundle\Controller\Test; +use Chill\WopiBundle\Controller\Editor; use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; return static function (RoutingConfigurator $routes) { $routes ->add('chill_wopi_file_edit', '/edit/{fileId}') - ->controller(Test::class); + ->controller(Editor::class); };