%PDF- %PDF-
Direktori : /home/silvzytp/calling_code/resources/views/backend/pages/compare/ |
Current File : /home/silvzytp/calling_code/resources/views/backend/pages/compare/file-compare-form.blade.php |
@extends('layouts.backend') @section('title', $siteTitle) @push('styles') @endpush @section('content') <div class="row"> <div class="col-12"> <div id="bulk-box" class="d-none"> <form method="GET" action="{{ route(routeName().'.file.compare.filter') }}"> <div class="d-flex align-items-center mb-3"> <x-form.selectbox name="compare" divClass="mb-0"> <option value="">-- Select Compare --</option> <option value="compare">Compare</option> </x-form.selectbox> <input type="hidden" name="compare"> <div class="bulk-applys"> <button class="btn btn-md btn-primary rounded-0 ml-2 px-3" type="submit">Apply</button> </div> </div> </form> </div> <div class="card"> <div class="card-body px-0"> <table class="table table-sm table-border table-striped table-hover table-style" id="file_compare-datatables"> <thead> <th> <div class="custom-control custom-checkbox"> <input type="checkbox" class="custom-control-input" id="checked-all"> <label class="custom-control-label" for="checked-all"></label> </div> </th> <th>File Name</th> <th>Total Numbers</th> </thead> <tbody> </tbody> </table> </div> </div> </div> </div> @endsection @push('scripts') <script> table = $('#file_compare-datatables').DataTable({ processing: true, serverSide: true, order: [], //Initial no order bInfo: true, //TO show the total number of data bFilter: false, //For datatable default search box show/hide responsive: true, ordering: false, lengthMenu: [ [5, 10, 15, 25, 50, 100, 1000, 10000, -1], [5, 10, 15, 25, 50, 100, 1000, 10000, "All"] ], pageLength: 10, //number of data show per page ajax: { url: "{{ route(routeName().'.file.compare.index') }}", type: "GET", dataType: "JSON", data: function(d) { d._token = _token; d.search_input = $('input#search_here').val(); }, }, columns: [ {data: 'bulk_check',orderable: false, searchable: false}, {data: 'file_name'}, {data: 'total_call'} ], language: { processing: '<img src="{{ asset("uploads/images/table-loading.svg") }}">', emptyTable: '<strong class="text-danger">No Data Found</strong>', infoEmpty: '', zeroRecords: '<strong class="text-danger">No Data Found</strong>', oPaginate: { sPrevious: "Previous", // This is the link to the previous page sNext: "Next", // This is the link to the next page }, lengthMenu: "<div class='d-flex align-items-center'>_MENU_ <input type='text' class='form-control form-control-sm ml-2' id='search_here' placeholder='Search here'/></div>" } }); $(document).on('keyup keypress','input#search_here',function(){ table.ajax.reload(); }); //******************* Bulk main check box on click ****************// $(document).on('click', 'input#checked-all', function(){ if(this.checked){ $('input[name="checked_data"]').each(function(){ this.checked = true; }); }else{ $('input[name="checked_data"]').each(function(){ this.checked = false; }); } bulk_file_compare(); }); //******************* Bulk main check box length check ****************// $(document).on('change', 'input[name="checked_data"]', function(){ if($('input[name="checked_data"]').length == $('input[name="checked_data"]:checked').length){ $('input#checked-all').prop('checked', true); }else{ $('input#checked-all').prop('checked', false); } bulk_file_compare(); }); //******************* Bulk action button show and hide ****************// function bulk_file_compare(){ if($('input[name="checked_data"]:checked').length > 0){ $('#bulk-box').removeClass('d-none'); let bulk_data_id = []; $('input[name="checked_data"]:checked').each(function(){ bulk_data_id.push($(this).val()) }); $('input[name="compare"]').val(bulk_data_id); }else{ $('#bulk-box').addClass('d-none'); $('input[name="agent"]').val(''); $('#deletable-modal .modal-body input.operation-type').val(''); } } </script> @endpush