[IMP] Improved rendering engine group cells width computing
bzr revid: fme@openerp.com-20120419153341-gequ3826z6fd44x6
This commit is contained in:
parent
a6bc55c95c
commit
5afd20a530
|
@ -1783,11 +1783,14 @@
|
|||
font-weight: bold;
|
||||
}
|
||||
.openerp .oe_layout_debugging .oe_form_group {
|
||||
outline: 2px dashed red;
|
||||
outline: 2px dashed green;
|
||||
}
|
||||
.openerp .oe_layout_debugging .oe_form_group_cell {
|
||||
outline: 1px solid blue;
|
||||
}
|
||||
.openerp .oe_layout_debugging .oe_form_group:hover, .openerp .oe_layout_debugging .oe_form_group_cell:hover {
|
||||
outline-color: red;
|
||||
}
|
||||
.openerp .oe_debug_view {
|
||||
float: left;
|
||||
}
|
||||
|
|
|
@ -1490,9 +1490,11 @@ $colour4: #8a89ba
|
|||
// Debugging stuff {{{
|
||||
.oe_layout_debugging
|
||||
.oe_form_group
|
||||
outline: 2px dashed red
|
||||
outline: 2px dashed green
|
||||
.oe_form_group_cell
|
||||
outline: 1px solid blue
|
||||
.oe_form_group:hover, .oe_form_group_cell:hover
|
||||
outline-color: red
|
||||
|
||||
.oe_debug_view
|
||||
float: left
|
||||
|
|
|
@ -1119,8 +1119,21 @@ instance.web.form.FormRenderingEngine = instance.web.Class.extend({
|
|||
}
|
||||
break;
|
||||
default:
|
||||
var width = _.str.trim($child.attr('width') || ''),
|
||||
iwidth = parseInt(width, 10);
|
||||
if (iwidth) {
|
||||
if (width.substr(-1) === '%') {
|
||||
total -= iwidth;
|
||||
width = iwidth + '%';
|
||||
}
|
||||
$td.attr('width', width);
|
||||
$child.removeAttr('width');
|
||||
row_cols--;
|
||||
} else {
|
||||
to_compute.push($td);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
var unit = Math.floor(total / row_cols);
|
||||
_.each(to_compute, function($td, i) {
|
||||
|
|
Loading…
Reference in New Issue