yii2-widget-datatables icon indicating copy to clipboard operation
yii2-widget-datatables copied to clipboard

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

Open vivianaRodas opened this issue 6 years ago • 2 comments

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") ], ], ],

vivianaRodas avatar Mar 19 '18 21:03 vivianaRodas

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

atmanegara avatar Jul 13 '18 07:07 atmanegara

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

gunners81 avatar Mar 31 '19 16:03 gunners81