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