Remember sidebar toggle-state
While browsing a wiki, it would be nice if it would remember whether the content is wide or not. SPR-883
This commit is contained in:
parent
b8a4cc913e
commit
fdf5eaea74
1 changed files with 6 additions and 1 deletions
|
@ -12,6 +12,7 @@ jQuery(function () {
|
||||||
$nav.find('div.nav-panel').hide(); // close all panels
|
$nav.find('div.nav-panel').hide(); // close all panels
|
||||||
jQuery('body').addClass('wide-content');
|
jQuery('body').addClass('wide-content');
|
||||||
removeToggleStorage();
|
removeToggleStorage();
|
||||||
|
sessionStorage.setItem('wide-content', true);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,7 +33,7 @@ jQuery(function () {
|
||||||
*/
|
*/
|
||||||
setDefaultContent = function () {
|
setDefaultContent = function () {
|
||||||
jQuery('body').removeClass('wide-content');
|
jQuery('body').removeClass('wide-content');
|
||||||
|
sessionStorage.setItem('wide-content', false);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -166,6 +167,10 @@ jQuery(function () {
|
||||||
setWideContent();
|
setWideContent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (sessionStorage.getItem('wide-content') === 'true') {
|
||||||
|
setWideContent();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue