Add 'options' drop-down for Part table in Category view

- Doesn't do anything yet
This commit is contained in:
Oliver Walters 2019-05-04 16:41:45 +10:00
parent b1cdb7833d
commit b6cace2681
2 changed files with 17 additions and 4 deletions

View File

@ -41,7 +41,15 @@
<hr>
<div id='button-toolbar'>
<button style='float: right;' class='btn btn-success' id='part-create'>New Part</button>
<div class='container-fluid' style="float: right;">
<button class='btn btn-success' id='part-create'>New Part</button>
<div class='dropdown' style='float: right;'>
<button id='part-options' class='btn btn-primary dropdown-toggle' type='button' data-toggle="dropdown">Options<span class='caret'></span></button>
<ul class='dropdown-menu'>
<li><a href='#' id='multi-part-category' title='Set Part Category'>Set Category</a></li>
</ul>
</div>
</div>
</div>
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='part-table'>
@ -50,6 +58,7 @@
{% endblock %}
{% block js_load %}
{{ block.super }}
<script type='text/javascript' src="{% static 'script/inventree/api.js' %}"></script>
<script type='text/javacript' src="{% static 'script/inventree/stock.js' %}"></script>
{% endblock %}
{% block js_ready %}
@ -179,4 +188,9 @@
url: "{% url 'api-part-list' %}",
});
linkButtonsToSelection(
$("#part-table"),
['#part-options']
);
{% endblock %}

View File

@ -43,10 +43,9 @@
<div id='button-toolbar'>
<div class='container-fluid' style='float: right;'>
<button class="btn btn-success" id='item-create'>New Stock Item</span></button>
<button class="btn btn-success" id='item-create'>New Stock Item</button>
<div class="dropdown" style='float: right;'>
<button id='stock-options' class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options
<span class="caret"></span></button>
<button id='stock-options' class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#" id='multi-item-add' title='Add to selected stock items'>Add stock</a></li>
<li><a href="#" id='multi-item-remove' title='Remove from selected stock items'>Remove stock</a></li>