mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Añadido a eventos la visualizacion de pestañas
This commit is contained in:
4
ci4/.env
4
ci4/.env
@ -22,8 +22,8 @@ CI_ENVIRONMENT = development
|
|||||||
# APP
|
# APP
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
|
|
||||||
app.baseURL = 'https://sk-jjo.imnavajas.es'
|
# app.baseURL = 'https://sk-jjo.imnavajas.es'
|
||||||
# app.baseURL = 'https://sk-imn.imnavajas.es'
|
app.baseURL = 'https://sk-imn.imnavajas.es'
|
||||||
# app.baseURL = "http://safekat.test/"
|
# app.baseURL = "http://safekat.test/"
|
||||||
# app.forceGlobalSecureRequests = false
|
# app.forceGlobalSecureRequests = false
|
||||||
|
|
||||||
|
|||||||
@ -1401,9 +1401,11 @@ function fill_lp_bn(row, fromComparator=false){
|
|||||||
updateTotales()
|
updateTotales()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$('#lp_bn').css('display', '')
|
$('#lp_bn').css('display', '')
|
||||||
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
||||||
|
|
||||||
|
getVisibleTabs(); // Update preview UI
|
||||||
|
|
||||||
}
|
}
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
@ -1642,6 +1644,9 @@ function fill_lp_color(row, fromComparator=false){
|
|||||||
|
|
||||||
$('#lp_color').css('display', '')
|
$('#lp_color').css('display', '')
|
||||||
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
||||||
|
|
||||||
|
getVisibleTabs(); // Update preview UI
|
||||||
|
|
||||||
}
|
}
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
@ -1879,6 +1884,8 @@ function fill_lp_bnhq(row, fromComparator=false){
|
|||||||
|
|
||||||
$('#lp_bnhq').css('display', '')
|
$('#lp_bnhq').css('display', '')
|
||||||
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
||||||
|
|
||||||
|
getVisibleTabs(); // Update preview UI
|
||||||
}
|
}
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
@ -2118,6 +2125,9 @@ function fill_lp_colorhq(row, fromComparator=false){
|
|||||||
|
|
||||||
$('#lp_colorhq').css('display', '')
|
$('#lp_colorhq').css('display', '')
|
||||||
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
||||||
|
|
||||||
|
getVisibleTabs(); // Update preview UI
|
||||||
|
|
||||||
}
|
}
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
@ -2465,6 +2475,9 @@ function fill_lp_rot_bn(row, fromComparador=false){
|
|||||||
|
|
||||||
$('.lp_rot_bn').css('display', '')
|
$('.lp_rot_bn').css('display', '')
|
||||||
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
||||||
|
|
||||||
|
getVisibleTabs(); // Update preview UI
|
||||||
|
|
||||||
}
|
}
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
@ -2822,6 +2835,9 @@ function fill_lp_rot_color(row, fromComparador=false){
|
|||||||
|
|
||||||
$('.lp_rot_color').css('display', '')
|
$('.lp_rot_color').css('display', '')
|
||||||
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
||||||
|
|
||||||
|
getVisibleTabs(); // Update preview UI
|
||||||
|
|
||||||
}
|
}
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|
||||||
@ -3102,6 +3118,9 @@ function fill_lp_cubierta(row, fromComparador=false){
|
|||||||
|
|
||||||
$('.lp_cubierta').css('display', '')
|
$('.lp_cubierta').css('display', '')
|
||||||
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
$("#tableLineasPresupuesto").DataTable().columns.adjust();
|
||||||
|
|
||||||
|
getVisibleTabs(); // Update preview UI
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<li id="tab-pv-bn" class="nav-item" style="display: none">
|
<li id="tab-pv-bn" class="nav-item" style="display: none">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="nav-link active"
|
class="nav-link"
|
||||||
role="tab"
|
role="tab"
|
||||||
data-bs-toggle="tab"
|
data-bs-toggle="tab"
|
||||||
data-bs-target="#pv_bn"
|
data-bs-target="#pv_bn"
|
||||||
@ -737,13 +737,10 @@
|
|||||||
<!------------------------------------------------------->
|
<!------------------------------------------------------->
|
||||||
<?= $this->section("additionalInlineJs") ?>
|
<?= $this->section("additionalInlineJs") ?>
|
||||||
|
|
||||||
var cubiertaObjeto = 0;
|
|
||||||
|
|
||||||
getVisibleTabs();
|
getVisibleTabs();
|
||||||
|
|
||||||
$('#tab-pv-bn').on( "click", function() {
|
$('#tab-pv-bn').on( "click", function() {
|
||||||
|
|
||||||
|
|
||||||
previewInteriorPlana('bn');
|
previewInteriorPlana('bn');
|
||||||
|
|
||||||
} );
|
} );
|
||||||
@ -792,6 +789,13 @@ $('#tab-pv-esquema-cubierta').on( "click", function() {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
$('#confirmDelete').on( "click", function() {
|
||||||
|
setTimeout(function (){
|
||||||
|
getVisibleTabs();
|
||||||
|
}, 1000);
|
||||||
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?= $this->endSection() ?>
|
<?= $this->endSection() ?>
|
||||||
|
|||||||
@ -1,18 +1,10 @@
|
|||||||
// Global parameters
|
// Global parameters
|
||||||
var _isCosido = true;
|
var _isCosido = true;
|
||||||
var _offsetSolapas = 2; // millimeters
|
|
||||||
|
|
||||||
var pvObj;
|
var pvObj;
|
||||||
|
|
||||||
|
|
||||||
var styles = {
|
|
||||||
size: 13,
|
|
||||||
family: 'Public Sans',
|
|
||||||
}
|
|
||||||
|
|
||||||
var sangradoTexto = "Sangrado 5 mm";
|
var sangradoTexto = "Sangrado 5 mm";
|
||||||
var sangradoValor = parseFloat(5); // mm
|
var sangradoValor = parseFloat(5); // mm
|
||||||
var offsetSolapaValor = parseFloat(3); // mm
|
var offsetSolapaValor = parseFloat(0); // mm
|
||||||
|
|
||||||
|
|
||||||
function previewInteriorPlana(lpTagName) {
|
function previewInteriorPlana(lpTagName) {
|
||||||
@ -99,7 +91,7 @@ function previewRotativa(lpTagName) {
|
|||||||
let styleText = {size: 12, family: 'Public Sans'};
|
let styleText = {size: 12, family: 'Public Sans'};
|
||||||
let margenTop = 3;
|
let margenTop = 3;
|
||||||
let guardaV = 0;
|
let guardaV = 0;
|
||||||
guardaH = 0;
|
let guardaH = 0;
|
||||||
|
|
||||||
// Get the preview Object parameters
|
// Get the preview Object parameters
|
||||||
getObjetoLP(lpTagName);
|
getObjetoLP(lpTagName);
|
||||||
@ -122,7 +114,7 @@ function previewRotativa(lpTagName) {
|
|||||||
let nTopForms = (pvObj.altoImpresion / 2.0 - margenTop) / (LVo + guardaV);
|
let nTopForms = (pvObj.altoImpresion / 2.0 - margenTop) / (LVo + guardaV);
|
||||||
let yOffset = LVo * getDecimalPart(nTopForms);
|
let yOffset = LVo * getDecimalPart(nTopForms);
|
||||||
|
|
||||||
//console.log(yOffset);
|
console.log(yOffset);
|
||||||
|
|
||||||
// Clear the canvas element
|
// Clear the canvas element
|
||||||
$('#pv_' + pvObj.idIndex + '_shape').empty();
|
$('#pv_' + pvObj.idIndex + '_shape').empty();
|
||||||
@ -195,8 +187,8 @@ function previewRotativa(lpTagName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getDecimalPart(floatNumber) {
|
function getDecimalPart(floatNumber) {
|
||||||
let int_part = Math.trunc(floatNumber); // returns 3
|
let int_part = Math.trunc(floatNumber);
|
||||||
let float_part = Number((floatNumber - int_part).toFixed(2)); // return 0.2
|
let float_part = Number((floatNumber - int_part).toFixed(2));
|
||||||
return float_part;
|
return float_part;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -421,12 +413,19 @@ function getObjetoLP(lpName) {
|
|||||||
$(pvName + '_forma').text(pvObj.anchoForma + "x" + pvObj.altoForma);
|
$(pvName + '_forma').text(pvObj.anchoForma + "x" + pvObj.altoForma);
|
||||||
$(pvName + '_nFormas').text(pvObj.nFormas);
|
$(pvName + '_nFormas').text(pvObj.nFormas);
|
||||||
|
|
||||||
(pvObj.anchoSolapa != 0) ? $('.pv-solapas').show() : $('.pv-solapas').hide();
|
if(pvObj.anchoSolapa != 0){
|
||||||
|
$('.pv-solapas').show();
|
||||||
|
offsetSolapaValor = parseFloat(3); // 3mm
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$('.pv-solapas').hide();
|
||||||
|
offsetSolapaValor = parseFloat(0); // No offset
|
||||||
|
}
|
||||||
|
|
||||||
// Custom overwrites
|
// Custom overwrites
|
||||||
switch (pvObj.idIndex) {
|
switch (pvObj.idIndex) {
|
||||||
case 'cubierta':
|
case 'cubierta':
|
||||||
pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + _offsetSolapas)) + pvObj.lomoLibro);
|
pvObj.anchoForma = ((2 * pvObj.anchoLibro) + (2 * (pvObj.anchoSolapa + offsetSolapaValor)) + pvObj.lomoLibro);
|
||||||
$(pvName + '_forma').text(pvObj.anchoForma + "x" + pvObj.altoForma);
|
$(pvName + '_forma').text(pvObj.anchoForma + "x" + pvObj.altoForma);
|
||||||
break;
|
break;
|
||||||
case 'ec':
|
case 'ec':
|
||||||
@ -438,13 +437,8 @@ function getObjetoLP(lpName) {
|
|||||||
|
|
||||||
case 'rot_bn':
|
case 'rot_bn':
|
||||||
case 'rot_color':
|
case 'rot_color':
|
||||||
pvObj.anchoMaquina = 520;
|
pvObj.altoClick = 305; //parseFloat($('#lp_' + lpName + '_alto_click').val());
|
||||||
pvObj.altoMaquina= 800;
|
pvObj.nFormasV = Math.trunc(pvObj.altoImpresion / pvObj.altoForma);
|
||||||
pvObj.anchoImpresion= 515;
|
|
||||||
pvObj.altoImpresion= 800;
|
|
||||||
pvObj.nFormasH = 1;
|
|
||||||
pvObj.nFormasV = 3;
|
|
||||||
pvObj.altoClick = 305;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -457,20 +451,43 @@ function getVisibleTabs() {
|
|||||||
|
|
||||||
$("#tableLineasPresupuesto tbody tr:visible").each(function () {
|
$("#tableLineasPresupuesto tbody tr:visible").each(function () {
|
||||||
|
|
||||||
console.log($(this).attr('id'));
|
//console.log("Visible: " + $(this).attr('id'));
|
||||||
if ($(this).attr('id').indexOf('cubierta') > -1) {
|
if ($(this).attr('id').indexOf('cubierta') > -1) {
|
||||||
$("#" + $(this).attr('id').replace('lp_', 'tab-pv-')).show();
|
$("#" + $(this).attr('id').replace('lp_', 'tab-pv-')).show();
|
||||||
$("#" + $(this).attr('id').replace('lp_', 'tab-pv-esquema-')).show();
|
$("#" + $(this).attr('id').replace('lp_', 'tab-pv-esquema-')).show();
|
||||||
|
$("#pv_cubierta").addClass("active show");
|
||||||
|
$("#pv_esquema-cubierta").addClass("active show");
|
||||||
} else if ($(this).attr('id').indexOf('_data') > -1) {
|
} else if ($(this).attr('id').indexOf('_data') > -1) {
|
||||||
// Do nothing here
|
// Do nothing here
|
||||||
} else if ($(this).attr('id').indexOf('_rot') > -1) {
|
} else if ($(this).attr('id').indexOf('_rot') > -1) {
|
||||||
$("#" + $(this).attr('id').replace('lp_rot_', 'tab-pv-rot-')).show();
|
$("#" + $(this).attr('id').replace('lp_rot_', 'tab-pv-rot-')).show();
|
||||||
|
$("#" + $(this).attr('id').replace('lp_', '')).addClass("active show");
|
||||||
} else {
|
} else {
|
||||||
$("#" + $(this).attr('id').replace('lp_', 'tab-pv-')).show();
|
$("#" + $(this).attr('id').replace('lp_', 'tab-pv-')).show();
|
||||||
|
$("#" + $(this).attr('id').replace('lp_', '')).addClass("active show");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#tableLineasPresupuesto tbody tr:hidden").each(function () {
|
||||||
|
|
||||||
|
//console.log("Hidden: " + $(this).attr('id'));
|
||||||
|
if ($(this).attr('id').indexOf('cubierta') > -1) {
|
||||||
|
$("#" + $(this).attr('id').replace('lp_', 'tab-pv-')).hide();
|
||||||
|
$("#" + $(this).attr('id').replace('lp_', 'tab-pv-esquema-')).hide();
|
||||||
|
$("#pv_cubierta").removeClass("active show");
|
||||||
|
$("#pv_esquema-cubierta").removeClass("active show");
|
||||||
|
} else if ($(this).attr('id').indexOf('_data') > -1) {
|
||||||
|
// Do nothing here
|
||||||
|
} else if ($(this).attr('id').indexOf('_rot') > -1) {
|
||||||
|
$("#" + $(this).attr('id').replace('lp_rot_', 'tab-pv-rot-')).hide();
|
||||||
|
$("#" + $(this).attr('id').replace('lp_', '')).removeClass("active show");
|
||||||
|
} else {
|
||||||
|
$("#" + $(this).attr('id').replace('lp_', 'tab-pv-')).hide();
|
||||||
|
$("#" + $(this).attr('id').replace('lp_', '')).removeClass("active show");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user