Move the registration of the HTML-Element `woltlab-core-file` into the helper script
authorCyperghost <olaf_schmitz_1@t-online.de>
Tue, 10 Sep 2024 08:59:07 +0000 (10:59 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Tue, 10 Sep 2024 08:59:07 +0000 (10:59 +0200)
ts/WoltLabSuite/Core/Component/Attachment/List.ts
ts/WoltLabSuite/Core/Component/File/Helper.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Component/Attachment/List.js
wcfsetup/install/files/js/WoltLabSuite/Core/Component/File/Helper.js

index f1c418ecebd4e4de38c3780fdd3bccd4e5c9ca2c..147584cf0fbb62a55fbd91d563685b27b65e7e36 100644 (file)
@@ -3,10 +3,6 @@ import { CkeditorDropEvent } from "../File/Upload";
 import { createAttachmentFromFile } from "./Entry";
 import { listenToCkeditor } from "../Ckeditor/Event";
 
-// This import has the side effect of registering the `<woltlab-core-file>`
-// element. Do not remove!
-import "../File/woltlab-core-file";
-
 function fileToAttachment(fileList: HTMLElement, file: WoltlabCoreFileElement, editor: HTMLElement): void {
   fileList.append(createAttachmentFromFile(file, editor));
 }
index a16c877829ff1b32d4b0879cbc94e41892acbad3..ed50b743ccd7be5cb0ae29c6de2bc815865aaaa9 100644 (file)
@@ -2,6 +2,10 @@ import WoltlabCoreFileElement from "WoltLabSuite/Core/Component/File/woltlab-cor
 import { getPhrase } from "WoltLabSuite/Core/Language";
 import { formatFilesize } from "WoltLabSuite/Core/FileUtil";
 
+// This import has the side effect of registering the `<woltlab-core-file>`
+// element. Do not remove!
+import "WoltLabSuite/Core/Component/File/woltlab-core-file";
+
 export function trackUploadProgress(element: HTMLElement, file: WoltlabCoreFileElement): void {
   const progress = document.createElement("progress");
   progress.classList.add("fileList__item__progress__bar");
index 8d12aeebe471a5ebfb0c88abf65ae6fabbc4961a..39033cc922da7f4bade54632a68b467118e4aa5f 100644 (file)
@@ -1,4 +1,4 @@
-define(["require", "exports", "./Entry", "../Ckeditor/Event", "../File/woltlab-core-file"], function (require, exports, Entry_1, Event_1) {
+define(["require", "exports", "./Entry", "../Ckeditor/Event"], function (require, exports, Entry_1, Event_1) {
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
     exports.setup = void 0;
index 22960c29af5decc78f172c6cd0063a93fd2d7c37..bd68df50545e7eb66b149e217235e6612b242da3 100644 (file)
@@ -1,4 +1,4 @@
-define(["require", "exports", "WoltLabSuite/Core/Language", "WoltLabSuite/Core/FileUtil"], function (require, exports, Language_1, FileUtil_1) {
+define(["require", "exports", "WoltLabSuite/Core/Language", "WoltLabSuite/Core/FileUtil", "WoltLabSuite/Core/Component/File/woltlab-core-file"], function (require, exports, Language_1, FileUtil_1) {
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
     exports.insertFileInformation = exports.fileInitializationFailed = exports.removeUploadProgress = exports.trackUploadProgress = void 0;