projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4530ef5
)
[IMP] im_chat: ESC shortcut to close chat window
author
Richard Mathot
<rim@openerp.com>
Thu, 11 Sep 2014 14:13:44 +0000
(16:13 +0200)
committer
Richard Mathot
<rim@openerp.com>
Thu, 11 Sep 2014 14:13:44 +0000
(16:13 +0200)
Cherry-picked from
0172cfba76ae4509be33220f6d4ef09c005c8312
Closes #2335
addons/im_chat/static/src/js/im_chat.js
patch
|
blob
|
history
diff --git
a/addons/im_chat/static/src/js/im_chat.js
b/addons/im_chat/static/src/js/im_chat.js
index
4188d6f
..
ef0656f
100644
(file)
--- a/
addons/im_chat/static/src/js/im_chat.js
+++ b/
addons/im_chat/static/src/js/im_chat.js
@@
-327,6
+327,15
@@
this._go_bottom();
},
keydown: function(e) {
+ if(e && e.which == 27) {
+ if(this.$el.prev().find('.oe_im_chatview_input').length > 0){
+ this.$el.prev().find('.oe_im_chatview_input').focus();
+ }else{
+ this.$el.next().find('.oe_im_chatview_input').focus();
+ }
+ e.stopPropagation();
+ this.update_fold_state('closed');
+ }
if(e && e.which !== 13) {
return;
}