diff --git a/src/views/Stubs/create_view.stub b/src/views/Stubs/create_view.stub index cc7308d..e8358f4 100644 --- a/src/views/Stubs/create_view.stub +++ b/src/views/Stubs/create_view.stub @@ -12,7 +12,7 @@ @section('content') {{ Form::open(['route' => 'admin.dummy_small_plural_model.store', 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'post', 'id' => 'create-dummy_small_model']) }} -
+

{{ trans('labels.backend.dummy_small_plural_model.create') }}

diff --git a/src/views/Stubs/edit_view.stub b/src/views/Stubs/edit_view.stub index d8014cf..f9c5c6d 100644 --- a/src/views/Stubs/edit_view.stub +++ b/src/views/Stubs/edit_view.stub @@ -12,7 +12,7 @@ @section('content') {{ Form::model($dummy_small_model, ['route' => ['admin.dummy_small_plural_model.update', $dummy_small_model], 'class' => 'form-horizontal', 'role' => 'form', 'method' => 'PATCH', 'id' => 'edit-dummy_small_model']) }} -
+

{{ trans('labels.backend.dummy_small_plural_model.edit') }}

diff --git a/src/views/Stubs/index_view.stub b/src/views/Stubs/index_view.stub index ef5210b..22b2715 100644 --- a/src/views/Stubs/index_view.stub +++ b/src/views/Stubs/index_view.stub @@ -7,7 +7,7 @@ @endsection @section('content') -
+

{{ trans('labels.backend.dummy_small_plural_model.management') }}

diff --git a/src/views/index.blade.php b/src/views/index.blade.php index 7660977..1b06d82 100644 --- a/src/views/index.blade.php +++ b/src/views/index.blade.php @@ -98,7 +98,72 @@ } }); - FinBuilders.DataTableSearch.init(dataTable); + (function (dataTable) { + + // Header All search columns + $("div.dataTables_filter input").unbind(); + $("div.dataTables_filter input").keypress( function (e) + { + if (e.keyCode == 13) + { + dataTable.fnFilter( this.value ); + } + }); + + // Individual columns search + $('.search-input-text').on( 'keypress', function (e) { + // for text boxes + if (e.keyCode == 13) + { + var i =$(this).attr('data-column'); // getting column index + var v =$(this).val(); // getting search input value + dataTable.api().columns(i).search(v).draw(); + } + }); + + // Individual columns search + $('.search-input-select').on( 'change', function (e) { + // for dropdown + var i =$(this).attr('data-column'); // getting column index + var v =$(this).val(); // getting search input value + dataTable.api().columns(i).search(v).draw(); + }); + + // Individual columns reset + $('.reset-data').on( 'click', function (e) { + var textbox = $(this).prev('input'); // Getting closest input field + var i =textbox.attr('data-column'); // Getting column index + $(this).prev('input').val(''); // Blank the serch value + dataTable.api().columns(i).search("").draw(); + }); + + //Copy button + $('#copyButton').click(function(){ + $('.copyButton').trigger('click'); + }); + //Download csv + $('#csvButton').click(function(){ + $('.csvButton').trigger('click'); + }); + //Download excelButton + $('#excelButton').click(function(){ + $('.excelButton').trigger('click'); + }); + //Download pdf + $('#pdfButton').click(function(){ + $('.pdfButton').trigger('click'); + }); + //Download printButton + $('#printButton').click(function(){ + $('.printButton').trigger('click'); + }); + + var id = $('.table-responsive .dataTables_filter').attr('id'); + $('#'+id+' label').append(''); + $(document).on('click', "#"+id+" label #input-sm-reset", function(){ + dataTable.fnFilter(''); + }); + }(dataTable)); }); @endsection \ No newline at end of file