Merge branch 'pinned-nav-cookie-path' into 'master'
Set path for pinned nav cookie ## What does this MR do? Sets a path for the pinned nav cookie so it will be present across page reload. Closes #18836 See merge request !4784
This commit is contained in:
commit
699badabc9
1 changed files with 3 additions and 3 deletions
|
@ -257,7 +257,7 @@ $ ->
|
||||||
|
|
||||||
# Sidenav pinning
|
# Sidenav pinning
|
||||||
if $(window).width() < 1440 and $.cookie('pin_nav') is 'true'
|
if $(window).width() < 1440 and $.cookie('pin_nav') is 'true'
|
||||||
$.cookie('pin_nav', 'false')
|
$.cookie('pin_nav', 'false', { path: '/' })
|
||||||
$('.page-with-sidebar')
|
$('.page-with-sidebar')
|
||||||
.toggleClass('page-sidebar-collapsed page-sidebar-expanded')
|
.toggleClass('page-sidebar-collapsed page-sidebar-expanded')
|
||||||
.removeClass('page-sidebar-pinned')
|
.removeClass('page-sidebar-pinned')
|
||||||
|
@ -271,7 +271,7 @@ $ ->
|
||||||
$(this).toggleClass 'is-active'
|
$(this).toggleClass 'is-active'
|
||||||
|
|
||||||
if $.cookie('pin_nav') is 'true'
|
if $.cookie('pin_nav') is 'true'
|
||||||
$.cookie 'pin_nav', 'false'
|
$.cookie 'pin_nav', 'false', { path: '/' }
|
||||||
$('.page-with-sidebar')
|
$('.page-with-sidebar')
|
||||||
.removeClass('page-sidebar-pinned')
|
.removeClass('page-sidebar-pinned')
|
||||||
.toggleClass('page-sidebar-collapsed page-sidebar-expanded')
|
.toggleClass('page-sidebar-collapsed page-sidebar-expanded')
|
||||||
|
@ -279,6 +279,6 @@ $ ->
|
||||||
.removeClass('header-pinned-nav')
|
.removeClass('header-pinned-nav')
|
||||||
.toggleClass('header-collapsed header-expanded')
|
.toggleClass('header-collapsed header-expanded')
|
||||||
else
|
else
|
||||||
$.cookie 'pin_nav', 'true'
|
$.cookie 'pin_nav', 'true', { path: '/' }
|
||||||
$('.page-with-sidebar').addClass('page-sidebar-pinned')
|
$('.page-with-sidebar').addClass('page-sidebar-pinned')
|
||||||
$('.navbar-fixed-top').addClass('header-pinned-nav')
|
$('.navbar-fixed-top').addClass('header-pinned-nav')
|
||||||
|
|
Loading…
Reference in a new issue