Commit ffbacad9 authored by JC Brand's avatar JC Brand

Merge branch 'master' of github.com:jcbrand/converse.js

Conflicts:
	converse.js
parents 75b9a35e 1c7ef191
...@@ -25,6 +25,15 @@ ...@@ -25,6 +25,15 @@
height: 1.1em; height: 1.1em;
} }
#toggle-online-users {
display: none;
}
#connecting-to-chat {
background: url('/spinner.gif') no-repeat;
padding-left: 1.4em;
}
.chat-head { .chat-head {
color: #ffffff; color: #ffffff;
margin: 0; margin: 0;
......
...@@ -1291,7 +1291,6 @@ ...@@ -1291,7 +1291,6 @@
ask = item.get('ask'), ask = item.get('ask'),
that = this, that = this,
subscription = item.get('subscription'); subscription = item.get('subscription');
this.$el.addClass(item.get('presence_type')); this.$el.addClass(item.get('presence_type'));
if (ask === 'subscribe') { if (ask === 'subscribe') {
...@@ -1803,6 +1802,7 @@ ...@@ -1803,6 +1802,7 @@
// -------------- // --------------
$(document).ready($.proxy(function () { $(document).ready($.proxy(function () {
var chatdata = $('div#collective-xmpp-chat-data'), var chatdata = $('div#collective-xmpp-chat-data'),
$connecting = $('span#connecting-to-chat'),
$toggle = $('a#toggle-online-users'); $toggle = $('a#toggle-online-users');
$toggle.unbind('click'); $toggle.unbind('click');
...@@ -1815,6 +1815,8 @@ ...@@ -1815,6 +1815,8 @@
}).render(); }).render();
$(document).bind('jarnxmpp.disconnected', $.proxy(function (ev, conn) { $(document).bind('jarnxmpp.disconnected', $.proxy(function (ev, conn) {
$connecting.show();
$toggle.hide();
console.log("Connection Failed :("); console.log("Connection Failed :(");
}, this)); }, this));
...@@ -1861,6 +1863,8 @@ ...@@ -1861,6 +1863,8 @@
// Controlbox toggler // Controlbox toggler
if ($toggle.length) { if ($toggle.length) {
$connecting.hide();
$toggle.show();
$toggle.bind('click', $.proxy(function (e) { $toggle.bind('click', $.proxy(function (e) {
e.preventDefault(); e.preventDefault();
if ($("div#controlbox").is(':visible')) { 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