Moved enableNavbar to part_base template

This commit is contained in:
eeintech 2021-08-06 11:15:16 -04:00
parent 1eb8a9f310
commit 6280ed1ade
3 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
{% extends "part/part_base.html" %} {% extends "part/part_base.html" %}
{% load static %}
{% load i18n %}
{% load inventree_extras %} {% load inventree_extras %}
{% load i18n %}
{% load static %}
{% block menubar %} {% block menubar %}
<ul class='list-group'> <ul class='list-group'>

View File

@ -333,12 +333,6 @@
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
enableNavbar({
label: 'part',
toggleId: '#part-menu-toggle',
});
loadBuildOrderAllocationTable("#build-order-allocation-table", { loadBuildOrderAllocationTable("#build-order-allocation-table", {
params: { params: {
part: {{ part.id }}, part: {{ part.id }},

View File

@ -213,6 +213,7 @@
<p> <p>
<!-- Details show/hide button --> <!-- Details show/hide button -->
<button id="toggle-part-details" class="btn btn-primary" data-toggle="collapse" data-target="#collapsible-part-details" value="show"> <button id="toggle-part-details" class="btn btn-primary" data-toggle="collapse" data-target="#collapsible-part-details" value="show">
<span class="fas fa-chevron-down"></span> {% trans "Show Part Details" %}
</button> </button>
</p> </p>
@ -305,6 +306,11 @@
{% block js_ready %} {% block js_ready %}
{{ block.super }} {{ block.super }}
enableNavbar({
label: 'part',
toggleId: '#part-menu-toggle',
});
{% if part.image %} {% if part.image %}
$('#part-thumb').click(function() { $('#part-thumb').click(function() {
showModalImage('{{ part.image.url }}'); showModalImage('{{ part.image.url }}');