mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-02 13:28:49 +00:00
document arguments
This commit is contained in:
parent
a1e0bef70d
commit
5d7a153d87
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user