From 7e478c332ab23d6afb9d0202fe5e521f299f6508 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 13 Nov 2021 00:37:18 +0100 Subject: [PATCH] enable multiple admin buttons on one page --- InvenTree/InvenTree/static/script/inventree/inventree.js | 2 +- InvenTree/templates/admin_button.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/InvenTree/static/script/inventree/inventree.js b/InvenTree/InvenTree/static/script/inventree/inventree.js index 85ae042728..078cb52924 100644 --- a/InvenTree/InvenTree/static/script/inventree/inventree.js +++ b/InvenTree/InvenTree/static/script/inventree/inventree.js @@ -208,7 +208,7 @@ function inventreeDocReady() { }); // Callback for "admin view" button - $('#admin-button').click(function() { + $('#admin-button, .admin-button').click(function() { var url = $(this).attr('url'); location.href = url; diff --git a/InvenTree/templates/admin_button.html b/InvenTree/templates/admin_button.html index 7186246e4a..ebe767f9ac 100644 --- a/InvenTree/templates/admin_button.html +++ b/InvenTree/templates/admin_button.html @@ -1,4 +1,4 @@ {% load i18n %} - \ No newline at end of file