From: Matthias Schmidt Date: Tue, 30 Mar 2021 13:42:13 +0000 (+0200) Subject: Update `Ui/Object/Action` implementation X-Git-Tag: 5.4.0_Alpha_1~21 X-Git-Url: https://git.stricted.de/?p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.conversation.git;a=commitdiff_plain;h=18a17ac7751eff0c0f0e4456b5c4edf89b5bd7a6 Update `Ui/Object/Action` implementation See WoltLab/WCF@afc2ab81100a477e2fa1d92783837f6e064a8af6 --- diff --git a/files/js/WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant.js b/files/js/WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant.js index 105bbc2..327266d 100644 --- a/files/js/WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant.js +++ b/files/js/WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant.js @@ -11,9 +11,9 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Ui/Object/Action/Handl Object.defineProperty(exports, "__esModule", { value: true }); exports.setup = void 0; Handler_1 = tslib_1.__importDefault(Handler_1); - function removeParticipant(data, objectElement) { - objectElement.querySelector(".userLink").classList.add("conversationLeft"); - objectElement.querySelector(".jsObjectAction[data-object-action='removeParticipant']").remove(); + function removeParticipant(data) { + data.objectElement.querySelector(".userLink").classList.add("conversationLeft"); + data.objectElement.querySelector(".jsObjectAction[data-object-action='removeParticipant']").remove(); } function setup() { new Handler_1.default("removeParticipant", [], removeParticipant); diff --git a/ts/WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant.ts b/ts/WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant.ts index 1e79e6e..58368f6 100644 --- a/ts/WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant.ts +++ b/ts/WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant.ts @@ -8,11 +8,11 @@ */ import UiObjectActionHandler from "WoltLabSuite/Core/Ui/Object/Action/Handler"; -import { DatabaseObjectActionResponse } from "WoltLabSuite/Core/Ajax/Data"; +import { ObjectActionData } from "WoltLabSuite/Core/Ui/Object/Data"; -function removeParticipant(data: DatabaseObjectActionResponse, objectElement: HTMLElement): void { - objectElement.querySelector(".userLink")!.classList.add("conversationLeft"); - objectElement.querySelector(".jsObjectAction[data-object-action='removeParticipant']")!.remove(); +function removeParticipant(data: ObjectActionData): void { + data.objectElement.querySelector(".userLink")!.classList.add("conversationLeft"); + data.objectElement.querySelector(".jsObjectAction[data-object-action='removeParticipant']")!.remove(); } export function setup(): void {