[ADD] editable flag on list views for fp
bzr revid: xmo@openerp.com-20120808104311-ajrne9fb9emtaoe6
This commit is contained in:
parent
5c225be25e
commit
67518796c6
|
@ -99,6 +99,7 @@ openerp.web.list_editable = function (instance) {
|
||||||
// tree/@editable takes priority on everything else if present.
|
// tree/@editable takes priority on everything else if present.
|
||||||
var result = this._super(data, grouped);
|
var result = this._super(data, grouped);
|
||||||
if (this.editable()) {
|
if (this.editable()) {
|
||||||
|
this.$element.addClass('oe_list_editable');
|
||||||
// FIXME: any hook available to ensure this is only done once?
|
// FIXME: any hook available to ensure this is only done once?
|
||||||
this.$buttons
|
this.$buttons
|
||||||
.off('click', '.oe_list_save')
|
.off('click', '.oe_list_save')
|
||||||
|
@ -123,6 +124,8 @@ openerp.web.list_editable = function (instance) {
|
||||||
.then(this.proxy('setup_events'));
|
.then(this.proxy('setup_events'));
|
||||||
|
|
||||||
return $.when(result, editor_ready);
|
return $.when(result, editor_ready);
|
||||||
|
} else {
|
||||||
|
this.$element.removeClass('oe_list_editable');
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue