Commit e6c5a6c5 authored by JC Brand's avatar JC Brand

Merge pull request #2 from alecghica/master

Code clean up + updated error message
parents ffbacad9 0f9c088c
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
} }
#connecting-to-chat { #connecting-to-chat {
background: url('/spinner.gif') no-repeat; background: url(images/spinner.gif) no-repeat left;
padding-left: 1.4em; padding-left: 1.4em;
} }
......
...@@ -1678,14 +1678,14 @@ ...@@ -1678,14 +1678,14 @@
store.set(xmppchat.connection.bare_jid+'-xmpp-status', value); store.set(xmppchat.connection.bare_jid+'-xmpp-status', value);
}, },
getStatusMessage: function () {
return store.get(xmppchat.connection.bare_jid+'-xmpp-custom-status');
},
setStatusMessage: function (status_message) { setStatusMessage: function (status_message) {
xmppchat.connection.send($pres({'type':this.getStatus()}).c('status').t(status_message)); xmppchat.connection.send($pres({'type':this.getStatus()}).c('status').t(status_message));
this.set({'status_message': status_message}); this.set({'status_message': status_message});
store.set(xmppchat.connection.bare_jid+'-xmpp-custom-status', status_message); store.set(xmppchat.connection.bare_jid+'-xmpp-custom-status', status_message);
},
getStatusMessage: function () {
return store.get(xmppchat.connection.bare_jid+'-xmpp-custom-status');
} }
}); });
...@@ -1815,8 +1815,10 @@ ...@@ -1815,8 +1815,10 @@
}).render(); }).render();
$(document).bind('jarnxmpp.disconnected', $.proxy(function (ev, conn) { $(document).bind('jarnxmpp.disconnected', $.proxy(function (ev, conn) {
$connecting.show();
$toggle.hide(); $toggle.hide();
$connecting.show();
$connecting.html('Unable to communicate with chat server');
$connecting.css('background-image', "url(images/error_icon.png)");
console.log("Connection Failed :("); console.log("Connection Failed :(");
}, this)); }, this));
......
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