2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 19:15:41 +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

@ -132,46 +132,7 @@
return false;
});
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;
});
loadStockTable($("#stock-table"), {
buttons: [
'#stock-options',