[FIX] monkey around keyboard handling to ensure we don't cancel a cancelled edition or any other such thing.
maybe the form should be explicitly blurred when saved/cancelled? bzr revid: xmo@openerp.com-20120710143323-fye927s9k455mqls
This commit is contained in:
parent
46da3547ca
commit
52723ef052
|
@ -365,6 +365,7 @@ openerp.web.list_editable = function (instance) {
|
|||
});
|
||||
},
|
||||
keyup_ENTER: function () {
|
||||
if (!this.editor.isEditing()) { return; }
|
||||
var self = this;
|
||||
return this.saveEdition().pipe(function (saveInfo) {
|
||||
if (saveInfo.created) {
|
||||
|
@ -375,6 +376,7 @@ openerp.web.list_editable = function (instance) {
|
|||
});
|
||||
},
|
||||
keyup_ESCAPE: function () {
|
||||
if (!this.editor.isEditing()) { return; }
|
||||
return this.cancelEdition();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue