Update with new price management

This commit is contained in:
Ludovic CANDELLIER
2021-03-22 00:47:44 +01:00
parent 083d358fbd
commit 37ffaa938b
64 changed files with 1118 additions and 984 deletions

View File

@@ -4,10 +4,17 @@
@push('js')
<script>
$('#{{ $model }}_pager').change(function() {
var table = window.LaravelDataTables["{{ $model }}-table"];
var len = $(this).val();
table.page.len(len).draw();
$( document ).ready(function() {
var table = getDatatable("{{ $model }}");
var state = getDatatableState("{{ $model }}");
if (state && (typeof(state.length) != 'undefined')) {
$('#{{ $model }}_pager').val(state.length);
}
$('#{{ $model }}_pager').change(function() {
table.page.len($(this).val()).draw();
});
});
</script>