From 08682308b195061788c2c53d23ce8b4dd89edd34 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 8 Jan 2022 16:02:50 +0100 Subject: [PATCH] Apply review suggestion from @raccube Co-authored-by: Karina Kwiatek <6197148+raccube@users.noreply.github.com> --- .../features/moderation/privilege.ts | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/app/javascript/retrospring/features/moderation/privilege.ts b/app/javascript/retrospring/features/moderation/privilege.ts index fe57c7fa..e5c42572 100644 --- a/app/javascript/retrospring/features/moderation/privilege.ts +++ b/app/javascript/retrospring/features/moderation/privilege.ts @@ -34,31 +34,4 @@ export function privilegeCheckHandler(event: Event): void { } }); - - /* - ($ document).on "click", "input[type=checkbox][name=check-your-privileges]", -> - box = $(this) - box.attr 'disabled', 'disabled' - - privType = box[0].dataset.type - boxChecked = box[0].checked - - $.ajax - url: '/ajax/mod/privilege' - type: 'POST' - data: - user: box[0].dataset.user - type: privType - status: boxChecked - success: (data, status, jqxhr) -> - if data.success - box[0].checked = if data.checked? then data.checked else !boxChecked - showNotification data.message, data.success - error: (jqxhr, status, error) -> - box[0].checked = false - console.log jqxhr, status, error - showNotification translate('frontend.error.message'), false - complete: (jqxhr, status) -> - box.removeAttr "disabled" - */ } \ No newline at end of file