mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
muchos cambios (y no los papeles)
This commit is contained in:
@ -55,6 +55,11 @@ class DatosGenerales {
|
||||
this.ivaReducido = this.domItem.find("#ivaReducido");
|
||||
this.excluirRotativa = this.domItem.find("#excluirRotativa");
|
||||
this.prototipo = this.domItem.find("#prototipo");
|
||||
this.ferro = this.domItem.find("#ferro");
|
||||
this.ferroDigital = this.domItem.find("#ferroDigital");
|
||||
this.marcapaginas = this.domItem.find("#marcapaginas");
|
||||
this.retractilado = this.domItem.find("#retractilado");
|
||||
this.retractilado5 = this.domItem.find("#retractilado5");
|
||||
|
||||
this.rl_datos_generales = $(".rl-datos-generales");
|
||||
this.rl_tipo = $("#rl_tipo");
|
||||
@ -65,6 +70,11 @@ class DatosGenerales {
|
||||
|
||||
this.rl_servicios_extra = $(".rl-servicios-extra");
|
||||
this.rl_prototipo = $("#rl_prototipo");
|
||||
this.rl_ferro = $("#rl_ferro");
|
||||
this.rl_ferroDigital = $("#rl_ferroDigital");
|
||||
this.rl_marcapaginas = $("#rl_marcapaginas");
|
||||
this.rl_retractilado = $("#rl_retractilado");
|
||||
this.rl_retractilado5 = $("#rl_retractilado5");
|
||||
|
||||
this.initValidation();
|
||||
}
|
||||
@ -93,6 +103,9 @@ class DatosGenerales {
|
||||
this.altoPersonalizado.on("change", this.#checkValue.bind(this));
|
||||
|
||||
this.titulo.on('change', () => { $(".titulo").html(this.titulo.val()); });
|
||||
|
||||
this.retractilado.on('change', this.#eventRetractilado.bind(this));
|
||||
this.retractilado5.on('change', this.#eventRetractilado.bind(this));
|
||||
}
|
||||
|
||||
initValidation() {
|
||||
@ -466,6 +479,47 @@ class DatosGenerales {
|
||||
else{
|
||||
this.rl_prototipo.addClass('d-none');
|
||||
}
|
||||
|
||||
if(this.ferro.is(':checked')){
|
||||
this.rl_ferro.removeClass("d-none");
|
||||
menu_off = false;
|
||||
}
|
||||
else{
|
||||
this.rl_ferro.addClass('d-none');
|
||||
}
|
||||
|
||||
if(this.ferroDigital.is(':checked')){
|
||||
this.rl_ferroDigital.removeClass("d-none");
|
||||
menu_off = false;
|
||||
}
|
||||
else{
|
||||
this.rl_ferroDigital.addClass('d-none');
|
||||
}
|
||||
|
||||
if(this.marcapaginas.is(':checked')){
|
||||
this.rl_marcapaginas.removeClass("d-none");
|
||||
menu_off = false;
|
||||
}
|
||||
else{
|
||||
this.rl_marcapaginas.addClass('d-none');
|
||||
}
|
||||
|
||||
if(this.retractilado.is(':checked')){
|
||||
this.rl_retractilado.removeClass("d-none");
|
||||
menu_off = false;
|
||||
}
|
||||
else{
|
||||
this.rl_retractilado.addClass('d-none');
|
||||
}
|
||||
|
||||
if(this.retractilado5.is(':checked')){
|
||||
this.rl_retractilado5.removeClass("d-none");
|
||||
menu_off = false;
|
||||
}
|
||||
else{
|
||||
this.rl_retractilado5.addClass('d-none');
|
||||
}
|
||||
|
||||
if(!menu_off){
|
||||
this.rl_servicios_extra.removeClass('d-none');
|
||||
}
|
||||
@ -534,6 +588,12 @@ class DatosGenerales {
|
||||
}
|
||||
|
||||
this.prototipo.prop('checked', datos.prototipo);
|
||||
this.ferro.prop('checked', datos.ferro);
|
||||
this.ferroDigital.prop('checked', datos.ferroDigital);
|
||||
this.marcapaginas.prop('checked', datos.marcapaginas);
|
||||
this.retractilado.prop('checked', datos.retractilado);
|
||||
this.retractilado5.prop('checked', datos.retractilado5);
|
||||
|
||||
this.ivaReducido.val(datos.ivaReducido ? 1 : 0).trigger('change');
|
||||
}
|
||||
|
||||
@ -612,6 +672,20 @@ class DatosGenerales {
|
||||
}
|
||||
}
|
||||
|
||||
#eventRetractilado(event) {
|
||||
let target = event.target;
|
||||
if (target.id == 'retractilado') {
|
||||
if (this.retractilado5.is(':checked')) {
|
||||
this.retractilado5.prop('checked', false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (this.retractilado.is(':checked')) {
|
||||
this.retractilado.prop('checked', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#handleTipolibro(event) {
|
||||
// Accede al ID del elemento que disparó el evento
|
||||
|
||||
Reference in New Issue
Block a user