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:
Jacob Schatz 2016-06-30 14:39:07 +00:00
commit 73196fbd65

View file

@ -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 @@ $ ->
.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'