Update `Ui/Object/Action` implementation
authorMatthias Schmidt <gravatronics@live.com>
Tue, 30 Mar 2021 13:42:13 +0000 (15:42 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 30 Mar 2021 13:42:13 +0000 (15:42 +0200)
See WoltLab/WCF@afc2ab81100a477e2fa1d92783837f6e064a8af6

files/js/WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant.js
ts/WoltLabSuite/Core/Conversation/Ui/Object/Action/RemoveParticipant.ts

index 105bbc212a96f92166db5051923e2b3dd119cd83..327266deb1304e25070ad11ec3dab3ea946fe744 100644 (file)
@@ -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);
index 1e79e6e9334f21f0928c47c5a3a878b561d8a3e4..58368f658c5ae65bfcb64104f73646503e50057c 100644 (file)
@@ -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 {