]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6717 @1:00
authorsoufiane <soufiane@cubedesigners.com>
Wed, 21 Feb 2024 10:33:47 +0000 (11:33 +0100)
committersoufiane <soufiane@cubedesigners.com>
Wed, 21 Feb 2024 10:33:47 +0000 (11:33 +0100)
resources/views/vendor/backpack/crud/inc/export_buttons.blade.php

index 8b0a67a4f8dda7cc2af4ff74cf3d6528803ad7cb..f4596fe4d8e2cd7072ca5dfb24bb5d2e81b21eef 100644 (file)
                 text: '<i class="la la-download"></i> {{ trans('backpack::crud.export.export') }}',
                 dropup: true,
                 buttons: [
-                    {
-                        name: 'copyHtml5',
-                        extend: 'copyHtml5',
-                        exportOptions: {
-                            columns: function ( idx, data, node ) {
-                                var $column = crud.table.column( idx );
-                                return  ($column.visible() && $(node).attr('data-visible-in-export') != 'false') || $(node).attr('data-force-export') == 'true';
-                            },
-                            format: dataTablesExportFormat,
-                        },
-                        action: function(e, dt, button, config) {
-                            crud.responsiveToggle(dt);
-                            $.fn.DataTable.ext.buttons.copyHtml5.action.call(this, e, dt, button, config);
-                            crud.responsiveToggle(dt);
-                        }
-                    },
                     {
                         name: 'excelHtml5',
                         extend: 'excelHtml5',
                                 $ids.push(e.innerText)
                             })
                             $ids.join(',')
+                            $(button[0]).css({"pointer-events":"none","opacity":".5"})
+                            new Noty({
+                                type: 'success',
+                                text: 'La compilation a été placée en file d\'attente. Vous recevrez une notification lorsqu\'elle sera terminée.',
+                                timeout: '5000',
+                            }).show();
+
                             $.ajax({
                                 'url': `/fluidbook-publication/send_link/${$ids}`,
-                                'method': 'POST'
+                                'method': 'POST',
+                                success: function (data) {
+                                    $(button[0]).css({"pointer-events":"initial","opacity":"1"});
+                                }
                             })
                             //$.fn.DataTable.ext.buttons.excelHtml5.action.call(this, e, dt, button, config);
                             crud.responsiveToggle(dt);
                         }
                     },
-                    {
-                        name: 'csvHtml5',
-                        extend: 'csvHtml5',
-                        exportOptions: {
-                            columns: function ( idx, data, node ) {
-                                var $column = crud.table.column( idx );
-                                return  ($column.visible() && $(node).attr('data-visible-in-export') != 'false') || $(node).attr('data-force-export') == 'true';
-                            },
-                            format: dataTablesExportFormat,
-                        },
-                        action: function(e, dt, button, config) {
-                            crud.responsiveToggle(dt);
-                            $.fn.DataTable.ext.buttons.csvHtml5.action.call(this, e, dt, button, config);
-                            crud.responsiveToggle(dt);
-                        }
-                    },
-                    {
-                        name: 'pdfHtml5',
-                        extend: 'pdfHtml5',
-                        exportOptions: {
-                            columns: function ( idx, data, node ) {
-                                var $column = crud.table.column( idx );
-                                return  ($column.visible() && $(node).attr('data-visible-in-export') != 'false') || $(node).attr('data-force-export') == 'true';
-                            },
-                            format: dataTablesExportFormat,
-                        },
-                        orientation: 'landscape',
-                        action: function(e, dt, button, config) {
-                            crud.responsiveToggle(dt);
-                            $.fn.DataTable.ext.buttons.pdfHtml5.action.call(this, e, dt, button, config);
-                            crud.responsiveToggle(dt);
-                        }
-                    },
-                    {
-                        name: 'print',
-                        extend: 'print',
-                        exportOptions: {
-                            columns: function ( idx, data, node ) {
-                                var $column = crud.table.column( idx );
-                                return  ($column.visible() && $(node).attr('data-visible-in-export') != 'false') || $(node).attr('data-force-export') == 'true';
-                            },
-                            format: dataTablesExportFormat,
-                        },
-                        action: function(e, dt, button, config) {
-                            crud.responsiveToggle(dt);
-                            $.fn.DataTable.ext.buttons.print.action.call(this, e, dt, button, config);
-                            crud.responsiveToggle(dt);
-                        }
-                    }
                 ]
             }
             @endif