1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-11-05 17:15:04 -05:00

Change user status with enter

This commit is contained in:
Sebastien Hut 2014-11-18 00:44:39 +01:00
parent 7b6dba8132
commit 93cae83503

View File

@ -28,7 +28,8 @@ module.exports = HumanView.extend({
'keydown #addcontact': 'keyDownAddContact',
'click .joinMUC': 'handleJoinMUC',
'keydown #joinmuc': 'keyDownJoinMUC',
'blur #me .status': 'handleStatusChange'
'blur #me .status': 'handleStatusChange',
'keydown .status': 'keyDownStatus'
},
classBindings: {
connected: '#connectionOverlay',
@ -87,6 +88,12 @@ module.exports = HumanView.extend({
caps: client.disco.caps
});
},
keyDownStatus: function (e) {
if (e.which === 13 && !e.shiftKey) {
e.target.blur();
return false;
}
},
handleLogout: function (e) {
app.navigate('/logout');
},