Supplant bugs solved
This commit is contained in:
parent
f20e2d65c3
commit
a6af942424
|
@ -1,4 +1,4 @@
|
||||||
hedera-web (1.405.65) stable; urgency=low
|
hedera-web (1.405.66) stable; urgency=low
|
||||||
|
|
||||||
* Initial Release.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,8 @@ module.exports = new Class
|
||||||
localStorage.setItem ('hederaCookies', true);
|
localStorage.setItem ('hederaCookies', true);
|
||||||
Htk.Toast.showWarning (_('By using this site you accept cookies'));
|
Htk.Toast.showWarning (_('By using this site you accept cookies'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.supplantInit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
,hide: function ()
|
,hide: function ()
|
||||||
|
@ -512,17 +514,26 @@ module.exports = new Class
|
||||||
|
|
||||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++ Supplant
|
//++++++++++++++++++++++++++++++++++++++++++++++++++++++ Supplant
|
||||||
|
|
||||||
|
,supplantInit: function ()
|
||||||
|
{
|
||||||
|
var user = sessionStorage.getItem ('supplantUser');
|
||||||
|
|
||||||
|
if (user != null)
|
||||||
|
this.supplantUser (user);
|
||||||
|
}
|
||||||
|
|
||||||
,supplantUser: function (user, callback)
|
,supplantUser: function (user, callback)
|
||||||
{
|
{
|
||||||
this._conn.supplantUser (user,
|
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)
|
if (!supplantOk)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
sessionStorage.setItem ('supplantUser', user);
|
||||||
this.loadMenu ();
|
this.loadMenu ();
|
||||||
|
|
||||||
var sql = 'SELECT nickname FROM account.userView';
|
var sql = 'SELECT nickname FROM account.userView';
|
||||||
|
@ -543,6 +554,8 @@ module.exports = new Class
|
||||||
{
|
{
|
||||||
Vn.Node.hide (this.$('supplant'));
|
Vn.Node.hide (this.$('supplant'));
|
||||||
this._conn.supplantEnd ();
|
this._conn.supplantEnd ();
|
||||||
|
sessionStorage.removeItem ('supplantUser',
|
||||||
|
sessionStorage.getItem ('supplantUser'));
|
||||||
this.loadMenu ();
|
this.loadMenu ();
|
||||||
this._onFormChange ();
|
this._onFormChange ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hedera-web",
|
"name": "hedera-web",
|
||||||
"version": "1.405.65",
|
"version": "1.405.66",
|
||||||
"description": "Verdnatura web page",
|
"description": "Verdnatura web page",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
Loading…
Reference in New Issue