Disconnect handling and cleanup of unused code

This commit is contained in:
Egil Moeller 2012-04-23 14:47:07 +02:00
parent e5a22423bb
commit ed7e254417
4 changed files with 71 additions and 118 deletions

View file

@ -71,6 +71,11 @@ function init() {
sendSocketMsg("CLIENT_READY", {});
});
socket.on('disconnect', function()
{
BroadcastSlider.showReconnectUI();
});
//route the incoming messages
socket.on('message', function(message)
{
@ -96,6 +101,12 @@ function init() {
} else {
$("#returnbutton").attr("href", document.location.href.substring(0,document.location.href.lastIndexOf("/")));
}
$('button#forcereconnect').click(function()
{
window.location.reload();
});
});
}