From 44ecc27f3e1164dd86b3991ce2f81315665d91cd Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 12 Mar 2021 16:53:53 +0100 Subject: [PATCH] Setup `Ui/Empty` on every request globally --- ts/WoltLabSuite/Core/Bootstrap.ts | 2 ++ wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ts/WoltLabSuite/Core/Bootstrap.ts b/ts/WoltLabSuite/Core/Bootstrap.ts index 691f862264..dd137132f2 100644 --- a/ts/WoltLabSuite/Core/Bootstrap.ts +++ b/ts/WoltLabSuite/Core/Bootstrap.ts @@ -26,6 +26,7 @@ import * as UiTabMenu from "./Ui/TabMenu"; import * as UiTooltip from "./Ui/Tooltip"; import * as UiPageJumpTo from "./Ui/Page/JumpTo"; import * as UiPassword from "./Ui/Password"; +import * as UiEmpty from "./Ui/Empty"; // perfectScrollbar does not need to be bound anywhere, it just has to be loaded for WCF.js import "perfect-scrollbar"; @@ -90,6 +91,7 @@ export function setup(options: BoostrapOptions): void { UiDialog.setup(); UiTooltip.setup(); UiPassword.setup(); + UiEmpty.setup(); // Convert forms with `method="get"` into `method="post"` document.querySelectorAll("form[method=get]").forEach((form: HTMLFormElement) => { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js index 34cb04d5c4..88eed5c339 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Bootstrap.js @@ -8,7 +8,7 @@ * @license GNU Lesser General Public License * @module WoltLabSuite/Core/Bootstrap */ -define(["require", "exports", "tslib", "./Core", "./Date/Picker", "./Date/Time/Relative", "./Devtools", "./Dom/Change/Listener", "./Environment", "./Event/Handler", "./Language", "./StringUtil", "./Ui/Dialog", "./Ui/Dropdown/Simple", "./Ui/Mobile", "./Ui/Page/Action", "./Ui/TabMenu", "./Ui/Tooltip", "./Ui/Page/JumpTo", "./Ui/Password", "perfect-scrollbar"], function (require, exports, tslib_1, Core, Picker_1, DateTimeRelative, Devtools_1, Listener_1, Environment, EventHandler, Language, StringUtil, Dialog_1, Simple_1, UiMobile, UiPageAction, UiTabMenu, UiTooltip, UiPageJumpTo, UiPassword) { +define(["require", "exports", "tslib", "./Core", "./Date/Picker", "./Date/Time/Relative", "./Devtools", "./Dom/Change/Listener", "./Environment", "./Event/Handler", "./Language", "./StringUtil", "./Ui/Dialog", "./Ui/Dropdown/Simple", "./Ui/Mobile", "./Ui/Page/Action", "./Ui/TabMenu", "./Ui/Tooltip", "./Ui/Page/JumpTo", "./Ui/Password", "./Ui/Empty", "perfect-scrollbar"], function (require, exports, tslib_1, Core, Picker_1, DateTimeRelative, Devtools_1, Listener_1, Environment, EventHandler, Language, StringUtil, Dialog_1, Simple_1, UiMobile, UiPageAction, UiTabMenu, UiTooltip, UiPageJumpTo, UiPassword, UiEmpty) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setup = void 0; @@ -29,6 +29,7 @@ define(["require", "exports", "tslib", "./Core", "./Date/Picker", "./Date/Time/R UiTooltip = tslib_1.__importStar(UiTooltip); UiPageJumpTo = tslib_1.__importStar(UiPageJumpTo); UiPassword = tslib_1.__importStar(UiPassword); + UiEmpty = tslib_1.__importStar(UiEmpty); // non strict equals by intent if (window.WCF == null) { window.WCF = {}; @@ -76,6 +77,7 @@ define(["require", "exports", "tslib", "./Core", "./Date/Picker", "./Date/Time/R Dialog_1.default.setup(); UiTooltip.setup(); UiPassword.setup(); + UiEmpty.setup(); // Convert forms with `method="get"` into `method="post"` document.querySelectorAll("form[method=get]").forEach((form) => { form.method = "post"; -- 2.20.1