diff --git a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location/NewLocation.vue b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location/NewLocation.vue index dff32b35d..95858a4fb 100644 --- a/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location/NewLocation.vue +++ b/src/Bundle/ChillActivityBundle/Resources/public/vuejs/Activity/components/Location/NewLocation.vue @@ -1,123 +1,114 @@ - - - - - {{ trans(ACTIVITY_CREATE_NEW_LOCATION) }} - - - + + + + + {{ trans(ACTIVITY_CREATE_NEW_LOCATION) }} + + + - - - - - {{ trans(ACTIVITY_CREATE_NEW_LOCATION) }} - - - - - - - - {{ e }} - - - + + + + + {{ trans(ACTIVITY_CREATE_NEW_LOCATION) }} + + + + + + + + {{ e }} + + + - - - - {{ trans(ACTIVITY_CHOOSE_LOCATION_TYPE) }} - - - {{ localizeString(t.title) }} - - - {{ - trans(ACTIVITY_LOCATION_FIELDS_TYPE) - }} - + + + + {{ trans(ACTIVITY_CHOOSE_LOCATION_TYPE) }} + + + {{ localizeString(t.title) }} + + + {{ trans(ACTIVITY_LOCATION_FIELDS_TYPE) }} + - - - {{ - trans(ACTIVITY_LOCATION_FIELDS_NAME) - }} - + + + {{ + trans(ACTIVITY_LOCATION_FIELDS_NAME) + }} + - + - - - {{ - trans(ACTIVITY_LOCATION_FIELDS_PHONENUMBER1) - }} - - - - {{ - trans(ACTIVITY_LOCATION_FIELDS_PHONENUMBER2) - }} - - - - {{ - trans(ACTIVITY_LOCATION_FIELDS_EMAIL) - }} - - - - - - {{ trans(SAVE) }} - - - - - + + + {{ + trans(ACTIVITY_LOCATION_FIELDS_PHONENUMBER1) + }} + + + + {{ + trans(ACTIVITY_LOCATION_FIELDS_PHONENUMBER2) + }} + + + + {{ + trans(ACTIVITY_LOCATION_FIELDS_EMAIL) + }} + + + + + + {{ trans(SAVE) }} + + + + + diff --git a/src/Bundle/ChillWopiBundle/src/Resources/public/page/editor/index.ts b/src/Bundle/ChillWopiBundle/src/Resources/public/page/editor/index.ts index 01ddad995..60ad6bde5 100644 --- a/src/Bundle/ChillWopiBundle/src/Resources/public/page/editor/index.ts +++ b/src/Bundle/ChillWopiBundle/src/Resources/public/page/editor/index.ts @@ -4,65 +4,65 @@ import "./index.scss"; declare const editor_url: string; window.addEventListener("DOMContentLoaded", function () { - const frameholder = document.getElementById("frameholder"); - const office_frame = document.createElement("iframe"); - office_frame.name = "office_frame"; - office_frame.id = "office_frame"; + const frameholder = document.getElementById("frameholder"); + const office_frame = document.createElement("iframe"); + office_frame.name = "office_frame"; + office_frame.id = "office_frame"; - // The title should be set for accessibility - office_frame.title = "Office Frame"; + // The title should be set for accessibility + office_frame.title = "Office Frame"; - // This attribute allows true fullscreen mode in slideshow view - // when using PowerPoint's 'view' action. - office_frame.setAttribute("allowfullscreen", "true"); + // This attribute allows true fullscreen mode in slideshow view + // when using PowerPoint's 'view' action. + 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-modals allow-popups allow-top-navigation allow-popups-to-escape-sandbox", - ); + // 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-modals allow-popups allow-top-navigation allow-popups-to-escape-sandbox", + ); - office_frame.setAttribute( - "allow", - "clipboard-read *; clipboard-write *; fullscreen *", - ); - if (frameholder) { - frameholder.appendChild(office_frame); + office_frame.setAttribute( + "allow", + "clipboard-read *; clipboard-write *; fullscreen *", + ); + if (frameholder) { + frameholder.appendChild(office_frame); + } + + const officeForm = document.getElementById( + "office_form", + ) as HTMLFormElement | null; + officeForm?.submit(); + + const url = new URL(editor_url); + const editor_domain = url.origin; + + window.addEventListener("message", function (message: MessageEvent) { + if (message.origin !== editor_domain) { + return; } - const officeForm = document.getElementById( - "office_form", - ) as HTMLFormElement | null; - officeForm?.submit(); + let data: { MessageId: "UI_Close" | null; data: string }; + try { + data = + typeof message.data === "string" + ? JSON.parse(message.data) + : message.data; + } catch (e: unknown) { + console.error("error while parsing data from message UI_CLOSE", e); + return; + } - const url = new URL(editor_url); - const editor_domain = url.origin; - - window.addEventListener("message", function (message: MessageEvent) { - if (message.origin !== editor_domain) { - return; - } - - let data: { MessageId: "UI_Close" | null; data: string }; - try { - data = - typeof message.data === "string" - ? JSON.parse(message.data) - : message.data; - } catch (e: unknown) { - console.error("error while parsing data from message UI_CLOSE", e); - return; - } - - if ("UI_Close" === data.MessageId) { - closeEditor(); - } - }); + if ("UI_Close" === data.MessageId) { + closeEditor(); + } + }); }); function closeEditor(): void { - const params = new URLSearchParams(window.location.search); - const returnPath = params.get("returnPath") ?? "/"; + const params = new URLSearchParams(window.location.search); + const returnPath = params.get("returnPath") ?? "/"; - window.location.assign(returnPath); + window.location.assign(returnPath); }