diff options
| author | Fabien Meghazi <fme@openerp.com> | 2012-03-20 13:06:21 +0100 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2012-03-20 13:06:21 +0100 |
| commit | 64f940f212f0a797a0e92fa2c9862e68e93ea5a3 (patch) | |
| tree | 2c4b4653065d9287921ab6bca9987d18be74ef83 /addons/web/static/src/js | |
| parent | d76e8be574e4c73d3bcfc0d7802340ac253737f6 (diff) | |
[FIX] Fix layouting width issue
bzr revid: fme@openerp.com-20120320120621-jk4ojmz925veym1v
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index ec82cff76fc..4f64254885e 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -846,6 +846,7 @@ openerp.web.FormRenderingEngine = openerp.web.Widget.extend({ // Now compute width of cells $table.find('tbody > tr').each(function() { var to_compute = [], + row_cols = cols, total = 100; $(this).children().each(function() { var $td = $(this), @@ -855,13 +856,13 @@ openerp.web.FormRenderingEngine = openerp.web.Widget.extend({ if ($child.attr('orientation') === 'vertical') { $td.addClass('oe_vertical_separator').attr('width', '1'); $td.empty(); - cols--; + row_cols--; } break; case 'label': if ($child.attr('for')) { $td.attr('width', '1%'); - cols--; + row_cols--; total--; } break; @@ -869,7 +870,7 @@ openerp.web.FormRenderingEngine = openerp.web.Widget.extend({ to_compute.push($td); } }); - var unit = Math.floor(total / cols); + var unit = Math.floor(total / row_cols); _.each(to_compute, function($td, i) { var width = parseInt($td.attr('colspan'), 10) * unit; $td.attr('width', ((i == to_compute.length - 1) ? total : width) + '%'); |
