2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 20:20:58 +00:00

Stock table button cleanup

This commit is contained in:
Oliver Walters
2021-01-18 21:52:20 +11:00
parent 952da19600
commit 6a7c722efc
4 changed files with 37 additions and 9 deletions

View File

@ -133,8 +133,17 @@ function selectLabel(labels, items, options={}) {
);
// Construct form
var html = `
var html = '';
if (items.length > 0) {
html += `
<div class='alert alert-block alert-info'>
${items.length} {% trans "stock items selected" %}
</div>`;
}
html += `
<form method='post' action='' class='js-modal-form' enctype='multipart/form-data'>
<div class='form-group'>
<label class='control-label requiredField' for='id_label'>

View File

@ -625,9 +625,19 @@ function loadStockTable(table, options) {
],
});
/*
if (options.buttons) {
linkButtonsToSelection(table, options.buttons);
}
*/
linkButtonsToSelection(
table,
[
'#stock-print-options',
'#stock-options',
]
);
function stockAdjustment(action) {
var items = $("#stock-table").bootstrapTable("getSelections");