[IMP] hiding of readonly form fields in edition row: don't directly access DOM visibility properties
bzr revid: xmo@openerp.com-20120703110700-k0dqtthwo1g36pod
This commit is contained in:
parent
ae6c6eb8ec
commit
336443d604
|
@ -150,18 +150,16 @@ openerp.web.list_editable = function (instance) {
|
|||
}, self.editor.edit,
|
||||
[record.attributes, function (field_name, field) {
|
||||
var cell = cells[field_name];
|
||||
if (!cell) { return; }
|
||||
if (!cell || field.get('effective_readonly')) {
|
||||
// Readonly fields can just remain the list's, form's
|
||||
// usually don't have backgrounds &al
|
||||
field.set({invisible: true});
|
||||
return;
|
||||
}
|
||||
var $cell = $(cell);
|
||||
var position = $cell.position();
|
||||
|
||||
// FIXME: this is shit. Is it possible to prefilter?
|
||||
if (field.get('effective_readonly')) {
|
||||
// Readonly fields can just remain the list's, form's
|
||||
// usually don't have backgrounds &al
|
||||
field.$element.hide();
|
||||
return;
|
||||
}
|
||||
field.$element.show().css({
|
||||
field.$element.css({
|
||||
top: position.top,
|
||||
left: position.left,
|
||||
width: $cell.outerWidth(),
|
||||
|
|
Loading…
Reference in New Issue