Release 0.248: auto-submit table filters on change
This commit is contained in:
@@ -37,7 +37,7 @@ $perPage = (int)($list->pagination['per_page'] ?? 15);
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<form method="get" action="<?= htmlspecialchars($list->basePath, ENT_QUOTES, 'UTF-8'); ?>" class="row mb15">
|
||||
<form method="get" action="<?= htmlspecialchars($list->basePath, ENT_QUOTES, 'UTF-8'); ?>" class="row mb15 js-table-filters-form">
|
||||
<?php foreach ($list->filters as $filter): ?>
|
||||
<?php
|
||||
$filterKey = (string)($filter['key'] ?? '');
|
||||
@@ -319,5 +319,20 @@ $perPage = (int)($list->pagination['per_page'] ?? 15);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).off(
|
||||
'change.tableListAutoFilter',
|
||||
'.js-table-filters-form select, .js-table-filters-form input[type="date"], .js-table-filters-form input[type="text"]'
|
||||
);
|
||||
$(document).on(
|
||||
'change.tableListAutoFilter',
|
||||
'.js-table-filters-form select, .js-table-filters-form input[type="date"], .js-table-filters-form input[type="text"]',
|
||||
function() {
|
||||
var form = $(this).closest('form');
|
||||
if (form.length) {
|
||||
form.trigger('submit');
|
||||
}
|
||||
}
|
||||
);
|
||||
})(window.jQuery);
|
||||
</script>
|
||||
|
||||
BIN
updates/0.20/ver_0.248.zip
Normal file
BIN
updates/0.20/ver_0.248.zip
Normal file
Binary file not shown.
@@ -1,4 +1,7 @@
|
||||
<b>ver. 0.247</b><br />
|
||||
<b>ver. 0.248</b><br />
|
||||
- UPDATE - filtry w nowych tabelach dzialaja automatycznie na `onchange`
|
||||
- UPDATE - `components/table-list`: auto-submit formularza filtrow po zmianie pola (select, date, text)
|
||||
<hr><b>ver. 0.247</b><br />
|
||||
- UPDATE - nowy dialog potwierdzenia usuwania w `components/table-list` (zamiast natywnego `confirm`)
|
||||
- UPDATE - popup usuwania: wiekszy rozmiar i centrowanie na srodku ekranu
|
||||
<hr><b>ver. 0.246</b><br />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?
|
||||
$current_ver = 247;
|
||||
$current_ver = 248;
|
||||
|
||||
for ($i = 1; $i <= $current_ver; $i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user