Optimizando vista html

This commit is contained in:
imnavajas
2025-04-22 12:00:12 +02:00
parent ed5f73db25
commit 649a244a10
3 changed files with 119 additions and 257 deletions

View File

@ -10,9 +10,9 @@ class Catalogo {
this.cliente = new ClassSelect($("#cliente_id"), '/catalogo/libros/clientlist', "Seleccione un cliente");
this.tipo_impresion = $("#tipo_impresion");
this.caras_cubierta = $("#compCarasCubierta");
this.paginas_cubierta = $("#cubierta_paginas");
this.encuadernacion = new ClassSelect($("#encuadernacion"), '/importador/getencuadernacion', "Seleccione una encuadernación");
this.encuadernacion = new ClassSelect($("#encuadernacion_id"), '/importador/getencuadernacion', "Seleccione una encuadernación");
this.compPapelNegro = new ClassSelect($("#negro_papel_id"), '/presupuestoadmin/papelgenerico', "Seleccione un papel", false,
{
@ -26,7 +26,7 @@ class Catalogo {
tipo: () => this.tipo_impresion.val().includes('hq') ? 'negrohq' : 'negro',
});
this.compPapelNegroPod = new ClassSelect($("#compPapelNegroPod"), '/presupuestoadmin/papelgenerico', "Seleccione un papel", false,
this.compPapelNegroPod = new ClassSelect($("#negro_pod_papel_id"), '/presupuestoadmin/papelgenerico', "Seleccione un papel", false,
{
tipo_impresion: () => this.encuadernacion.getVal(),
tirada: () => this.tirada_pod,
@ -150,12 +150,13 @@ class Catalogo {
this.cliente.init();
this.tipo_impresion.select2();
this.caras_cubierta.select2();
this.paginas_cubierta.select2();
this.paginasSobrecubierta.select2();
this.encuadernacion.init();
this.compPapelNegro.init();
this.compPapelNegroPod.init();
this.compGramajeNegro.init();
this.compPapelColor.init();
this.compGramajeColor.init();
@ -202,8 +203,8 @@ class Catalogo {
$('.color_items').off('change');
const selValue = this.tipo_impresion.val();
const elements_negro = $('.negro-selected');
const elements_color = $('.color-selected');
const elements_negro = $('.negro-line');
const elements_color = $('.color-line');
if (selValue.includes('color')) {
Array.from(elements_color).forEach(element => {