mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
trabajando en eventos de lineas
This commit is contained in:
@ -55,6 +55,11 @@ class DatosLibro {
|
||||
this.ferroDigital = this.domItem.find('#ferroDigital');
|
||||
this.marcapaginas = this.domItem.find('#marcapaginas');
|
||||
|
||||
this.faja = this.domItem.find('#faja');
|
||||
this.fajaAlto = this.domItem.find('#faja_alto');
|
||||
this.fajaSolapasAncho = this.domItem.find('#faja_solapas_ancho');
|
||||
this.div_faja = this.domItem.find('.faja-div');
|
||||
|
||||
}
|
||||
|
||||
init() {
|
||||
@ -96,12 +101,27 @@ class DatosLibro {
|
||||
this.paginas.on('change', this.changePaginas.bind(this));
|
||||
this.tirada.on('change', this.changeTirada.bind(this));
|
||||
|
||||
this.anchoSolapasCubierta.on('focusout', this.checkSolapasMax.bind(this));
|
||||
this.anchoSolapasSobrecubierta.on('focusout', this.checkSolapasMax.bind(this));
|
||||
this.anchoSolapasCubierta.on('focusout', this.checkSolapaAncho.bind(this));
|
||||
this.anchoSolapasSobrecubierta.on('focusout', this.checkSolapaAncho.bind(this));
|
||||
|
||||
this.faja.on('change', this.changeFaja.bind(this));
|
||||
}
|
||||
}
|
||||
|
||||
checkSolapasMax(event) {
|
||||
changeFaja() {
|
||||
|
||||
if (this.faja.prop('checked')) {
|
||||
this.div_faja.removeClass('d-none');
|
||||
$('#compFaja').val(1).trigger('change');
|
||||
}
|
||||
else {
|
||||
this.div_faja.addClass('d-none');
|
||||
$('#compFaja').val(0).trigger('change');
|
||||
}
|
||||
}
|
||||
|
||||
checkSolapaAncho(event) {
|
||||
|
||||
const el = event.target;
|
||||
if (el.value != "") {
|
||||
if (parseInt(el.value) < parseInt(el.min)) {
|
||||
@ -116,15 +136,6 @@ class DatosLibro {
|
||||
}
|
||||
}
|
||||
|
||||
changeFajaColor() {
|
||||
|
||||
if (this.imprimirFajaColor.prop('checked')) {
|
||||
$(document).trigger('add-servicio-lineas', 'facaColor');
|
||||
}
|
||||
else {
|
||||
$(document).trigger('remove-servicio-lineas', 'fajaColor');
|
||||
}
|
||||
}
|
||||
|
||||
changeFerro() {
|
||||
|
||||
@ -243,7 +254,7 @@ class DatosLibro {
|
||||
}, 100);
|
||||
|
||||
// para que se actualice el comparador
|
||||
this.updateComparador();
|
||||
$('#compCarasCubierta').trigger('change');
|
||||
}
|
||||
|
||||
changeAnchoSolapasCubierta() {
|
||||
@ -256,7 +267,7 @@ class DatosLibro {
|
||||
}
|
||||
|
||||
// para que se actualice el comparador
|
||||
this.updateComparador();
|
||||
$('#compCarasCubierta').trigger('change');
|
||||
}
|
||||
|
||||
|
||||
@ -287,8 +298,7 @@ class DatosLibro {
|
||||
}
|
||||
|
||||
// para que se actualice el comparador
|
||||
this.updateComparador();
|
||||
|
||||
$('#compSobrecubierta').trigger('change');
|
||||
}
|
||||
|
||||
checkSolapasGrandes(elemento) {
|
||||
|
||||
Reference in New Issue
Block a user