Refactoring, change menu, add many features
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
<button id="btn-{{ $model ?? null }}-filters" type="button" class="btn bg-gradient-secondary btn-filter" data-toggle="modal" data-target="#modal-{{ $model ?? null }}-filters">
|
||||
<i class="fa fa-fw fa-filter"></i>
|
||||
<div id="{{ $model ?? null }}-filters-badge" class="badge bg-orange text-light" style="top: -10px; position: absolute; display:none;"><i class="fa fa-exclamation-triangle"></i></div>
|
||||
</button>
|
||||
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
var $filter = $('#{{ $model ?? null }}-table-header .btn-filter');
|
||||
@@ -14,6 +16,7 @@
|
||||
$('#modal-{{ $model ?? null }}-filters').modal('hide');
|
||||
var table = window.LaravelDataTables["{{ $model ?? null }}-table"];
|
||||
table.draw();
|
||||
setAlertWhenFiltered('{{ $model ?? null }}');
|
||||
})
|
||||
|
||||
$('#modal-{{ $model ?? null }}-filters .reset').click(function() {
|
||||
@@ -22,6 +25,7 @@
|
||||
$('#{{ $model ?? null }}-filters .select2').val(null).trigger("change");
|
||||
})
|
||||
|
||||
setAlertWhenFiltered('{{ $model ?? null }}');
|
||||
|
||||
/*
|
||||
$filter.on( 'click', function () {
|
||||
|
||||
@@ -4,7 +4,19 @@
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu" x-placement="bottom-start">
|
||||
<li class="dropdown-item"><a href="{{ $route }}/mailSelection">{{ __('admin.mail_the_selection') }}</a></li>
|
||||
<li class="dropdown-item"><a href="{{ $route }}/mailAll">{{ __('admin.mail_the_complete_list') }}</a></li>
|
||||
<li class="dropdown-item"><a href="{{ $route }}/mailSelection">{{ __('fg.mail_the_selection') }}</a></li>
|
||||
<li class="dropdown-item"><a href="#" class="{{ $model }}-mailall">{{ __('fg.mail_the_complete_list') }}</a></li>
|
||||
</ul>
|
||||
</span>
|
||||
|
||||
@push('js')
|
||||
|
||||
<script>
|
||||
$('.{{ $model }}-mailall').click(function() {
|
||||
var data = $('#{{ $model }}-filters').serialize();
|
||||
var url = "{{ $route }}/mailAll?" + data;
|
||||
window.location = url;
|
||||
});
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@include('components.select', ['name' => 'pager', 'id_name'=> $model . '_pager', 'list' => [5 => '5', 10 => '10', 25 => '25', 50 => '50', 100 => '100']])
|
||||
@include('components.form.select', ['name' => 'pager', 'id_name'=> $model . '_pager', 'value' => 10, 'list' => [5 => '5', 10 => '10', 25 => '25', 50 => '50', 100 => '100']])
|
||||
|
||||
|
||||
@push('js')
|
||||
|
||||
@@ -6,7 +6,12 @@
|
||||
<script>
|
||||
$('.{{ $model }}-print').click(function() {
|
||||
var data = $('#{{ $model }}-filters').serialize();
|
||||
var url = "{{ $route }}/print?" + data;
|
||||
var order = getDatatableOrderJson('{{ $model }}');
|
||||
console.log(order);
|
||||
var order_txt = $.param(order);
|
||||
console.log(order_txt);
|
||||
var url = "{{ $route }}/print?" + data + '&' + order_txt;
|
||||
console.log(url);
|
||||
// window.location = url;
|
||||
var print = window.open(url, 'print');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user