From 5d7a153d873472184f079efe272aca40b0566001 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 30 Nov 2021 17:22:31 +0100 Subject: [PATCH] document arguments --- .../InvenTree/static/script/inventree/notification.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/InvenTree/InvenTree/static/script/inventree/notification.js b/InvenTree/InvenTree/static/script/inventree/notification.js index 7181cf01c9..8e4b05a546 100644 --- a/InvenTree/InvenTree/static/script/inventree/notification.js +++ b/InvenTree/InvenTree/static/script/inventree/notification.js @@ -143,6 +143,12 @@ function notificationCheck() { /** * handles read / unread buttons and UI rebuilding + * + * arguments: + * - btn: element that got clicked / fired the event -> must contain pk and target as attributes + * + * options: + * - panel_caller: this button was clicked in the notification panel **/ function updateNotificationReadState(btn, panel_caller=false) { var url = `/api/notifications/${btn.attr('pk')}/${btn.attr('target')}/`; @@ -175,6 +181,10 @@ function updateNotificationReadState(btn, panel_caller=false) { /** * Returns the html for a read / unread button + * + * arguments: + * - pk: primary key of the notification + * - state: current state of the notification (read / unread) -> just pass what you were handed by the api **/ function getReadEditButton(pk, state) { if (state) {