2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-08 04:40:57 +00:00

Refactor some code

This commit is contained in:
Oliver Walters
2019-05-16 22:19:49 +10:00
parent 0a1887477c
commit 117fd701cd
3 changed files with 37 additions and 79 deletions

View File

@@ -44,43 +44,4 @@
url: "{% url 'api-stock-list' %}",
});
function selectedStock() {
return $("#stock-table").bootstrapTable('getSelections');
}
$("#multi-item-move").click(function() {
var items = selectedStock();
moveStockItems(items,
{
success: function() {
$("#stock-table").bootstrapTable('refresh');
}
});
return false;
});
$("#multi-item-stocktake").click(function() {
updateStockItems({
action: 'stocktake'
});
return false;
});
$("#multi-item-remove").click(function() {
updateStockItems({
action: 'remove',
});
return false;
});
$("#multi-item-add").click(function() {
updateStockItems({
action: 'add',
});
return false;
})
{% endblock %}