Commit 9e5dc21a authored by JC Brand's avatar JC Brand

Refactor showing of chat room status messages.

onChatRoomPresence and showStatusMessages have been refactored to give more
detailed information and to also show the reasons given to actions taken by
moderators.
parent e8a70abc
This diff is collapsed.
This diff is collapsed.
......@@ -40,6 +40,9 @@ require([
window.converse_api = converse;
window.localStorage.clear();
window.sessionStorage.clear();
// XXX: call this to initialize Strophe plugins
new Strophe.Connection('localhost');
converse.initialize({
prebind: false,
xhr_user_search: false,
......
......@@ -89,6 +89,18 @@
return converse.roster.get(jid).trigger("open");
};
utils.openChatRoom = function (room, server, nick) {
// Open a new chatroom
this.openControlBox();
this.openRoomsPanel();
var roomspanel = converse.chatboxviews.get('controlbox').roomspanel;
roomspanel.$el.find('input.new-chatroom-name').val(room);
roomspanel.$el.find('input.new-chatroom-nick').val(nick);
roomspanel.$el.find('input.new-chatroom-server').val(server);
roomspanel.$el.find('form').submit();
this.closeControlBox();
};
utils.removeRosterContacts = function () {
var model;
while (converse.rosterview.model.length) {
......
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