From: Matthias Schmidt Date: Sat, 12 Dec 2020 14:36:32 +0000 (+0100) Subject: Convert `Form/Builder/Field/Wysiwyg/Attachment` to TypeScript X-Git-Tag: 5.4.0_Alpha_1~526^2~18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8877755ee3cf228003877c7ba23a9a80e846df70;p=GitHub%2FWoltLab%2FWCF.git Convert `Form/Builder/Field/Wysiwyg/Attachment` to TypeScript --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment.js index cdb17a6ed8..2a7d04c86e 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment.js @@ -1,21 +1,21 @@ /** * Data handler for a wysiwyg attachment form builder field that stores the temporary hash. * - * @author Matthias Schmidt - * @copyright 2001-2019 WoltLab GmbH - * @license GNU Lesser General Public License - * @module WoltLabSuite/Core/Form/Builder/Field/Checked - * @since 5.2 + * @author Matthias Schmidt + * @copyright 2001-2020 WoltLab GmbH + * @license GNU Lesser General Public License + * @module WoltLabSuite/Core/Form/Builder/Field/Field/Wysiwyg/Attachment + * @since 5.2 */ -define(['Core', '../Value'], function (Core, FormBuilderFieldValue) { +define(["require", "exports", "tslib", "../Value", "../../../../Core"], function (require, exports, tslib_1, Value_1, Core) { "use strict"; - /** - * @constructor - */ - function FormBuilderFieldAttachment(fieldId) { - this.init(fieldId + '_tmpHash'); + Value_1 = tslib_1.__importDefault(Value_1); + Core = tslib_1.__importStar(Core); + class Attachment extends Value_1.default { + constructor(fieldId) { + super(fieldId + "_tmpHash"); + } } - ; - Core.inherit(FormBuilderFieldAttachment, FormBuilderFieldValue, {}); - return FormBuilderFieldAttachment; + Core.enableLegacyInheritance(Attachment); + return Attachment; }); diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment.js b/wcfsetup/install/files/ts/WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment.js deleted file mode 100644 index e287068b49..0000000000 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Data handler for a wysiwyg attachment form builder field that stores the temporary hash. - * - * @author Matthias Schmidt - * @copyright 2001-2019 WoltLab GmbH - * @license GNU Lesser General Public License - * @module WoltLabSuite/Core/Form/Builder/Field/Checked - * @since 5.2 - */ -define(['Core', '../Value'], function(Core, FormBuilderFieldValue) { - "use strict"; - - /** - * @constructor - */ - function FormBuilderFieldAttachment(fieldId) { - this.init(fieldId + '_tmpHash'); - }; - Core.inherit(FormBuilderFieldAttachment, FormBuilderFieldValue, {}); - - return FormBuilderFieldAttachment; -}); diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment.ts new file mode 100644 index 0000000000..76f8cba609 --- /dev/null +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Form/Builder/Field/Wysiwyg/Attachment.ts @@ -0,0 +1,22 @@ +/** + * Data handler for a wysiwyg attachment form builder field that stores the temporary hash. + * + * @author Matthias Schmidt + * @copyright 2001-2020 WoltLab GmbH + * @license GNU Lesser General Public License + * @module WoltLabSuite/Core/Form/Builder/Field/Field/Wysiwyg/Attachment + * @since 5.2 + */ + +import Value from "../Value"; +import * as Core from "../../../../Core"; + +class Attachment extends Value { + constructor(fieldId: string) { + super(fieldId + "_tmpHash"); + } +} + +Core.enableLegacyInheritance(Attachment); + +export = Attachment;