diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-06-30 17:39:07 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-06-30 22:29:23 +0300 |
commit | 10a17adea7e35d725f27bc79d14d6a76392a6dd3 (patch) | |
tree | 313a649e1b939023a81717ece3685c34d8ce06e4 | |
parent | e2692686b861d43dafafcde0b81368e7f6420b7f (diff) |
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 73196fbd65f414c051ece96bad7fb7042d3cf5b1)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/assets/javascripts/application.js.coffee | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG index e8437c696c5..8bf84aa095b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index b1504c06e21..e86c66cfe5a 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -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' |