Commit 10a17ade authored by Jacob Schatz's avatar Jacob Schatz Committed by Robert Speicher

Merge branch 'pin-nav-cookie-expiry' into 'master'

Expiry date on pinned nav cookie

Adds an expiry date far into the future for the pinned nav cookie so that it survives logout & browser closing.

See merge request !5009
(cherry picked from commit 73196fbd)
parent e2692686
......@@ -11,6 +11,7 @@ v 8.9.4
- Do not show build retry link when build is active. !4967
- Fix restore Rake task warning message output. !4980
- Handle external issues in IssueReferenceFilter. !4988
- Expiry date on pinned nav cookie. !5009
v 8.9.3
- Fix encrypted data backwards compatibility after upgrading attr_encrypted gem. !4963
......
......@@ -256,7 +256,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')
......@@ -287,7 +287,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'
......
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