diff --git a/InvenTree/static/script/tables.js b/InvenTree/static/script/tables.js index 366bdbfe22..86195ad45a 100644 --- a/InvenTree/static/script/tables.js +++ b/InvenTree/static/script/tables.js @@ -1,9 +1,9 @@ function editButton(url, text='Edit') { - return ""; + return ""; } function deleteButton(url, text='Delete') { - return ""; + return ""; } function renderLink(text, url) { diff --git a/InvenTree/stock/templates/stock/location.html b/InvenTree/stock/templates/stock/location.html index 23244be5c5..1643d0332e 100644 --- a/InvenTree/stock/templates/stock/location.html +++ b/InvenTree/stock/templates/stock/location.html @@ -18,7 +18,7 @@
  • Edit
  • Delete
  • - + @@ -33,7 +33,16 @@ {% endif %}
    - + +
    {% include 'modals.html' %} @@ -79,11 +88,45 @@ launchModalForm("#modal-form", "{% url 'stock-item-create' %}", { - reload: true, + success: function() { + $("#stock-table").bootstrapTable('refresh'); + }, data: { location: {{ location.id }} } }); + + return false; + }); + + function selectedStock() { + return $("stock-table").bootstrapTable('getSelections'); + } + + $("#multi-item-move").click(function() { + + var items = selectedStock(); + + alert('Moving ' + items.length + ' items'); + + return false; + }); + + $("#multi-item-delete").click(function() { + + var items = selectedStock(); + + alert('Deleting ' + items.length + ' items'); + + return false; + }); + + $("#multi-item-stocktake").click(function() { + var items = selectedStock(); + + alert('Stocktake on ' + items.length + ' items'); + + return false; }); {% include 'stock/stock_table.html' with location=location %}