From 3ce8ba85f4b7eb731c469065660598615aecc023 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 28 Oct 2021 17:57:03 +1100 Subject: [PATCH] Further badge tweaks --- InvenTree/InvenTree/static/css/inventree.css | 16 ---------------- InvenTree/templates/InvenTree/index.html | 8 ++++++-- InvenTree/templates/InvenTree/search.html | 8 ++++++-- InvenTree/templates/js/translated/stock.js | 4 ---- 4 files changed, 12 insertions(+), 24 deletions(-) diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index 2e8172d1ae..559c30b219 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -434,22 +434,6 @@ .badge { float: right; - background-color: #777; - color: #fff; - border-radius: 5px; - margin-left: 10px; -} - -.badge-alert { - background-color: #f33; -} - -.badge-orange { - background-color: #fcba03; -} - -.badge-green { - background-color: #1A1; } .part-properties > span { diff --git a/InvenTree/templates/InvenTree/index.html b/InvenTree/templates/InvenTree/index.html index 147d22d6c3..ece19e741d 100644 --- a/InvenTree/templates/InvenTree/index.html +++ b/InvenTree/templates/InvenTree/index.html @@ -48,7 +48,7 @@ function addHeaderAction(label, title, icon, options) { ${title} - + ` @@ -89,8 +89,12 @@ function addHeaderAction(label, title, icon, options) { $(`#badge-${label}`).html(count); + $(`#badge-${label}`).removeClass('bg-dark'); + if (count > 0) { - $(`#badge-${label}`).addClass('badge-orange'); + $(`#badge-${label}`).addClass('bg-primary'); + } else { + $(`#badge-${label}`).addClass('bg-warning'); } }); } diff --git a/InvenTree/templates/InvenTree/search.html b/InvenTree/templates/InvenTree/search.html index 63db62cffa..06b51e995f 100644 --- a/InvenTree/templates/InvenTree/search.html +++ b/InvenTree/templates/InvenTree/search.html @@ -61,7 +61,7 @@ ${title} - + ` @@ -104,8 +104,12 @@ $(`#badge-${label}`).html(count); + $(`#badge-${label}`).removeClass('bg-dark'); + if (count > 0) { - $(`#badge-${label}`).addClass('badge-orange'); + $(`#badge-${label}`).addClass('bg-primary'); + } else { + $(`#badge-${label}`).addClass('bg-warning'); } }); } diff --git a/InvenTree/templates/js/translated/stock.js b/InvenTree/templates/js/translated/stock.js index a23ec654f2..a0bd2d383b 100644 --- a/InvenTree/templates/js/translated/stock.js +++ b/InvenTree/templates/js/translated/stock.js @@ -884,10 +884,6 @@ function loadStockTable(table, options) { return html; } }; - - if (!options.params.ordering) { - col['sortable'] = true; - } columns.push(col);