Skip to content

Commit e8b60d1

Browse files
committed
Adjust parameter / event names
1 parent f9e9956 commit e8b60d1

File tree

7 files changed

+16
-14
lines changed

7 files changed

+16
-14
lines changed

ts/WoltLabSuite/Core/Component/GridView.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class GridView {
9494
}
9595

9696
#initEventListeners(): void {
97-
this.#table.addEventListener("interaction:refresh-all", () => {
97+
this.#table.addEventListener("interaction:invalidate-all", () => {
9898
void this.#loadRows(StateChangeCause.Change);
9999
});
100100

ts/WoltLabSuite/Core/Component/Interaction/Rpc.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function handleRpcInteraction(
1919
endpoint: string,
2020
confirmationType: ConfirmationType,
2121
customConfirmationMessage: string = "",
22-
refreshAll = false,
22+
invalidatesAllItems = false,
2323
): Promise<void> {
2424
const confirmationResult = await handleConfirmation(objectName, confirmationType, customConfirmationMessage);
2525
if (!confirmationResult.result) {
@@ -51,8 +51,8 @@ async function handleRpcInteraction(
5151
);
5252
});
5353
} else {
54-
if (refreshAll) {
55-
container.dispatchEvent(new CustomEvent("interaction:refresh-all"));
54+
if (invalidatesAllItems) {
55+
container.dispatchEvent(new CustomEvent("interaction:invalidate-all"));
5656
} else {
5757
element.dispatchEvent(
5858
new CustomEvent("refresh", {
@@ -76,7 +76,7 @@ export function setup(identifier: string, container: HTMLElement): void {
7676
event.detail.endpoint,
7777
event.detail.confirmationType,
7878
event.detail.confirmationMessage,
79-
event.detail.refreshAll,
79+
event.detail.invalidatesAllItems === "true",
8080
);
8181
}
8282
});

wcfsetup/install/files/js/WoltLabSuite/Core/Component/GridView.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wcfsetup/install/files/js/WoltLabSuite/Core/Component/Interaction/Rpc.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wcfsetup/install/files/lib/system/interaction/RpcInteraction.class.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function __construct(
2727
protected readonly InteractionConfirmationType $confirmationType = InteractionConfirmationType::None,
2828
protected readonly string|\Closure $confirmationMessage = '',
2929
?\Closure $isAvailableCallback = null,
30-
protected readonly bool $refreshAll = false,
30+
protected readonly bool $invalidatesAllItems = false,
3131
) {
3232
parent::__construct($identifier, $isAvailableCallback);
3333
}
@@ -68,6 +68,8 @@ public function render(DatabaseObject $object): string
6868
}
6969
}
7070

71+
$invalidatesAllItems = $this->invalidatesAllItems ? 'true' : 'false';
72+
7173
return <<<HTML
7274
<button
7375
type="button"
@@ -76,7 +78,7 @@ public function render(DatabaseObject $object): string
7678
data-endpoint="{$endpoint}"
7779
data-confirmation-type="{$this->confirmationType->toString()}"
7880
data-confirmation-message="{$confirmationMessage}"
79-
data-refresh-all={$this->refreshAll}
81+
data-invalidates-all-items="{$invalidatesAllItems}"
8082
>
8183
{$label}
8284
</button>

wcfsetup/install/files/lib/system/interaction/admin/LanguageInteractions.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct()
3030
"core/languages/%s/default",
3131
"wcf.acp.language.setAsDefault",
3232
isAvailableCallback: static fn(Language $language) => !$language->isDefault,
33-
refreshAll: true
33+
invalidatesAllItems: true
3434
),
3535
new DeleteInteraction(
3636
"core/languages/%s",

wcfsetup/install/files/lib/system/interaction/admin/StyleInteractions.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct()
2828
'core/styles/%s/set-as-default',
2929
'wcf.acp.style.button.setAsDefault',
3030
isAvailableCallback: static fn(Style $object) => !$object->isDefault,
31-
refreshAll: true
31+
invalidatesAllItems: true
3232
),
3333
]);
3434

0 commit comments

Comments
 (0)