Add contact/room with enter
This commit is contained in:
parent
536698310b
commit
7b6dba8132
|
@ -25,7 +25,9 @@ module.exports = HumanView.extend({
|
||||||
'click .reconnect': 'handleReconnect',
|
'click .reconnect': 'handleReconnect',
|
||||||
'click .logout': 'handleLogout',
|
'click .logout': 'handleLogout',
|
||||||
'click .addContact': 'handleAddContact',
|
'click .addContact': 'handleAddContact',
|
||||||
|
'keydown #addcontact': 'keyDownAddContact',
|
||||||
'click .joinMUC': 'handleJoinMUC',
|
'click .joinMUC': 'handleJoinMUC',
|
||||||
|
'keydown #joinmuc': 'keyDownJoinMUC',
|
||||||
'blur #me .status': 'handleStatusChange'
|
'blur #me .status': 'handleStatusChange'
|
||||||
},
|
},
|
||||||
classBindings: {
|
classBindings: {
|
||||||
|
@ -101,6 +103,12 @@ module.exports = HumanView.extend({
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
keyDownAddContact: function (e) {
|
||||||
|
if (e.which === 13 && !e.shiftKey) {
|
||||||
|
this.handleAddContact(e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
handleJoinMUC: function (e) {
|
handleJoinMUC: function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
@ -117,5 +125,11 @@ module.exports = HumanView.extend({
|
||||||
});
|
});
|
||||||
me.mucs.save();
|
me.mucs.save();
|
||||||
me.mucs.get(mucjid).join();
|
me.mucs.get(mucjid).join();
|
||||||
|
},
|
||||||
|
keyDownJoinMUC: function (e) {
|
||||||
|
if (e.which === 13 && !e.shiftKey) {
|
||||||
|
this.handleJoinMUC(e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue