mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Remove rows from order form
This commit is contained in:
parent
3bb76060d9
commit
4be82a31ce
@ -25,7 +25,7 @@
|
||||
<table class='table table-condensed table-striped' id='order-wizard-part-table'>
|
||||
<tr>
|
||||
<th>Part</th>
|
||||
<th>Supplier</th>
|
||||
<th colspan='2'>Select Supplier</th>
|
||||
<th>Quantity</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@ -35,6 +35,11 @@
|
||||
{% include "hover_image.html" with image=part.image hover=False %}
|
||||
{{ part.full_name }} <small><i>{{ part.description }}</i></small>
|
||||
</td>
|
||||
<td>
|
||||
<button class='btn btn-default btn-create' id='new_supplier_part_{{ part.id }}' title='Create new supplier part for {{ part }}' type='button'>
|
||||
<span onClick='newSupplierPartFromWizard()' class='glyphicon glyphicon-small glyphicon-plus'></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
<div class='control-group'>
|
||||
<div class='controls'>
|
||||
@ -59,7 +64,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<button class='btn btn-default btn-remove' id='del_item_{{ part.id }}' title='Remove part' type='button'>
|
||||
<span row='part_row_{{ part.id }}' onclick='removeOrderRow()' class='glyphicon glyphicon-small glyphicon-remove'></span>
|
||||
<span row='part_row_{{ part.id }}' onclick='removeOrderRowFromOrderWizard()' class='glyphicon glyphicon-small glyphicon-remove'></span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -27,8 +27,7 @@
|
||||
<tr>
|
||||
<th>Supplier</th>
|
||||
<th>Items</th>
|
||||
<th>Purchase Order</th>
|
||||
<th></th>
|
||||
<th colspan='2'>Select Purchase Order</th>
|
||||
</tr>
|
||||
{% for supplier in suppliers %}
|
||||
<tr id='suppier_row_{{ supplier.id }}'>
|
||||
@ -37,6 +36,15 @@
|
||||
{{ supplier.name }}
|
||||
</td>
|
||||
<td>{{ supplier.order_items|length }}</td>
|
||||
<td>
|
||||
<button
|
||||
class='btn btn-default btn-create'
|
||||
id='new_po_{{ supplier.id }}'
|
||||
title='Create new purchase order for {{ supplier.name }}'
|
||||
type='button'>
|
||||
<span onclick='newPurchaseOrderFromWizard()' class='glyphicon glyphicon-small glyphicon-plus'></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
<div class='control-group'>
|
||||
<div class='controls'>
|
||||
@ -57,15 +65,6 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<button
|
||||
class='btn btn-default btn-create'
|
||||
id='new_po_{{ supplier.id }}'
|
||||
title='Create new purchase order for {{ supplier.name }}'
|
||||
type='button'>
|
||||
<span onclick='newPurchaseOrderFromWizard()' class='glyphicon glyphicon-small glyphicon-plus'></span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
|
11
InvenTree/static/script/inventree/order.js
Normal file
11
InvenTree/static/script/inventree/order.js
Normal file
@ -0,0 +1,11 @@
|
||||
function removeOrderRowFromOrderWizard(e) {
|
||||
/* Remove a part selection from an order form. */
|
||||
|
||||
e = e || window.event;
|
||||
|
||||
var src = e.target || e.srcElement;
|
||||
|
||||
var row = $(src).attr('row');
|
||||
|
||||
$('#' + row).remove();
|
||||
}
|
@ -99,6 +99,7 @@ InvenTree
|
||||
<script type='text/javascript' src="{% static 'script/inventree/api.js' %}"></script>
|
||||
<script type='text/javascript' src="{% static 'script/inventree/tables.js' %}"></script>
|
||||
<script type='text/javascript' src="{% static 'script/inventree/modals.js' %}"></script>
|
||||
<script type='text/javascript' src="{% static 'script/inventree/order.js' %}"></script>
|
||||
<script type='text/javascript' src="{% static 'script/inventree/notification.js' %}"></script>
|
||||
<script type='text/javascript' src="{% static 'script/inventree/sidenav.js' %}"></script>
|
||||
{% block js_load %}
|
||||
|
Loading…
Reference in New Issue
Block a user