File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed
Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ This package contains [Laravel Blade Components](https://laravel.com/docs/7.x/bl
4646 - [ TEXTAREA] ( #textarea )
4747 - [ TEXT-EDITOR] ( #text-editor )
4848 - [ SUBMIT] ( #submit )
49+ - [ Example Codes] ( #example-codes )
4950 - [ Summary] ( #summary )
5051 - [ Changelog] ( #changelog )
5152 - [ License] ( #license )
@@ -445,6 +446,10 @@ $(()=>{
445446| hoverable | is hoverable? `` true/false `` | false | boolean |
446447| condensed | is condensed? `` true/false `` | false | boolean |
447448| footer | has footer? `` true/false `` | false | boolean |
449+ | buttons | has buttons (print/export)? `` true/false `` | false | boolean |
450+
451+ ** ACKNOWLEDGEMENTS**
452+ Use `` Dom : 'Blftrip' `` while using buttons. See Examples to be more clear!
448453
449454### Form Components
450455
@@ -794,6 +799,9 @@ $(()=>{
794799| icon | button icon | fas fa-save | string |
795800| inputclass | class along with 'form-control' | null | string |
796801
802+ ## Example Codes
803+ You can browse through the examples of advanced usages from [ examples] ( examples/ ) directory.
804+
797805## Summary
798806This document might not be well-documented. I will happily accept any documentation pull-requests.
799807> PULL REQUESTS for new components should be in non-master branch
Original file line number Diff line number Diff line change 66
77class Datatable extends Component
88{
9- public $ beautify ;
9+ public $ beautify, $ buttons ;
1010 public $ id ;
1111 public $ bordered , $ hoverable , $ condensed ;
1212 public $ heads , $ footer ;
1313
1414 public function __construct (
1515 $ beautify = true , $ id ,
1616 $ bordered = true , $ hoverable = true , $ condensed = false ,
17- $ heads , $ footer = false
17+ $ heads , $ footer = false , $ buttons = false
1818 )
1919 {
2020 $ this ->id = $ id ;
@@ -24,6 +24,7 @@ public function __construct(
2424 $ this ->condensed = $ condensed ;
2525 $ this ->heads = json_decode (json_encode ($ heads ));
2626 $ this ->footer = $ footer ;
27+ $ this ->buttons = $ buttons ;
2728 }
2829
2930 public function border ()
Original file line number Diff line number Diff line change 1+ @if ($buttons )
2+ @section (' css' )
3+ @parent
4+ <link rel =" stylesheet" href =" https://cdn.datatables.net/v/bs4/jszip-2.5.0/dt-1.10.20/b-1.6.1/b-html5-1.6.1/b-print-1.6.1/datatables.min.css" />
5+ <style >.printer table {counter-reset : rowNumber}.printer tr {counter-increment : rowNumber}.printer tr td :first-child ::before {content : counter (rowNumber );min-width : 1em ;margin-right : 0.5em } div .dt-buttons.btn-group.flex-wrap {float :right } </style >
6+ @endsection
7+
8+ @section (' js' )
9+ @parent
10+ <script src =" https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js" ></script >
11+ <script src =" https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js" ></script >
12+ <script src =" https://cdn.datatables.net/v/bs4/jszip-2.5.0/dt-1.10.20/b-1.6.1/b-html5-1.6.1/b-print-1.6.1/datatables.min.js" ></script >
13+ @endsection
14+ @endif
15+
116@if ($beautify )
217<style >#{{ $id } } tbody tr td { vertical-align : middle ; text-align : center ; } </style >
318@endif
You can’t perform that action at this time.
0 commit comments