mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Cribado inicial de campos no usados desde la tabla legacy original
This commit is contained in:
@ -56,55 +56,57 @@
|
||||
<!------------------------------------------->
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
$(document).keypress(function (e) {
|
||||
var key = e.which;
|
||||
if(key == 13) // the enter key code
|
||||
{ e.preventDefault()
|
||||
if($('#addressForm').hasClass('show')){
|
||||
$("#saveDireccionEnvio").click();
|
||||
$(document).keypress(function(e) {
|
||||
var key = e.which;
|
||||
if (key == 13) // the enter key code
|
||||
{
|
||||
e.preventDefault()
|
||||
if ($('#addressForm').hasClass('show')) {
|
||||
$("#saveDireccionEnvio").click();
|
||||
|
||||
}else{
|
||||
$('#saveForm').click();
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#saveForm').click();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#clienteId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfClientes") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
$('#clienteId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfClientes") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function (params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function (response) {
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
data: function(params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<
|
||||
? = csrf_token() ?? "token" ? > : < ? = csrf_token() ? > v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function(response) {
|
||||
yeniden(response. < ? = csrf_token() ? > );
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
/*******************************
|
||||
* Inicialización de los Select2
|
||||
*******************************/
|
||||
$('#incRei').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
/*******************************
|
||||
* Inicialización de los Select2
|
||||
*******************************/
|
||||
$('#incRei').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
$('#paisId').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
$('#paisId').select2({
|
||||
allowClear: false,
|
||||
});
|
||||
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@ -113,45 +115,44 @@ allowClear: false,
|
||||
<!------------------------------------------->
|
||||
<!-- Acciones antes de submit... -->
|
||||
<!------------------------------------------->
|
||||
const url = window.location.href;
|
||||
const url_parts = url.split('/');
|
||||
const url = window.location.href;
|
||||
const url_parts = url.split('/');
|
||||
|
||||
<?php if (str_contains($formAction, 'edit')): ?>
|
||||
<?= $this->section("additionalInlineJs") ?>
|
||||
|
||||
if(url_parts[url_parts.length-2] == 'edit'){
|
||||
id = url_parts[url_parts.length-1];
|
||||
}
|
||||
else{
|
||||
id = -1;
|
||||
if (url_parts[url_parts.length - 2] == 'edit') {
|
||||
id = url_parts[url_parts.length - 1];
|
||||
} else {
|
||||
id = -1;
|
||||
}
|
||||
|
||||
$('#presupuestoForm').on( "submit", function( event ) {
|
||||
event.preventDefault();
|
||||
save_servicios();
|
||||
save_datos_envios();
|
||||
$('#presupuestoForm').on("submit", function(event) {
|
||||
event.preventDefault();
|
||||
save_servicios();
|
||||
save_datos_envios();
|
||||
|
||||
|
||||
$.when(fill_bbdd_from_lp(id).then(function (data, textStatus, jqXHR){
|
||||
generateCompJSON()
|
||||
form = $('#presupuestoForm').serialize()
|
||||
form += getValuesResumenForm()
|
||||
$.when(fill_bbdd_from_lp(id).then(function(data, textStatus, jqXHR) {
|
||||
generateCompJSON()
|
||||
form = $('#presupuestoForm').serialize()
|
||||
form += getValuesResumenForm()
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo $formAction; ?>",
|
||||
data: form,
|
||||
success: function (data) {
|
||||
yeniden(data.<?= csrf_token() ?>)
|
||||
popSuccessAlert(data.mensaje)
|
||||
}
|
||||
}).fail(function (jqXHR, textStatus, error) {
|
||||
// Handle error here
|
||||
console.log(jqXHR)
|
||||
});;
|
||||
}))
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo $formAction; ?>",
|
||||
data: form,
|
||||
success: function(data) {
|
||||
yeniden(data. < ? = csrf_token() ? > )
|
||||
popSuccessAlert(data.mensaje)
|
||||
}
|
||||
}).fail(function(jqXHR, textStatus, error) {
|
||||
// Handle error here
|
||||
console.log(jqXHR)
|
||||
});;
|
||||
}))
|
||||
|
||||
return false; //stop the actual form post !important!
|
||||
return false; //stop the actual form post !important!
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -48,8 +48,6 @@
|
||||
|
||||
|
||||
<?=$this->section('additionalInlineJs') ?>
|
||||
|
||||
|
||||
|
||||
const lastColNr = $('#tableOfPresupuestos').find("tr:first th").length - 1;
|
||||
const actionBtns = function(data) {
|
||||
@ -128,7 +126,6 @@ $('#tableOfPresupuestos thead tr:eq(1) th').each(function (i) {
|
||||
else {
|
||||
$(this).html('<span></span>');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
@ -247,16 +244,11 @@ $(document).on('click', '.btn-remove', function(e) {
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
<?=$this->section('css') ?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.css">
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.bootstrap5.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/fixedheader/3.1.7/css/fixedHeader.dataTables.min.css">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/bootstrap-daterangepicker/bootstrap-daterangepicker.css') ?>" />
|
||||
<?=$this->endSection() ?>
|
||||
@ -264,20 +256,14 @@ $(document).on('click', '.btn-remove', function(e) {
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.<?=config('Basics')->theme['name'] == 'Bootstrap5' ? 'bootstrap5' : 'bootstrap4' ?>.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.bootstrap5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.colVis.min.js"></script>
|
||||
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/moment/moment.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/bootstrap-daterangepicker/bootstrap-daterangepicker.js') ?>"></script>
|
||||
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.0/jszip.min.js" integrity="sha512-xcHCGC5tQ0SHlRX8Anbz6oy/OullASJkEhb4gjkneVpGE3/QGYejf14CUO5n5q5paiHfRFTa9HKgByxzidw2Bw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/pdfmake.min.js" integrity="sha512-rDbVu5s98lzXZsmJoMa0DjHNE+RwPJACogUCLyq3Xxm2kJO6qsQwjbE5NDk2DqmlKcxDirCnU1wAzVLe12IM3w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.5/vfs_fonts.js" integrity="sha512-cktKDgjEiIkPVHYbn8bh/FEyYxmt4JDJJjOCu5/FQAkW4bc911XtKYValiyzBiJigjVEvrIAyQFEbRJZyDA1wQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
||||
<?=$this->endSection() ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user