From 125f1c19b818c30a351d9d5d2f1a10085ccae4e8 Mon Sep 17 00:00:00 2001 From: alexhigh Date: Tue, 5 Aug 2014 13:16:54 +0000 Subject: [PATCH] 2014-08-05 Alejandro Gallardo * general/main_menu.php: Improved the submenus state persistence functionality. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10383 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/general/main_menu.php | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 6abc15812a..67824319e7 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2014-08-05 Alejandro Gallardo + + * general/main_menu.php: Improved the submenus state + persistence functionality. + 2014-08-05 Alejandro Gallardo * general/main_menu.php: Fixed the menu position when diff --git a/pandora_console/general/main_menu.php b/pandora_console/general/main_menu.php index 2fffaec35c..8e0d612b26 100644 --- a/pandora_console/general/main_menu.php +++ b/pandora_console/general/main_menu.php @@ -64,8 +64,11 @@ ui_require_jquery_file ('cookie'); var autohidden_menu = ; var fixed_menu = ; var fixed_header = ; +var id_user = ""; +var cookie_name = id_user + '-pandora_menu_state'; +var cookie_name_encoded = btoa(cookie_name); -var menuState = $.cookie(btoa('pandora_menu_state')); +var menuState = $.cookie(cookie_name_encoded); if (!menuState) { menuState = {}; } @@ -112,7 +115,7 @@ $(document).ready( function() { menuState[menuItem.attr('id')] = 1; } - $.cookie(btoa('pandora_menu_state'), JSON.stringify(menuState), {expires: 7}); + $.cookie(cookie_name_encoded, JSON.stringify(menuState), {expires: 7}); }); if (fixed_menu) {