Commit 73196fbd authored by Jacob Schatz's avatar Jacob Schatz

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
parents 99e5ae10 bf970141
...@@ -270,7 +270,7 @@ $ -> ...@@ -270,7 +270,7 @@ $ ->
# Sidenav pinning # Sidenav pinning
if $window.width() < 1280 and $.cookie('pin_nav') is 'true' 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') $('.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')
...@@ -301,7 +301,7 @@ $ -> ...@@ -301,7 +301,7 @@ $ ->
.toggleClass('header-collapsed header-expanded') .toggleClass('header-collapsed header-expanded')
# Save settings # Save settings
$.cookie 'pin_nav', doPinNav, { path: '/' } $.cookie 'pin_nav', doPinNav, { path: '/', expires: 365 * 10 }
if $.cookie('pin_nav') is 'true' or doPinNav if $.cookie('pin_nav') is 'true' or doPinNav
tooltipText = 'Unpin navigation' tooltipText = 'Unpin navigation'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment