mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-14 15:41:10 +00:00
Javascript consolidation
This commit is contained in:
@@ -11,8 +11,6 @@
|
||||
|
||||
{% include 'part/tabs.html' with tab='bom' %}
|
||||
|
||||
{% include 'modals.html' %}
|
||||
|
||||
<h3>Bill of Materials</h3>
|
||||
|
||||
<table class="table table-striped" id='bom-table' data-sorting='true'>
|
||||
|
@@ -35,14 +35,10 @@
|
||||
<button class="btn btn-success" id='start-build'>Start New Build</button>
|
||||
</div>
|
||||
|
||||
{% include 'modals.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_load %}
|
||||
<script type='text/javascript' src="{% static 'script/modal_form.js' %}"></script>
|
||||
{% endblock %}
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
$("#start-build").click(function() {
|
||||
launchModalForm("#modal-form",
|
||||
"{% url 'build-create' %}",
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<table class="table table-striped" data-sorting='true' id="part-list">
|
||||
<table class="table table-striped" data-sorting='true' data-filtering='true' id="part-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Part</th>
|
||||
|
@@ -6,8 +6,6 @@
|
||||
|
||||
<h3>Part Details</h3>
|
||||
|
||||
{% include 'modals.html' %}
|
||||
|
||||
<table class='table table-striped'>
|
||||
<tr>
|
||||
<td>Part name</td>
|
||||
@@ -88,14 +86,14 @@
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block js_load %}
|
||||
|
||||
<script type='text/javascript' src="{% static 'script/modal_form.js' %}"></script>
|
||||
{% endblock %}
|
||||
{% block js_ready %}
|
||||
|
||||
{{ block.super }}
|
||||
$("#edit-part").click(function() {
|
||||
launchModalForm("#modal-form", "{% url 'part-edit' part.id %}");
|
||||
launchModalForm("#modal-form",
|
||||
"{% url 'part-edit' part.id %}",
|
||||
{
|
||||
reload: true
|
||||
});
|
||||
});
|
||||
|
||||
$('#delete-part').click(function() {
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<div class="col-sm-6">
|
||||
<div class="media">
|
||||
<div class="media-left">
|
||||
<img class="part-thumb"
|
||||
<img class="part-thumb" id="part-thumb"
|
||||
{% if part.image %}
|
||||
src="{{ part.image.url }}"
|
||||
{% else %}
|
||||
@@ -94,4 +94,19 @@
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% include 'modals.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_load %}
|
||||
<script type='text/javascript' src="{% static 'script/modal_form.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
|
||||
$("#part-thumb").click(function() {
|
||||
launchModalForm("#modal-form",
|
||||
"{% url 'part-image' part.id %}",
|
||||
);
|
||||
});
|
||||
{% endblock %}
|
@@ -45,16 +45,14 @@
|
||||
<button class='btn btn-success' id='add-stock-item'>Add new Stock Item</button>
|
||||
</div>
|
||||
|
||||
{% include 'modals.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_load %}
|
||||
|
||||
{{ block.super }}
|
||||
<script type='text/javascript' src="{% static 'script/footable.js' %}"></script>
|
||||
<script type='text/javascript' src="{% static 'script/modal_form.js' %}"></script>
|
||||
{% endblock %}
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
$('#stock-table').footable();
|
||||
|
||||
$('#add-stock-item').click(function () {
|
||||
|
@@ -35,16 +35,14 @@
|
||||
<button class="btn btn-success" id='supplier-create'>New Supplier Part</button>
|
||||
</div>
|
||||
|
||||
{% include 'modals.html' %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_load %}
|
||||
|
||||
{{ block.super }}
|
||||
<script type='text/javascript' src="{% static 'script/footable.js' %}"></script>``
|
||||
<script type='text/javascript' src="{% static 'script/modal_form.js' %}"></script>
|
||||
{% endblock %}
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
$('#supplier-table').footable();
|
||||
|
||||
$('#supplier-create').click(function () {
|
||||
|
Reference in New Issue
Block a user