From 5b4126f4605cf93f556b30ddaa22da6b7f457458 Mon Sep 17 00:00:00 2001 From: imnavajas Date: Mon, 4 Sep 2023 13:16:25 +0200 Subject: [PATCH] Temporal Nacho --- .idea/deployment.xml | 9 +++++- .idea/webServers.xml | 7 +++++ .../tarifas/envios/viewTarifaEnvioForm.php | 29 +++++++++++++++---- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/.idea/deployment.xml b/.idea/deployment.xml index 0bdb7590..5fb78f02 100644 --- a/.idea/deployment.xml +++ b/.idea/deployment.xml @@ -1,6 +1,6 @@ - + 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 08cca8cc..7ab050dd 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 @@ -232,7 +232,7 @@ searching: false, paging: true, info: false, - "dom": 'lfBrtip', + "dom": '<"mt-4"><"float-end"B><"float-start"l><"mt-4 mb-3"p>', "buttons": [ 'copy', 'csv', 'excel', 'print', { extend: 'pdfHtml5', @@ -426,7 +426,8 @@ const lastColNr2 = $('#tableOfPrecios').find("tr:first th").length - 1; searching: false, paging: true, info: false, - dom: '<"mt-4"><"float-end"B><"float-start"l><"mt-4 mb-3"p>', + //dom: '<"mt-4"><"float-end"B><"float-start"l><"mt-4 mb-3"p>', + "dom": 'lfBrtip', ajax : $.fn.dataTable.pipeline( { url: '', data: function ( d ) { @@ -472,19 +473,37 @@ const lastColNr2 = $('#tableOfPrecios').find("tr:first th").length - 1; language: { url: "//cdn.datatables.net/plug-ins/1.13.4/i18n/i18n ?>.json" }, - buttons: [ { + /*buttons: [ + 'copy', 'csv', 'excel', 'print', { + extend: 'pdfHtml5', + orientation: 'landscape', + pageSize: 'A4' + }, + ],*/ + } ); + + new $.fn.dataTable.Buttons( theTable2, { + + name: 'new', className: 'btn btn-primary float-end me-sm-3 me-1', extend: "createInline", editor: editor2, formOptions: { submitTrigger: -1, submitHtml: '' - + }, - } ], + } ); + 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) {