2014-08-05 Alejandro Gallardo <alejandro.gallardo@artica.es>

* 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
This commit is contained in:
alexhigh 2014-08-05 13:16:54 +00:00
parent c03ac82eee
commit 0fcefffea1
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2014-08-05 Alejandro Gallardo <alejandro.gallardo@artica.es>
* general/main_menu.php: Improved the submenus state
persistence functionality.
2014-08-05 Alejandro Gallardo <alejandro.gallardo@artica.es>
* general/main_menu.php: Fixed the menu position when

View File

@ -64,8 +64,11 @@ ui_require_jquery_file ('cookie');
var autohidden_menu = <?php echo $autohidden_menu; ?>;
var fixed_menu = <?php echo json_encode((bool)$config['fixed_menu']); ?>;
var fixed_header = <?php echo json_encode((bool)$config['fixed_header']); ?>;
var id_user = "<?php echo $config['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) {