[imp] added transfer of invisibility to td in groups
bzr revid: nicolas.vanhoren@openerp.com-20120326164905-5tx474gheq9dfmdj
This commit is contained in:
parent
d63fc1c119
commit
5f091f67e3
|
@ -908,7 +908,22 @@ openerp.web.FormRenderingEngine = openerp.web.Class.extend({
|
||||||
row_cols = cols;
|
row_cols = cols;
|
||||||
}
|
}
|
||||||
row_cols -= colspan;
|
row_cols -= colspan;
|
||||||
|
|
||||||
$td = $('<td/>').addClass('oe_form_group_cell').attr('colspan', colspan);
|
$td = $('<td/>').addClass('oe_form_group_cell').attr('colspan', colspan);
|
||||||
|
// invisibility transfer
|
||||||
|
var invisible = undefined;
|
||||||
|
if (_.include(["button", "field"], tagName)) {
|
||||||
|
var field_modifiers = JSON.parse($child.attr('modifiers') || '{}');
|
||||||
|
invisible = field_modifiers.invisible;
|
||||||
|
field_modifiers.invisible = undefined;
|
||||||
|
$child.attr('modifiers', JSON.stringify(field_modifiers));
|
||||||
|
} else {
|
||||||
|
invisible = $child.attr('invisible') !== undefined ? JSON.parse($child.attr('invisible'))
|
||||||
|
: undefined;
|
||||||
|
$child.removeAttr("invisible");
|
||||||
|
}
|
||||||
|
self.handle_invisible($td, invisible !== undefined ? JSON.stringify(invisible) : undefined);
|
||||||
|
|
||||||
$tr.append($td.append($child));
|
$tr.append($td.append($child));
|
||||||
children.push($child[0]);
|
children.push($child[0]);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue