From e53c6e9975cea9d7ca743a1659ff0ab0c7a0fce2 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 21 Feb 2021 20:29:48 +1100 Subject: [PATCH] Fancy --- InvenTree/InvenTree/static/css/inventree.css | 10 ++++++++++ InvenTree/templates/InvenTree/index.html | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index ac3d402c3b..2e044d3e6f 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -50,6 +50,16 @@ border-radius: 5px; } +.index-bg { + width: 100%; + object-fit: fill; + opacity: 5%; +} + +.index-action-selected { + background-color: #EEEEF5; +} + .markdownx .row { margin: 5px; padding: 5px; diff --git a/InvenTree/templates/InvenTree/index.html b/InvenTree/templates/InvenTree/index.html index bad3d3e9d7..ff69bf16d7 100644 --- a/InvenTree/templates/InvenTree/index.html +++ b/InvenTree/templates/InvenTree/index.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load i18n %} +{% load static %} {% load inventree_extras %} {% block page_title %} InvenTree | {% trans "Index" %} @@ -15,7 +16,11 @@ InvenTree | {% trans "Index" %}
@@ -69,6 +74,14 @@ function addHeaderAction(label, title, icon, options) { // Show the one we want $(`#detail-${label}`).fadeIn(); + + // Remove css class from all action items + $("#action-item-list").children('li').each(function() { + $(this).removeClass('index-action-selected'); + }) + + // Add css class to the action we are interested in + $(`#action-${label}`).addClass('index-action-selected'); }); // Connect a callback to the table