mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadido limite para las solapas
This commit is contained in:
@ -38,11 +38,39 @@ $('#paginas').on("change", function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$('.solapas_cubierta').on('change', function(){
|
$('.solapas_cubierta').on('change', function(){
|
||||||
|
|
||||||
|
const ancho_libro = getDimensionLibro().ancho;
|
||||||
|
|
||||||
|
// ancho_libro*2 + lomo + solapas*2 <= 640
|
||||||
|
const limite_1 = ((640 - ancho_libro*2 - getLomoLineasPresupuesto()) / 2.0).toFixed(1);
|
||||||
|
// solapas <= ancho_libro - 10
|
||||||
|
const limite_2 = ancho_libro - 10;
|
||||||
|
const limite = Math.min(limite_1, limite_2);
|
||||||
|
|
||||||
|
if(parseInt($('#solapas_ancho').val()) > limite){
|
||||||
|
$('#solapas_ancho').val(limite)
|
||||||
|
}
|
||||||
|
|
||||||
$('#compGramajeCubierta').trigger('change')
|
$('#compGramajeCubierta').trigger('change')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
$('.solapas_sobrecubierta').on('change', function(){
|
$('.solapas_sobrecubierta').on('change', function(){
|
||||||
|
|
||||||
|
const ancho_libro = getDimensionLibro().ancho;
|
||||||
|
|
||||||
|
// ancho_libro*2 + lomo + solapas*2 <= 640
|
||||||
|
const limite_1 = ((640 - ancho_libro*2 - getLomoLineasPresupuesto()) / 2.0).toFixed(1);
|
||||||
|
// solapas <= ancho_libro - 10
|
||||||
|
const limite_2 = ancho_libro - 10;
|
||||||
|
const limite = Math.min(limite_1, limite_2);
|
||||||
|
|
||||||
|
if(parseInt($('#solapas_ancho_sobrecubierta').val()) > limite){
|
||||||
|
$('#solapas_ancho_sobrecubierta').val(limite)
|
||||||
|
}
|
||||||
|
|
||||||
$('#compGramajeSobrecubierta').trigger('change')
|
$('#compGramajeSobrecubierta').trigger('change')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -387,9 +387,9 @@ function event_change_formato(){
|
|||||||
$('#compPaginasNegrohq').trigger('change');
|
$('#compPaginasNegrohq').trigger('change');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#compPapelCubierta').trigger('change');
|
$('.solapas_cubierta').trigger('change')
|
||||||
$('#compPapelSobrecubierta').trigger('change');
|
$('.solapas_sobrecubierta').trigger('change')
|
||||||
|
|
||||||
checkPaginasPresupuesto()
|
checkPaginasPresupuesto()
|
||||||
|
|
||||||
updatePresupuesto({
|
updatePresupuesto({
|
||||||
|
|||||||
4020
xdebug.log
4020
xdebug.log
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user