Commit d0f4b77db7b69bbdd75e9abbfbefb66ba1921668

Authored by Georg Hopp
1 parent e6dc20ca

update user informations when session timeouts

@@ -3,8 +3,8 @@ function Application() @@ -3,8 +3,8 @@ function Application()
3 } 3 }
4 4
5 Application.prototype.init = function(menu) { 5 Application.prototype.init = function(menu) {
6 - this.session = new Session("#sessid", "#sessinfo");  
7 this.user = new User("#user", menu); 6 this.user = new User("#user", menu);
  7 + this.session = new Session("#sessid", "#sessinfo", this.user);
8 8
9 $(window).focus($.proxy(this.session.update, this.session)); 9 $(window).focus($.proxy(this.session.update, this.session));
10 10
1 -function Session(idSelector, infoSelector) 1 +function Session(idSelector, infoSelector, user)
2 { 2 {
  3 + this.user = user;
3 this.idElement = $(idSelector); 4 this.idElement = $(idSelector);
4 this.canvas = $(infoSelector + " canvas").get(0); 5 this.canvas = $(infoSelector + " canvas").get(0);
5 this.context = this.canvas.getContext("2d"); 6 this.context = this.canvas.getContext("2d");
@@ -22,6 +23,9 @@ Session.prototype.clear = function() { @@ -22,6 +23,9 @@ Session.prototype.clear = function() {
22 this._leftWidth = 0.0; 23 this._leftWidth = 0.0;
23 24
24 this.idElement.empty().append(this.id); 25 this.idElement.empty().append(this.id);
  26 +
  27 + this.user.update();
  28 +
25 this._stop(); 29 this._stop();
26 } 30 }
27 31
Please register or login to post a comment