From 679647433a0028349f3662de6addf9d9238cc938 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 30 Nov 2021 22:49:30 +0100 Subject: [PATCH] smaller read button --- .../InvenTree/static/script/inventree/notification.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/InvenTree/InvenTree/static/script/inventree/notification.js b/InvenTree/InvenTree/static/script/inventree/notification.js index d3ff9defe8..516d438a54 100644 --- a/InvenTree/InvenTree/static/script/inventree/notification.js +++ b/InvenTree/InvenTree/static/script/inventree/notification.js @@ -209,8 +209,9 @@ function updateNotificationReadState(btn, panel_caller=false) { * arguments: * - pk: primary key of the notification * - state: current state of the notification (read / unread) -> just pass what you were handed by the api + * - small: should the button be small **/ -function getReadEditButton(pk, state) { +function getReadEditButton(pk, state, small=false) { if (state) { var bReadText = '{% trans "Mark as unread" %}'; var bReadIcon = 'fas fa-bookmark icon-red'; @@ -220,7 +221,9 @@ function getReadEditButton(pk, state) { var bReadIcon = 'far fa-bookmark icon-green'; var bReadTarget = 'read'; } - return ``; + + var style = (small) ? 'btn-sm ' : ''; + return ``; } /** @@ -256,7 +259,7 @@ function openNotificationPanel() { } html += '
'; html += `${item.age_human}`; - html += getReadEditButton(item.pk, item.read); + html += getReadEditButton(item.pk, item.read, true); html += "
"; });