Merge branch 'pin-nav-cookie-expiry' into 'master'
Expiry date on pinned nav cookie ## What does this MR do? Adds an expiry date far into the future for the pinned nav cookie so that it survives logout & browser closing. See merge request !5009
This commit is contained in:
commit
73196fbd65
1 changed files with 2 additions and 2 deletions
|
@ -270,7 +270,7 @@ $ ->
|
|||
|
||||
# Sidenav pinning
|
||||
if $window.width() < 1280 and $.cookie('pin_nav') is 'true'
|
||||
$.cookie('pin_nav', 'false', { path: '/' })
|
||||
$.cookie('pin_nav', 'false', { path: '/', expires: 365 * 10 })
|
||||
$('.page-with-sidebar')
|
||||
.toggleClass('page-sidebar-collapsed page-sidebar-expanded')
|
||||
.removeClass('page-sidebar-pinned')
|
||||
|
@ -301,7 +301,7 @@ $ ->
|
|||
.toggleClass('header-collapsed header-expanded')
|
||||
|
||||
# Save settings
|
||||
$.cookie 'pin_nav', doPinNav, { path: '/' }
|
||||
$.cookie 'pin_nav', doPinNav, { path: '/', expires: 365 * 10 }
|
||||
|
||||
if $.cookie('pin_nav') is 'true' or doPinNav
|
||||
tooltipText = 'Unpin navigation'
|
||||
|
|
Loading…
Reference in a new issue