From 2e87499fa56e4e981018b44b72b82c5d95b3fc3b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 23 Feb 2021 21:51:41 +1100 Subject: [PATCH] Basic right-side menu for part --- InvenTree/InvenTree/static/css/inventree.css | 9 ++- InvenTree/part/templates/part/navbar.html | 59 +++++++++++++++++++ .../part/templates/part/part_app_base.html | 1 - InvenTree/part/templates/part/part_base.html | 9 ++- InvenTree/templates/base.html | 11 ++-- 5 files changed, 80 insertions(+), 9 deletions(-) create mode 100644 InvenTree/part/templates/part/navbar.html diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index afcac3ce4e..8dd94470d2 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -691,9 +691,8 @@ input[type="submit"] { overflow: hidden; transition: 0.1s; /* 0.5 second transition effect to slide in the sidenav */ z-index: 100; - display: inline-block; background-color: #fff; /* Black*/ - display: 'none'; + //display: 'none'; } .sidenav li { @@ -705,6 +704,7 @@ input[type="submit"] { .sidenav-left { left: 0px; top: 0px; + width: 0px; } .sidenav-left .badge { @@ -714,10 +714,15 @@ input[type="submit"] { } .sidenav-right { + width: 0px; right: 0px; top: 0px; } +.sidenav-right svg { + margin-right: 10px; +} + .container > aside, .container > main { padding: 10px; diff --git a/InvenTree/part/templates/part/navbar.html b/InvenTree/part/templates/part/navbar.html new file mode 100644 index 0000000000..e25df85256 --- /dev/null +++ b/InvenTree/part/templates/part/navbar.html @@ -0,0 +1,59 @@ +{% load i18n %} +{% load static %} +{% load inventree_extras %} + + diff --git a/InvenTree/part/templates/part/part_app_base.html b/InvenTree/part/templates/part/part_app_base.html index de2d5ca6a6..045027e063 100644 --- a/InvenTree/part/templates/part/part_app_base.html +++ b/InvenTree/part/templates/part/part_app_base.html @@ -39,7 +39,6 @@ InvenTree | {% trans "Part List" %} ); $("#toggle-part-tree").click(function() { - console.log('toggle side navver'); toggleSideNav("#sidenav-left"); return false; }); diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 6b0163089d..08d5c53214 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -4,6 +4,10 @@ {% load i18n %} {% load inventree_extras %} +{% block menubar %} +{% include "part/navbar.html" %} +{% endblock %} + {% block content %} {% if part.virtual %} @@ -183,7 +187,8 @@
-{% block details %} + + {% block details %} @@ -195,6 +200,8 @@ {% block js_ready %} {{ block.super }} + enableRightNavbar(); + enableDragAndDrop( '#part-thumb', "{% url 'part-image-upload' part.id %}", diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 186e4f1e29..7b1951bea2 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -88,11 +88,12 @@ InvenTree {% endblock %} -
- {% block menubar %} - - {% endblock %} -
+
+ +
+ {% block menubar %} + + {% endblock %}
{% block post_content %}