mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
realizado los cambios en los selects
This commit is contained in:
@ -62,15 +62,13 @@ class DisenioCubierta {
|
||||
this.divPapelCubierta = this.domItem.find("#divPapelCubierta");
|
||||
this.divGramajeCubierta = this.domItem.find("#divGramajeCubierta");
|
||||
|
||||
this.cubiertaPlastificado = this.domItem.find("#plastificado");
|
||||
this.cubiertaBarniz = this.domItem.find("#barniz");
|
||||
this.cubiertaEstampado = this.domItem.find("#estampado");
|
||||
this.acabadoCubierta = this.domItem.find("#acabadoCubierta");
|
||||
this.cubiertaRetractilado = this.domItem.find("#retractilado");
|
||||
|
||||
this.configuracionSobrecubierta = this.domItem.find(".config-sobrecubierta");
|
||||
this.sobrecubierta = this.domItem.find("#addSobrecubierta");
|
||||
this.papelSobrecubierta = this.domItem.find("#papelSobrecubierta");
|
||||
this.plastificadoSobrecubierta = this.domItem.find("#plastificadoSobrecubierta");
|
||||
this.acabadoSobrecubierta = this.domItem.find("#acabadoSobrecubierta");
|
||||
|
||||
this.configuracionFaja = this.domItem.find(".config-faja");
|
||||
this.faja = this.domItem.find("#addFaja");
|
||||
@ -94,6 +92,26 @@ class DisenioCubierta {
|
||||
this.rl_tamanio_sobrecubierta = $('#rl_tamanio_sobrecubierta');
|
||||
this.rl_acabado_sobrecubierta = $("#rl_acabado_sobrecubierta");
|
||||
|
||||
this.acabadoCubierta = new ClassSelect($("#acabadoCubierta"),
|
||||
'/serviciosacabados/getacabados',
|
||||
'',
|
||||
false,
|
||||
{
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
"cubierta": 1
|
||||
}
|
||||
);
|
||||
|
||||
this.acabadoSobrecubierta = new ClassSelect($("#acabadoSobrecubierta"),
|
||||
'/serviciosacabados/getacabados',
|
||||
'',
|
||||
false,
|
||||
{
|
||||
[this.csrf_token]: this.csrf_hash,
|
||||
"sobrecubierta": 1
|
||||
}
|
||||
);
|
||||
|
||||
this.initValidation();
|
||||
|
||||
// Creamos un nuevo observador que detecta cambios en los atributos
|
||||
@ -124,6 +142,9 @@ class DisenioCubierta {
|
||||
const self = this;
|
||||
|
||||
this.papelEspecial.init();
|
||||
this.acabadoCubierta.init();
|
||||
this.acabadoSobrecubierta.init();
|
||||
|
||||
$('#papelEspecialCubiertaSel').on("change", this.#handlePapelCubiertaEspecial.bind(this));
|
||||
|
||||
// Eventos
|
||||
@ -195,9 +216,9 @@ class DisenioCubierta {
|
||||
$(`#divGramajeCubierta .gramaje-cubierta input[data-value="${datosCubierta.gramaje}"]`).trigger('click');
|
||||
}, 0);
|
||||
|
||||
this.cubiertaPlastificado.val(datosCubierta.plastificado).trigger('change');
|
||||
this.cubiertaBarniz.val(datosCubierta.barniz).trigger('change');
|
||||
this.cubiertaEstampado.val(datosCubierta.estampado).trigger('change');
|
||||
// JJO this.cubiertaPlastificado.val(datosCubierta.plastificado).trigger('change');
|
||||
//this.cubiertaBarniz.val(datosCubierta.barniz).trigger('change');
|
||||
//this.cubiertaEstampado.val(datosCubierta.estampado).trigger('change');
|
||||
if (datosCubierta.retractilado) {
|
||||
setTimeout(() => {
|
||||
this.cubiertaRetractilado.trigger('click');
|
||||
@ -208,7 +229,7 @@ class DisenioCubierta {
|
||||
this.sobrecubierta.trigger('click');
|
||||
this.papelSobrecubierta.val(datosSobrecubierta.papel.code + "_" + datosSobrecubierta.gramaje).trigger('change');
|
||||
this.solapasSobrecubierta.val(datosSobrecubierta.solapas_ancho);
|
||||
this.plastificadoSobrecubierta.val(datosSobrecubierta.plastificado).trigger('change');
|
||||
// JJO this.plastificadoSobrecubierta.val(datosSobrecubierta.plastificado).trigger('change');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user