mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Terminado previews listos para verificar por cliente
This commit is contained in:
@ -279,7 +279,7 @@
|
|||||||
item.addEventListener('click', event => {
|
item.addEventListener('click', event => {
|
||||||
// When click the Next button, we will validate the current step
|
// When click the Next button, we will validate the current step
|
||||||
switch (validationStepper._currentIndex) {
|
switch (validationStepper._currentIndex) {
|
||||||
/*case 0:
|
case 0:
|
||||||
FormValidation2.validate();
|
FormValidation2.validate();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -293,7 +293,7 @@
|
|||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
FormValidation5.validate();
|
FormValidation5.validate();
|
||||||
break;*/
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
validationStepper.next();
|
validationStepper.next();
|
||||||
|
|||||||
@ -2,49 +2,34 @@
|
|||||||
var pvObj;
|
var pvObj;
|
||||||
|
|
||||||
$('#toReview').on("click", function () {
|
$('#toReview').on("click", function () {
|
||||||
|
previewEsquemaCubierta(true);
|
||||||
portadaGrapado(true);
|
|
||||||
|
|
||||||
//previewEsquemaCubierta('ec', '','');
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('shown.bs.modal', function (e) {
|
$(document).on('shown.bs.modal', function (e) {
|
||||||
|
previewEsquemaCubierta(false);
|
||||||
portadaGrapado(false);
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
function previewEsquemaCubierta(isThumbnail = false) {
|
||||||
|
|
||||||
function previewEsquemaCubierta(isThumbnail) {
|
if ($('#cosidoDiv').hasClass('checked') || $("#fresadoDiv").hasClass('checked')) {
|
||||||
|
console.log("Cosido/Fresado");
|
||||||
/*let tipoImpresion;
|
if ($("#tapaBlanda").is(":checked")) {
|
||||||
|
portadaTapaBlanda(isThumbnail);
|
||||||
if ($("#tipoCosido").is(":checked")) {
|
} else if ($("#tapaDura").is(":checked")) {
|
||||||
tipoImpresion = parseInt()
|
portadaTapaDura(isThumbnail);3
|
||||||
|
}
|
||||||
|
} else if ($('#espiralDiv').hasClass('checked') || $('#wireoDiv').hasClass('checked')) {
|
||||||
|
console.log("Espiral/Wireo");
|
||||||
|
if ($("#tapaBlanda").is(":checked")) {
|
||||||
|
portadaEspiral(isThumbnail, false);
|
||||||
|
} else if ($("#tapaDura").is(":checked")) {
|
||||||
|
portadaEspiral(isThumbnail, true);
|
||||||
|
}
|
||||||
|
} else if ($('#grapadoDiv').hasClass('checked')) {
|
||||||
|
portadaGrapado(isThumbnail);
|
||||||
}
|
}
|
||||||
|
|
||||||
let tipoImpresion = parseInt($('#tipo_impresion_id').val());
|
|
||||||
|
|
||||||
// Fresado TD y Cosido TD
|
|
||||||
if (tipoImpresion === 1 || tipoImpresion === 3) {
|
|
||||||
portadaTapaDura();
|
|
||||||
}
|
|
||||||
// Fresado TB y Cosido TB
|
|
||||||
else if (tipoImpresion === 2 || tipoImpresion === 4) {
|
|
||||||
portadaTapaBlanda();
|
|
||||||
}
|
|
||||||
// Espiral TD y TB, Wire-o TD y TB
|
|
||||||
else if (tipoImpresion === 5 || tipoImpresion === 6 ||
|
|
||||||
tipoImpresion === 7 || tipoImpresion === 8) {
|
|
||||||
portadaEspiral();
|
|
||||||
}
|
|
||||||
else if (tipoImpresion === 21) {
|
|
||||||
portadaGrapado();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// ?
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,7 +163,7 @@ function portadaTapaDura(isThumbnail = false) {
|
|||||||
previewEC.makeText(pvObj.anchoLibro + anchoPliegue + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
previewEC.makeText(pvObj.anchoLibro + anchoPliegue + " mm", origenEC.x - (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
previewEC.makeText(pvObj.anchoLibro + anchoPliegue + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
previewEC.makeText(pvObj.anchoLibro + anchoPliegue + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro / 2), origenEC.y - (altoLibro / 3) + 15, styleCotas);
|
||||||
previewEC.makeText(pvObj.altoLibro + altoPliegue + " mm", origenEC.x + (lomoLibro / 2) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
previewEC.makeText(pvObj.altoLibro + altoPliegue + " mm", origenEC.x + (lomoLibro / 2) + 50, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
previewEC.makeText(pvObj.altoLibro + (2 * sangradoValor) + altoPliegue + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro) + 55 , origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
previewEC.makeText(pvObj.altoLibro + (2 * sangradoValor) + altoPliegue + " mm", origenEC.x + (lomoLibro / 2 + anchoLibro) + 55, origenEC.y, styleCotas).rotation = -Math.PI / 2;
|
||||||
previewEC.makeText((2 * pvObj.anchoLibro) + pvObj.lomoLibro + (2 * sangradoValor) + +(2 * anchoPliegue) + anchoCarton + " mm",
|
previewEC.makeText((2 * pvObj.anchoLibro) + pvObj.lomoLibro + (2 * sangradoValor) + +(2 * anchoPliegue) + anchoCarton + " mm",
|
||||||
origenEC.x,
|
origenEC.x,
|
||||||
origenEC.y + (altoLibro / 2) + 50,
|
origenEC.y + (altoLibro / 2) + 50,
|
||||||
@ -205,7 +190,6 @@ function portadaTapaBlanda(isThumbnail = false) {
|
|||||||
getObjetoToPreview();
|
getObjetoToPreview();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Definicion de los parametros del Esquema de Cubierta (EC)
|
// Definicion de los parametros del Esquema de Cubierta (EC)
|
||||||
if (pvObj.anchoSolapa == 0) {
|
if (pvObj.anchoSolapa == 0) {
|
||||||
if (isThumbnail) {
|
if (isThumbnail) {
|
||||||
@ -789,11 +773,11 @@ function portadaGrapado(isThumbnail = false) {
|
|||||||
function getObjetoToPreview() {
|
function getObjetoToPreview() {
|
||||||
|
|
||||||
pvObj = {
|
pvObj = {
|
||||||
lomoLibro: 30,//parseFloat($('#lomo_cubierta').val()),
|
lomoLibro: $('#lomo_cubierta').val() === '' ? parseFloat('0.0') : parseFloat($('#lomo_cubierta').val()),
|
||||||
anchoSolapa: 0, //$('#solapasCubierta').is(':checked') ? parseFloat($('#anchoSolapasCubierta').val()) : parseFloat(0),
|
anchoSolapa: $('#solapasCubierta').is(':checked') ? parseFloat($('#anchoSolapasCubierta').val()) : parseFloat(0),
|
||||||
altoLibro: 148, //getDimensionLibro().alto,
|
altoLibro: getDimensionLibro().alto,
|
||||||
anchoLibro: 190, //getDimensionLibro().ancho
|
anchoLibro: getDimensionLibro().ancho
|
||||||
};
|
};
|
||||||
//console.log(pvObj);
|
console.log(pvObj);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user