From 1cce675f796d8c10e6fc904708cfb9ed8e17dd0f Mon Sep 17 00:00:00 2001 From: imnavajas Date: Tue, 5 Sep 2023 15:28:53 +0200 Subject: [PATCH] Encontrado como hacerlo --- .../tarifas/envios/viewTarifaEnvioForm.php | 63 ++++++++++--------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/ci4/app/Views/themes/backend/vuexy/form/tarifas/envios/viewTarifaEnvioForm.php b/ci4/app/Views/themes/backend/vuexy/form/tarifas/envios/viewTarifaEnvioForm.php index 7ab050dd..06a07216 100644 --- a/ci4/app/Views/themes/backend/vuexy/form/tarifas/envios/viewTarifaEnvioForm.php +++ b/ci4/app/Views/themes/backend/vuexy/form/tarifas/envios/viewTarifaEnvioForm.php @@ -18,10 +18,10 @@
" - /> + class="btn btn-primary float-start me-sm-3 me-1" + name="save" + value="" + /> "btn btn-secondary float-start",]) ?>
@@ -72,7 +72,7 @@
- +
@@ -423,11 +423,11 @@ const lastColNr2 = $('#tableOfPrecios').find("tr:first th").length - 1; order: [ 0, "asc" ], pageLength: 25, lengthChange: true, - searching: false, + searching: true, paging: true, info: false, - //dom: '<"mt-4"><"float-end"B><"float-start"l><"mt-4 mb-3"p>', - "dom": 'lfBrtip', + dom: '<"mt-4"><"float-end"B><"float-start"l><"mt-4 mb-3"p>', + //dom: 'lBfrtip', ajax : $.fn.dataTable.pipeline( { url: '', data: function ( d ) { @@ -471,40 +471,41 @@ const lastColNr2 = $('#tableOfPrecios').find("tr:first th").length - 1; ], language: { - url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/i18n ?>.json" + url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/i18n ?>.json", }, - /*buttons: [ - 'copy', 'csv', 'excel', 'print', { - extend: 'pdfHtml5', - orientation: 'landscape', - pageSize: 'A4' - }, - ],*/ - } ); + buttons: [ 'copy', 'csv', 'excel', 'print', { + extend: 'pdfHtml5', + orientation: 'landscape', + pageSize: 'A4' + }], - new $.fn.dataTable.Buttons( theTable2, { + initComplete: function () { - name: 'new', - className: 'btn btn-primary float-end me-sm-3 me-1', - extend: "createInline", - editor: editor2, - formOptions: { - submitTrigger: -1, - submitHtml: '' + new $.fn.dataTable.Buttons(theTable2, { + name: 'test2', + buttons: [{ + className: 'btn btn-primary float-end me-sm-3 me-1', + extend: "createInline", + editor: editor2, + formOptions: { + submitTrigger: -1, + submitHtml: '' - }, + } + }] + }); + + theTable2.buttons('test2', null) + .container() + .insertBefore('.dataTables_length'); + } } ); - theTable2.buttons( 'new', null ).container().appendTo( - //theTable2.table().container() - '#panel' - ); - // Activate an inline edit on click of a table cell $('#tableOfPrecios').on( 'click', 'tbody span.edit', function (e) { editor2.inline(