mirror of
https://github.com/jonom/silverstripe-betternavigator.git
synced 2024-10-22 14:05:51 +02:00
Fixed cookie path for menu state
Was saving separate collapsed/open menu state for each directory
This commit is contained in:
parent
519555838f
commit
8fedcf0c21
@ -25,7 +25,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||||||
BetterNavigatorStatus.onclick=function(){
|
BetterNavigatorStatus.onclick=function(){
|
||||||
BetterNavigator.className = BetterNavigator.className === 'collapsed' ? 'open' : 'collapsed';
|
BetterNavigator.className = BetterNavigator.className === 'collapsed' ? 'open' : 'collapsed';
|
||||||
//Set cookie to remember state
|
//Set cookie to remember state
|
||||||
document.cookie="BetterNavigator=" + BetterNavigator.className;
|
document.cookie="BetterNavigator=" + BetterNavigator.className + ";path=/";
|
||||||
};
|
};
|
||||||
|
|
||||||
//Restore menu state
|
//Restore menu state
|
||||||
|
Loading…
Reference in New Issue
Block a user