Added esc button handling

bzr revid: nicolas.vanhoren@openerp.com-20120531100503-bvn4jz3ztoscww55
This commit is contained in:
niv-openerp 2012-05-31 12:05:03 +02:00
parent 8afd115aca
commit 3eafe0a6be
1 changed files with 5 additions and 0 deletions

View File

@ -774,6 +774,11 @@ instance.web_kanban.QuickCreate = instance.web.Widget.extend({
$(".oe-kanban-quick_create_close", this.$element).click(function () {
self.trigger('close');
});
self.$input.keyup(function(e) {
if (e.keyCode == 27 && self._buttons) {
self.trigger('close');
}
});
},
focus: function() {
this.$element.find('input').focus();