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 | |
| parent | d76e8be574e4c73d3bcfc0d7802340ac253737f6 (diff) | |
[FIX] Fix layouting width issue
bzr revid: fme@openerp.com-20120320120621-jk4ojmz925veym1v
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/css/base.css | 1 | ||||
| -rw-r--r-- | addons/web/static/src/css/base.sass | 1 | ||||
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 7 |
3 files changed, 6 insertions, 3 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index fac12098f17..07861d4e6e8 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -361,6 +361,7 @@ } .openerp2 .oe_layout_debugging .oe_form_group_cell { border: 1px solid blue; + padding-bottom: 1em; } .openerp2 .oe_layout_debugging .oe_layout_debug_cell { position: absolute; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 9a77d14558e..746bc5d32b4 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -351,6 +351,7 @@ $colour4: #8a89ba border: 1px solid red .oe_form_group_cell border: 1px solid blue + padding-bottom: 1em .oe_layout_debug_cell position: absolute color: white 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) + '%'); |
