Commit 4bbf5b05 authored by Alexandru Ghica's avatar Alexandru Ghica

Feature: added "Connecting to chat ..." info

- Feature: added spining image and "Connecting to chat ..." info under chat panel
  when the user is not (yet) binded to the jabber server
  [alecghica]
parent 3224a8c5
......@@ -25,6 +25,15 @@
height: 1.1em;
}
#toggle-online-users {
display: none;
}
#connecting-to-chat {
background: url('/spinner.gif') no-repeat;
padding-left: 1.4em;
}
.chat-head {
color: #ffffff;
margin: 0;
......
......@@ -1759,6 +1759,7 @@
// --------------
$(document).ready($.proxy(function () {
var chatdata = jQuery('div#collective-xmpp-chat-data'),
$connecting = $('span#connecting-to-chat'),
$toggle = $('a#toggle-online-users');
$toggle.unbind('click');
......@@ -1771,6 +1772,8 @@
}).render();
$(document).bind('jarnxmpp.disconnected', $.proxy(function (ev, conn) {
$connecting.show();
$toggle.hide();
console.log("Connection Failed :(");
}, this));
......@@ -1818,6 +1821,8 @@
// Controlbox toggler
if ($toggle.length) {
$connecting.hide();
$toggle.show();
$toggle.bind('click', $.proxy(function (e) {
e.preventDefault();
if ($("div#controlbox").is(':visible')) {
......
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