Working button in UI

This commit is contained in:
Marc Ole Bulling 2021-01-15 01:31:18 +01:00
parent 65a9a9cd2c
commit a8fdedab64
No known key found for this signature in database
GPG Key ID: C126AFC2A47B06FF

View File

@ -1,4 +1,4 @@
var shoppingListTable = $('#shoppinglist-table').DataTable({ var shoppingListTable = $('#shoppinglist-table').DataTable({
'order': [[1, 'asc']], 'order': [[1, 'asc']],
"orderFixed": [[3, 'asc']], "orderFixed": [[3, 'asc']],
'columnDefs': [ 'columnDefs': [
@ -448,7 +448,17 @@ $(document).on("click", "#print-shopping-list-button", function(e)
className: 'btn-secondary', className: 'btn-secondary',
callback: function() callback: function()
{ {
bootbox.hideAll(); Grocy.Api.Get('print/shoppinglist/thermal', { "list": $("#selected-shopping-list").val(),
"printHeader": $("#print-show-header").prop("checked") },
function(result)
{
bootbox.hideAll();
},
function(xhr)
{
console.error(xhr);
}
);
} }
}, },
ok: { ok: {