diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-06-20 17:32:29 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-06-20 18:52:23 +0300 |
commit | 4d8e96152d866ecb70b7931bfb682b2c7a6217b1 (patch) | |
tree | 6a5339900f3e22eea77dff8e715c899a38e6d995 /app/assets | |
parent | e18a9d44291dfb5b57f51c9989f095db5ec165b5 (diff) |
Merge branch 'pinned-nav-cookie-path' into 'master'
Set path for pinned nav cookie
## What does this MR do?
Sets a path for the pinned nav cookie so it will be present across page reload.
Closes #18836
See merge request !4784
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/application.js.coffee | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 2f9f6c3ef5b..4529c514555 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -257,7 +257,7 @@ $ -> # Sidenav pinning if $(window).width() < 1440 and $.cookie('pin_nav') is 'true' - $.cookie('pin_nav', 'false') + $.cookie('pin_nav', 'false', { path: '/' }) $('.page-with-sidebar') .toggleClass('page-sidebar-collapsed page-sidebar-expanded') .removeClass('page-sidebar-pinned') @@ -271,7 +271,7 @@ $ -> $(this).toggleClass 'is-active' if $.cookie('pin_nav') is 'true' - $.cookie 'pin_nav', 'false' + $.cookie 'pin_nav', 'false', { path: '/' } $('.page-with-sidebar') .removeClass('page-sidebar-pinned') .toggleClass('page-sidebar-collapsed page-sidebar-expanded') @@ -279,6 +279,6 @@ $ -> .removeClass('header-pinned-nav') .toggleClass('header-collapsed header-expanded') else - $.cookie 'pin_nav', 'true' + $.cookie 'pin_nav', 'true', { path: '/' } $('.page-with-sidebar').addClass('page-sidebar-pinned') $('.navbar-fixed-top').addClass('header-pinned-nav') |