/**
* Data handler for a content language form builder field in an Ajax form.
*
- * @author Matthias Schmidt
- * @copyright 2001-2019 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @module WoltLabSuite/Core/Form/Builder/Field/Language/ContentLanguage
- * @since 5.2
+ * @author Matthias Schmidt
+ * @copyright 2001-2020 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @module WoltLabSuite/Core/Form/Builder/Field/Language/ContentLanguage
+ * @since 5.2
*/
-define(['Core', 'WoltLabSuite/Core/Language/Chooser', '../Value'], function (Core, LanguageChooser, FormBuilderFieldValue) {
+define(["require", "exports", "tslib", "../Value", "../../../../Language/Chooser", "../../../../Core"], function (require, exports, tslib_1, Value_1, LanguageChooser, Core) {
"use strict";
- /**
- * @constructor
- */
- function FormBuilderFieldContentLanguage(fieldId) {
- this.init(fieldId);
- }
- ;
- Core.inherit(FormBuilderFieldContentLanguage, FormBuilderFieldValue, {
- /**
- * @see WoltLabSuite/Core/Form/Builder/Field/Field#destroy
- */
- destroy: function () {
+ Value_1 = tslib_1.__importDefault(Value_1);
+ LanguageChooser = tslib_1.__importStar(LanguageChooser);
+ Core = tslib_1.__importStar(Core);
+ class ContentLanguage extends Value_1.default {
+ destroy() {
LanguageChooser.removeChooser(this._fieldId);
}
- });
- return FormBuilderFieldContentLanguage;
+ }
+ Core.enableLegacyInheritance(ContentLanguage);
+ return ContentLanguage;
});
+++ /dev/null
-/**
- * Data handler for a content language form builder field in an Ajax form.
- *
- * @author Matthias Schmidt
- * @copyright 2001-2019 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @module WoltLabSuite/Core/Form/Builder/Field/Language/ContentLanguage
- * @since 5.2
- */
-define(['Core', 'WoltLabSuite/Core/Language/Chooser', '../Value'], function(Core, LanguageChooser, FormBuilderFieldValue) {
- "use strict";
-
- /**
- * @constructor
- */
- function FormBuilderFieldContentLanguage(fieldId) {
- this.init(fieldId);
- };
- Core.inherit(FormBuilderFieldContentLanguage, FormBuilderFieldValue, {
- /**
- * @see WoltLabSuite/Core/Form/Builder/Field/Field#destroy
- */
- destroy: function() {
- LanguageChooser.removeChooser(this._fieldId);
- }
- });
-
- return FormBuilderFieldContentLanguage;
-});
--- /dev/null
+/**
+ * Data handler for a content language form builder field in an Ajax form.
+ *
+ * @author Matthias Schmidt
+ * @copyright 2001-2020 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @module WoltLabSuite/Core/Form/Builder/Field/Language/ContentLanguage
+ * @since 5.2
+ */
+
+import Value from "../Value";
+import * as LanguageChooser from "../../../../Language/Chooser";
+import * as Core from "../../../../Core";
+
+class ContentLanguage extends Value {
+ public destroy(): void {
+ LanguageChooser.removeChooser(this._fieldId);
+ }
+}
+
+Core.enableLegacyInheritance(ContentLanguage);
+
+export = ContentLanguage;