From 3636a750976c4a2760295f5b63484b1175d0eceb Mon Sep 17 00:00:00 2001 From: soufiane Date: Wed, 21 Feb 2024 11:33:47 +0100 Subject: [PATCH] wait #6717 @1:00 --- .../crud/inc/export_buttons.blade.php | 77 +++---------------- 1 file changed, 11 insertions(+), 66 deletions(-) diff --git a/resources/views/vendor/backpack/crud/inc/export_buttons.blade.php b/resources/views/vendor/backpack/crud/inc/export_buttons.blade.php index 8b0a67a4f..f4596fe4d 100644 --- a/resources/views/vendor/backpack/crud/inc/export_buttons.blade.php +++ b/resources/views/vendor/backpack/crud/inc/export_buttons.blade.php @@ -38,22 +38,6 @@ text: ' {{ 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', @@ -71,63 +55,24 @@ $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 -- 2.39.5