[FIX] layouting of groups when row with too fee cols
bzr revid: fp@tinyerp.com-20120604210031-omhqeaim4g4gogsj
This commit is contained in:
parent
eefd98c603
commit
32002a6852
|
@ -1136,6 +1136,7 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
|
||||||
$td.addClass('oe_vertical_separator').attr('width', '1');
|
$td.addClass('oe_vertical_separator').attr('width', '1');
|
||||||
$td.empty();
|
$td.empty();
|
||||||
row_cols-= $td.attr('colspan') || 1;
|
row_cols-= $td.attr('colspan') || 1;
|
||||||
|
total--;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'label':
|
case 'label':
|
||||||
|
@ -1158,20 +1159,22 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
|
||||||
}
|
}
|
||||||
$td.attr('width', width);
|
$td.attr('width', width);
|
||||||
$child.removeAttr('width');
|
$child.removeAttr('width');
|
||||||
|
row_cols-= $td.attr('colspan') || 1;
|
||||||
} else {
|
} else {
|
||||||
to_compute.push($td);
|
to_compute.push($td);
|
||||||
}
|
}
|
||||||
row_cols-= $td.attr('colspan') || 1;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var unit = Math.floor(total / row_cols);
|
if (row_cols) {
|
||||||
if (!row_cols && !$(this).is('.oe_form_group_row_incomplete')) {
|
var unit = Math.floor(total / row_cols);
|
||||||
_.each(to_compute, function($td, i) {
|
if (!$(this).is('.oe_form_group_row_incomplete')) {
|
||||||
var width = parseInt($td.attr('colspan'), 10) * unit;
|
_.each(to_compute, function($td, i) {
|
||||||
$td.attr('width', ((i == to_compute.length - 1) ? total : width) + '%');
|
var width = parseInt($td.attr('colspan'), 10) * unit;
|
||||||
total -= width;
|
$td.attr('width', width + '%');
|
||||||
});
|
total -= width;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
_.each(children, function(el) {
|
_.each(children, function(el) {
|
||||||
|
|
Loading…
Reference in New Issue