Supplant bugs solved

This commit is contained in:
Juan Ferrer Toribio 2018-01-15 09:24:15 +01:00
parent f20e2d65c3
commit a6af942424
3 changed files with 17 additions and 4 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.405.65) stable; urgency=low
hedera-web (1.405.66) stable; urgency=low
* Initial Release.

View File

@ -88,6 +88,8 @@ module.exports = new Class
localStorage.setItem ('hederaCookies', true);
Htk.Toast.showWarning (_('By using this site you accept cookies'));
}
this.supplantInit ();
}
,hide: function ()
@ -512,17 +514,26 @@ module.exports = new Class
//++++++++++++++++++++++++++++++++++++++++++++++++++++++ Supplant
,supplantInit: function ()
{
var user = sessionStorage.getItem ('supplantUser');
if (user != null)
this.supplantUser (user);
}
,supplantUser: function (user, callback)
{
this._conn.supplantUser (user,
this._onUserSupplant.bind (this, callback));
this._onUserSupplant.bind (this, callback, user));
}
,_onUserSupplant: function (callback, supplantOk)
,_onUserSupplant: function (callback, user, supplantOk)
{
if (!supplantOk)
return;
sessionStorage.setItem ('supplantUser', user);
this.loadMenu ();
var sql = 'SELECT nickname FROM account.userView';
@ -543,6 +554,8 @@ module.exports = new Class
{
Vn.Node.hide (this.$('supplant'));
this._conn.supplantEnd ();
sessionStorage.removeItem ('supplantUser',
sessionStorage.getItem ('supplantUser'));
this.loadMenu ();
this._onFormChange ();
}

View File

@ -1,6 +1,6 @@
{
"name": "hedera-web",
"version": "1.405.65",
"version": "1.405.66",
"description": "Verdnatura web page",
"license": "GPL-3.0",
"repository": {