diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2011-09-06 11:50:54 +0200 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2011-09-06 11:50:54 +0200 |
| commit | f7544bb989ffc0b9bb3d19fc86b44a6a1086e0ee (patch) | |
| tree | ddad548306d76c0c7e654c8c4fca47eb7cea6374 /addons/web/static/src/js/core.js | |
| parent | baed408025a5c4dedf1eac52d2cf78063da78e71 (diff) | |
| parent | 71cb3b3bc38bcf4f69398138c8193f0fde5d213e (diff) | |
[imp] lot of improvements to header & about page
bzr revid: nicolas.vanhoren@openerp.com-20110906095054-qjlpmyd83spjm79b
Diffstat (limited to 'addons/web/static/src/js/core.js')
| -rw-r--r-- | addons/web/static/src/js/core.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 4acc8ec15c3..d826ff34a43 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -346,7 +346,6 @@ openerp.web.Session = openerp.web.CallbackEnabled.extend( /** @lends openerp.web this.context = {}; this.shortcuts = []; this.active_id = null; - this.session = this; }, start: function() { this.session_restore(); @@ -471,9 +470,8 @@ openerp.web.Session = openerp.web.CallbackEnabled.extend( /** @lends openerp.web self.user_context = result.context; self.session_save(); self.on_session_valid(); - if (success_callback) - success_callback(); - }); + return true; + }).then(success_callback); }, session_logout: function() { this.uid = false; @@ -489,7 +487,10 @@ openerp.web.Session = openerp.web.CallbackEnabled.extend( /** @lends openerp.web this.user_context = this.get_cookie("user_context"); // we should do an rpc to confirm that this session_id is valid and if it is retrieve the information about db and login // then call on_session_valid - this.on_session_valid(); + if (this.uid) + this.on_session_valid(); + else + this.on_session_invalid(); }, /** * Saves the session id and uid locally |
