Manage user global variable
This commit is contained in:
parent
eaf2c8d0f4
commit
d70e964e77
1 changed files with 2 additions and 3 deletions
|
@ -407,9 +407,7 @@ on_valid_login_modal=function(e) {
|
|||
* Sync
|
||||
********************/
|
||||
on_click_sync_btn=function(e) {
|
||||
if (jQuery.type(localStorage.user)!="undefined") {
|
||||
user=JSON.parse(localStorage.user);
|
||||
localStorage.oldgroups=groups.export();
|
||||
if (user) {
|
||||
sync_server.sync(user.server, user.email, user.password, groups.export(),
|
||||
function(data) {
|
||||
console.log(data);
|
||||
|
@ -455,6 +453,7 @@ logged_menu=function() {
|
|||
}
|
||||
|
||||
logged_out_menu=function() {
|
||||
user=false;
|
||||
$('#user-name').html('Connexion');
|
||||
$('#user-menu li').remove();
|
||||
menu=$('#user-menu');
|
||||
|
|
Loading…
Reference in a new issue