fedemotta / yii2-widget-datatables

DataTables widget for Yii2
MIT License
35 stars 28 forks source link

Buttons copy, csv, xls, pdf don't show in google chrome #22

Open vivianaRodas opened 6 years ago

vivianaRodas commented 6 years ago

I used that code, i can see the buttons in mozilla but in google chrome i can see only print button "tableTools"=>[ "aButtons"=> [
[ "sExtends"=> "copy", "sButtonText"=> Yii::t('app',"Copiar") ], [ "sExtends"=> "csv", "sButtonText"=> Yii::t('app',"CSV") ], [ "sExtends"=> "xls", "oSelectorOpts"=> ["page"=> 'current'] ], [ "sExtends"=> "pdf", "sButtonText"=> Yii::t('app',"PDF") ], [ "sExtends"=> "print", "sButtonText"=> Yii::t('app',"Imprimir") ], ], ],

atmanegara commented 6 years ago

i'm fix issue modify file datatables.php capture1 then, download file js dan css in https://datatables.net/extensions/buttons/examples/initialisation/export.html, or using CDN add css and js in appasset.php public $css = [ 'css/site.css', ' https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css', 'https://cdn.datatables.net/buttons/1.5.1/css/buttons.dataTables.min.css', ]; public $js = [ 'js/FileSaver.js', ' https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js', 'https://cdn.datatables.net/buttons/1.5.1/js/dataTables.buttons.min.js', 'https://cdn.datatables.net/buttons/1.5.1/js/buttons.flash.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js', 'https://cdn.datatables.net/buttons/1.5.1/js/buttons.html5.min.js', 'https://cdn.datatables.net/buttons/1.5.1/js/buttons.print.min.js', ]; in config datatables widget capture2

gunners81 commented 5 years ago

i'm fix issue modify file datatables.php capture1 then, download file js dan css in https://datatables.net/extensions/buttons/examples/initialisation/export.html, or using CDN add css and js in appasset.php public $css = [ 'css/site.css', ' https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css', 'https://cdn.datatables.net/buttons/1.5.1/css/buttons.dataTables.min.css', ]; public $js = [ 'js/FileSaver.js', ' https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js', 'https://cdn.datatables.net/buttons/1.5.1/js/dataTables.buttons.min.js', 'https://cdn.datatables.net/buttons/1.5.1/js/buttons.flash.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js', 'https://cdn.datatables.net/buttons/1.5.1/js/buttons.html5.min.js', 'https://cdn.datatables.net/buttons/1.5.1/js/buttons.print.min.js', ]; in config datatables widget capture2

terimakasih