Do not show sidebar/collapsables by default
This commit is contained in:
parent
96439d1384
commit
fe55f5f2cc
1 changed files with 4 additions and 5 deletions
|
|
@ -318,23 +318,22 @@
|
|||
|
||||
var onHide = function() {
|
||||
if (this.id && BR.Util.localStorageAvailable()) {
|
||||
localStorage[this.id] = 'true';
|
||||
localStorage.removeItem(this.id);
|
||||
}
|
||||
};
|
||||
var onShow = function() {
|
||||
if (this.id && BR.Util.localStorageAvailable()) {
|
||||
localStorage.removeItem(this.id);
|
||||
localStorage[this.id] = 'true';
|
||||
}
|
||||
};
|
||||
// on page load, we want to restore collapsible elements from previous usage
|
||||
$('.collapse').on('hidden.bs.collapse', onHide)
|
||||
.on('shown.bs.collapse', onShow)
|
||||
.each(function() {
|
||||
if (!(this.id && BR.Util.localStorageAvailable() && localStorage[this.id] === 'true' )) {
|
||||
$(this).collapse('hide');
|
||||
if (this.id && BR.Util.localStorageAvailable() && localStorage[this.id] === 'true') {
|
||||
$(this).collapse('show');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
mapContext = BR.Map.initMap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue