mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 16:44:55 +00:00
Streamline data tables
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
$('#batteries-overview-table').DataTable({
|
||||
'bPaginate': false,
|
||||
var batteriesOverviewTable = $('#batteries-overview-table').DataTable({
|
||||
'paginate': false,
|
||||
'order': [[2, 'desc']],
|
||||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 }
|
||||
@@ -7,6 +7,17 @@
|
||||
'language': JSON.parse(L('datatables_localization'))
|
||||
});
|
||||
|
||||
$("#search").on("keyup", function()
|
||||
{
|
||||
var value = $(this).val();
|
||||
if (value === "all")
|
||||
{
|
||||
value = "";
|
||||
}
|
||||
|
||||
batteriesOverviewTable.search(value).draw();
|
||||
});
|
||||
|
||||
$(document).on('click', '.track-charge-cycle-button', function(e)
|
||||
{
|
||||
var batteryId = $(e.currentTarget).attr('data-battery-id');
|
||||
|
Reference in New Issue
Block a user