mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Cambios parciales
This commit is contained in:
@ -23,7 +23,7 @@ class Catalogo {
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: () => $('#isHq').val() ? 'negrohq' : 'negro',
|
||||
tipo: () => this.tipo_impresion.val().includes('hq') ? 'negrohq' : 'negro',
|
||||
});
|
||||
|
||||
this.compPapelNegroPod = new ClassSelect($("#compPapelNegroPod"), '/presupuestoadmin/papelgenerico', "Seleccione un papel", false,
|
||||
@ -34,10 +34,9 @@ class Catalogo {
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: () => $('#isHq').val() ? 'negrohq' : 'negro',
|
||||
tipo: () => this.tipo_impresion.val().includes('hq') ? 'negrohq' : 'negro',
|
||||
});
|
||||
|
||||
|
||||
this.compGramajeNegro = new ClassSelect($('#compGramajeNegro'), '/presupuestoadmin/papelgramaje', 'Seleccione un gramaje', false,
|
||||
{
|
||||
tipo_impresion: () => this.encuadernacion.getVal(),
|
||||
@ -47,8 +46,9 @@ class Catalogo {
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: () => $('#isHq').val() ? 'negrohq' : 'negro',
|
||||
tipo: () => this.tipo_impresion.val().includes('hq') ? 'negrohq' : 'negro',
|
||||
});
|
||||
|
||||
this.compPapelColor = new ClassSelect($("#compPapelColor"), '/presupuestoadmin/papelgenerico', "Seleccione un papel", false,
|
||||
{
|
||||
tipo_impresion: () => this.encuadernacion.getVal(),
|
||||
@ -57,8 +57,9 @@ class Catalogo {
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: () => $('#isHq').val() ? 'colorhq' : 'color',
|
||||
tipo: () => this.tipo_impresion.val().includes('hq') ? 'colorhq' : 'color',
|
||||
});
|
||||
|
||||
this.compGramajeColor = new ClassSelect($('#compGramajeColor'), '/presupuestoadmin/papelgramaje', 'Seleccione un gramaje', false,
|
||||
{
|
||||
tipo_impresion: () => this.encuadernacion.getVal(),
|
||||
@ -68,8 +69,9 @@ class Catalogo {
|
||||
alto: () => this.getDimensionLibro().alto,
|
||||
sopalas: 0,
|
||||
lomo: 0,
|
||||
tipo: () => $('#isHq').val() ? 'colorhq' : 'color',
|
||||
tipo: () => this.tipo_impresion.val().includes('hq') ? 'colorhq' : 'color',
|
||||
});
|
||||
|
||||
this.compPapelCubierta = new ClassSelect($("#compPapelCubierta"), '/presupuestoadmin/papelgenerico', "Seleccione un papel", false,
|
||||
{
|
||||
tipo_impresion: this.encuadernacion.getVal(),
|
||||
@ -149,7 +151,7 @@ class Catalogo {
|
||||
this.cliente.init();
|
||||
this.tipo_impresion.select2();
|
||||
this.caras_cubierta.select2();
|
||||
this.compPaginasSobrecubierta .select2();
|
||||
this.compPaginasSobrecubierta.select2();
|
||||
|
||||
this.encuadernacion.init();
|
||||
|
||||
@ -165,7 +167,7 @@ class Catalogo {
|
||||
this.acabadoCubierta.init();
|
||||
this.acabadosSobrecubierta.init();
|
||||
|
||||
|
||||
|
||||
// Al cargar la página
|
||||
this.toggleSobrecubiertaFields();
|
||||
|
||||
@ -197,57 +199,25 @@ class Catalogo {
|
||||
updateOpcionesComparador() {
|
||||
|
||||
$('.comp_negro_items').off('change');
|
||||
$('.comp_negrohq_items').off('change');
|
||||
$('.comp_color_items').off('change');
|
||||
$('.comp_colorhq_items').off('change');
|
||||
|
||||
const selValue = this.tipo_impresion.val();
|
||||
const elements_negro = $('.comp-negro-selected');
|
||||
const elements_negrohq = $('.comp-negrohq-selected');
|
||||
const elements_color = $('.comp-color-selected');
|
||||
const elements_colorhq = $('.comp-colorhq-selected');
|
||||
if (selValue.includes("hq")) {
|
||||
Array.from(elements_negro).forEach(element => {
|
||||
$(element).addClass('d-none');
|
||||
});
|
||||
|
||||
if (selValue.includes('color')) {
|
||||
Array.from(elements_color).forEach(element => {
|
||||
$(element).addClass('d-none');
|
||||
});
|
||||
if (selValue.includes('color')) {
|
||||
Array.from(elements_colorhq).forEach(element => {
|
||||
$(element).removeClass('d-none');
|
||||
});
|
||||
}
|
||||
else {
|
||||
Array.from(elements_colorhq).forEach(element => {
|
||||
$(element).addClass('d-none');
|
||||
});
|
||||
}
|
||||
Array.from(elements_negrohq).forEach(element => {
|
||||
$(element).removeClass('d-none');
|
||||
});
|
||||
}
|
||||
else {
|
||||
Array.from(elements_negrohq).forEach(element => {
|
||||
Array.from(elements_color).forEach(element => {
|
||||
$(element).addClass('d-none');
|
||||
});
|
||||
Array.from(elements_colorhq).forEach(element => {
|
||||
$(element).addClass('d-none');
|
||||
});
|
||||
if (selValue.includes('color')) {
|
||||
Array.from(elements_color).forEach(element => {
|
||||
$(element).removeClass('d-none');
|
||||
});
|
||||
}
|
||||
else {
|
||||
Array.from(elements_color).forEach(element => {
|
||||
$(element).addClass('d-none');
|
||||
});
|
||||
}
|
||||
Array.from(elements_negro).forEach(element => {
|
||||
$(element).removeClass('d-none');
|
||||
});
|
||||
}
|
||||
Array.from(elements_negro).forEach(element => {
|
||||
$(element).removeClass('d-none');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@ -259,12 +229,12 @@ class Catalogo {
|
||||
}
|
||||
|
||||
toggleSobrecubiertaFields() {
|
||||
if (this.compPaginasSobrecubierta.val() === '1') {
|
||||
this.sobrecubiertaItems.prop('disabled', false).trigger('change.select2');
|
||||
} else {
|
||||
this.sobrecubiertaItems.prop('disabled', true).trigger('change.select2');
|
||||
if (this.compPaginasSobrecubierta.val() === '1') {
|
||||
this.sobrecubiertaItems.prop('disabled', false).trigger('change.select2');
|
||||
} else {
|
||||
this.sobrecubiertaItems.prop('disabled', true).trigger('change.select2');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user