diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-07-19 20:26:18 -0500 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2017-07-19 23:25:53 -0500 |
commit | b711e10093f303c2d35aa3ebe9aff1c30c74ae7c (patch) | |
tree | 028e047c10463516ea69de41006a5e9b9e246a86 /app/assets/javascripts/layout_nav.js | |
parent | 49ee81ca12e46a703e999632efcb9f2a5627c930 (diff) | |
download | gitlab-ce-b711e10093f303c2d35aa3ebe9aff1c30c74ae7c.tar.gz |
Fix JS; make buttons sr accessibile; fix overlay
Diffstat (limited to 'app/assets/javascripts/layout_nav.js')
-rw-r--r-- | app/assets/javascripts/layout_nav.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/layout_nav.js b/app/assets/javascripts/layout_nav.js index 1a24c7a6433..6186ffe20b3 100644 --- a/app/assets/javascripts/layout_nav.js +++ b/app/assets/javascripts/layout_nav.js @@ -1,5 +1,6 @@ /* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, no-unused-vars, one-var, one-var-declaration-per-line, vars-on-top, max-len */ import _ from 'underscore'; +import Cookies from 'js-cookie'; import NewNavSidebar from './new_sidebar'; (function() { @@ -54,8 +55,11 @@ import NewNavSidebar from './new_sidebar'; } $(() => { - var newNavSidebar = new NewNavSidebar(); - newNavSidebar.bindEvents(); + if (Cookies.get('new_nav') === 'true') { + const newNavSidebar = new NewNavSidebar(); + newNavSidebar.bindEvents(); + } + $(window).on('scroll', _.throttle(applyScrollNavClass, 100)); }); }).call(window); |