From c390142d906d745d6f040fcc5483a4ed9b33c176 Mon Sep 17 00:00:00 2001 From: joshuaruesweg Date: Wed, 16 Jun 2021 11:09:19 +0200 Subject: [PATCH] Add AbstractUserAction class --- .../Acp/Ui/User/Action/AbstractUserAction.ts | 17 +++++++++++++++++ .../Acp/Ui/User/Action/AbstractUserAction.js | 15 +++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 ts/WoltLabSuite/Core/Acp/Ui/User/Action/AbstractUserAction.ts create mode 100644 wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/User/Action/AbstractUserAction.js diff --git a/ts/WoltLabSuite/Core/Acp/Ui/User/Action/AbstractUserAction.ts b/ts/WoltLabSuite/Core/Acp/Ui/User/Action/AbstractUserAction.ts new file mode 100644 index 0000000000..4537cda044 --- /dev/null +++ b/ts/WoltLabSuite/Core/Acp/Ui/User/Action/AbstractUserAction.ts @@ -0,0 +1,17 @@ +export abstract class AbstractUserAction { + protected button: HTMLElement; + protected userData: HTMLElement; + protected userId: number; + + public constructor(button: HTMLElement, userId: number, userDataElement: HTMLElement) { + this.button = button; + this.userId = userId; + this.userData = userDataElement; + + this.init(); + } + + protected abstract init(); +} + +export default AbstractUserAction; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/User/Action/AbstractUserAction.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/User/Action/AbstractUserAction.js new file mode 100644 index 0000000000..1bc3ee1986 --- /dev/null +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Acp/Ui/User/Action/AbstractUserAction.js @@ -0,0 +1,15 @@ +define(["require", "exports"], function (require, exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.AbstractUserAction = void 0; + class AbstractUserAction { + constructor(button, userId, userDataElement) { + this.button = button; + this.userId = userId; + this.userData = userDataElement; + this.init(); + } + } + exports.AbstractUserAction = AbstractUserAction; + exports.default = AbstractUserAction; +}); -- 2.20.1