diff options
| author | Fabien Pinckaers <fp@tinyerp.com> | 2012-06-04 22:44:49 +0200 |
|---|---|---|
| committer | Fabien Pinckaers <fp@tinyerp.com> | 2012-06-04 22:44:49 +0200 |
| commit | eefd98c603f5bb66aaa7a267492deeef5d620f4a (patch) | |
| tree | ebb23027264050ba392f14b161567ae26ee9cf12 /addons/web/static/src | |
| parent | 9ab64b4414c81025c96ba7f469cb3ea41664a781 (diff) | |
[FIX] layouting of groups when row with too fee cols
bzr revid: fp@tinyerp.com-20120604204449-ci68yf3p1837170h
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 9a674e709b2..810eef64b49 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -1135,13 +1135,13 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt if ($child.attr('orientation') === 'vertical') { $td.addClass('oe_vertical_separator').attr('width', '1'); $td.empty(); - row_cols--; + row_cols-= $td.attr('colspan') || 1; } break; case 'label': if ($child.attr('for')) { $td.attr('width', '1%').addClass('oe_form_group_cell_label'); - row_cols--; + row_cols-= $td.attr('colspan') || 1; total--; } break; @@ -1158,15 +1158,15 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt } $td.attr('width', width); $child.removeAttr('width'); - row_cols--; } else { to_compute.push($td); } + row_cols-= $td.attr('colspan') || 1; } }); var unit = Math.floor(total / row_cols); - if (!$(this).is('.oe_form_group_row_incomplete')) { + if (!row_cols && !$(this).is('.oe_form_group_row_incomplete')) { _.each(to_compute, function($td, i) { var width = parseInt($td.attr('colspan'), 10) * unit; $td.attr('width', ((i == to_compute.length - 1) ? total : width) + '%'); |
