Commit a306e1a7 authored by JC Brand's avatar JC Brand

Clear the chatroom input when form was submitted

parent 9b445f84
......@@ -710,11 +710,13 @@
createChatRoom: function (ev) {
ev.preventDefault();
var name, jid;
var name, jid, input;
if (ev.type === 'click') {
jid = $(ev.target).attr('data-room-jid');
} else {
name = $(ev.target).find('input.new-chatroom-name').val().trim().toLowerCase();
input = this.$el.find('input.new-chatroom-name');
name = input.val().trim().toLowerCase();
input.val(''); // Clear the input
if (name) {
jid = Strophe.escapeNode(name) + '@' + xmppchat.muc_domain;
} else {
......@@ -983,7 +985,7 @@
},
onChatRoomRoster: function (roster, room) {
// underscore size is needed because roster is on object
// underscore size is needed because roster is an object
var controlboxview = xmppchat.chatboxesview.views.controlbox,
roster_size = _.size(roster),
$participant_list = this.$el.find('.participant-list'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment