mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
menu lateral datos generales
This commit is contained in:
@ -56,6 +56,12 @@ class DatosGenerales {
|
||||
this.excluirRotativa = this.domItem.find("#excluirRotativa");
|
||||
this.prototipo = this.domItem.find("#prototipo");
|
||||
|
||||
this.rl_datos_generales = $(".rl-datos-generales");
|
||||
this.rl_tipo = $("#rl_tipo");
|
||||
this.rl_tamanio = $("#rl_tamanio");
|
||||
this.rl_tiradas = $("#rl_tiradas");
|
||||
this.rl_paginas = $("#rl_paginas");
|
||||
|
||||
this.initValidation();
|
||||
}
|
||||
|
||||
@ -373,10 +379,72 @@ class DatosGenerales {
|
||||
}
|
||||
}).on('core.form.valid', () => {
|
||||
if (this.allowNext)
|
||||
|
||||
stepper.next();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
processMenuLateral() {
|
||||
|
||||
let menu_off = true;
|
||||
this.rl_datos_generales.removeClass('d-none');
|
||||
|
||||
if (this.tiposLibro.filter('.selected').length > 0) {
|
||||
let tipo = String(this.tiposLibro.filter('.selected').attr('id'));
|
||||
tipo = tipo.charAt(0).toUpperCase() + tipo.slice(1);
|
||||
this.rl_tipo.text(tipo);
|
||||
this.rl_tipo.removeClass('d-none');
|
||||
menu_off = false;
|
||||
}
|
||||
else {
|
||||
this.rl_tipo.addClass('d-none');
|
||||
}
|
||||
if (this.checkFormatoPersonalizado.is(':checked')) {
|
||||
let ancho = parseFloat(this.anchoPersonalizado.val());
|
||||
let alto = parseFloat(this.altoPersonalizado.val());
|
||||
if (!isNaN(ancho) && !isNaN(alto)) {
|
||||
this.rl_tamanio.text(ancho + ' x ' + alto);
|
||||
this.rl_tamanio.removeClass('d-none');
|
||||
menu_off = false;
|
||||
}
|
||||
else {
|
||||
this.rl_tamanio.addClass('d-none');
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
if (this.papelFormatoId.val() != null) {
|
||||
this.rl_tamanio.text(this.papelFormatoId.find('option:selected').text());
|
||||
this.rl_tamanio.removeClass('d-none');
|
||||
menu_off = false;
|
||||
}
|
||||
else {
|
||||
this.rl_tamanio.addClass('d-none');
|
||||
}
|
||||
}
|
||||
|
||||
const tiradas = this.getTiradas();
|
||||
if (tiradas.length > 0) {
|
||||
this.rl_tiradas.text(tiradas.join(', '));
|
||||
this.rl_tiradas.removeClass('d-none');
|
||||
}
|
||||
else
|
||||
this.rl_tiradas.addClass('d-none');
|
||||
|
||||
if (this.paginas.val() > 0) {
|
||||
this.rl_paginas.text(this.paginas.val() + " páginas");
|
||||
this.rl_paginas.removeClass('d-none');
|
||||
}
|
||||
else
|
||||
this.rl_paginas.addClass('d-none');
|
||||
|
||||
if (!menu_off)
|
||||
this.rl_datos_generales.removeClass('d-none');
|
||||
|
||||
}
|
||||
|
||||
|
||||
cargarDatos(datos) {
|
||||
|
||||
this.titulo.val(datos.titulo);
|
||||
|
||||
Reference in New Issue
Block a user