|
|
@ -7,6 +7,7 @@ function Session(sId) |
|
|
this.id = "none" |
|
|
this.id = "none" |
|
|
this.timeout = 0; |
|
|
this.timeout = 0; |
|
|
this.timeleft = 0; |
|
|
this.timeleft = 0; |
|
|
|
|
|
this.username = ""; |
|
|
this.interval = null; |
|
|
this.interval = null; |
|
|
|
|
|
|
|
|
this.draw(); |
|
|
this.draw(); |
|
|
@ -17,6 +18,10 @@ Session.prototype.loadJSON = function(data) |
|
|
this.id = ("0" == data.id)? "none" : data.id; |
|
|
this.id = ("0" == data.id)? "none" : data.id; |
|
|
this.timeout = data.timeout * 10; |
|
|
this.timeout = data.timeout * 10; |
|
|
this.timeleft = data.timeleft * 10; |
|
|
this.timeleft = data.timeleft * 10; |
|
|
|
|
|
this.username = data.username; |
|
|
|
|
|
|
|
|
|
|
|
this.eSid.empty().append(this.id); |
|
|
|
|
|
$("#main span:eq(0)").empty().append(" " + this.username); |
|
|
|
|
|
|
|
|
this.draw(); |
|
|
this.draw(); |
|
|
if (0 < this.timeleft) |
|
|
if (0 < this.timeleft) |
|
|
@ -25,8 +30,6 @@ Session.prototype.loadJSON = function(data) |
|
|
|
|
|
|
|
|
Session.prototype.draw = function() |
|
|
Session.prototype.draw = function() |
|
|
{ |
|
|
{ |
|
|
this.eSid.empty().append(this.id); |
|
|
|
|
|
|
|
|
|
|
|
this.context.fillStyle = "rgb(255, 0, 0)"; |
|
|
this.context.fillStyle = "rgb(255, 0, 0)"; |
|
|
this.context.fillRect(0, 0, this.canvas.width, this.canvas.height); |
|
|
this.context.fillRect(0, 0, this.canvas.width, this.canvas.height); |
|
|
|
|
|
|
|
|
@ -62,6 +65,10 @@ Session.prototype.stop = function() |
|
|
this.id = "none"; |
|
|
this.id = "none"; |
|
|
this.timeout = 0; |
|
|
this.timeout = 0; |
|
|
this.timeleft = 0; |
|
|
this.timeleft = 0; |
|
|
|
|
|
this.username = ""; |
|
|
|
|
|
|
|
|
|
|
|
this.eSid.empty().append(this.id); |
|
|
|
|
|
$("#main span:eq(0)").empty().append(" " + this.username); |
|
|
|
|
|
|
|
|
this.draw(); |
|
|
this.draw(); |
|
|
} |
|
|
} |
|
|
|