diff options
author | Phil Hughes <me@iamphill.com> | 2017-07-24 14:36:31 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-07-24 14:36:31 +0100 |
commit | 4d2be5bbec25d60a8d478bda5bc83159f2c845b1 (patch) | |
tree | c3c28a833ccd2a6628d928acee44e62ccfcc6fd8 /app/assets/javascripts/layout_nav.js | |
parent | 1a2d180e3dfd8bdad94766a2e8b1195288c2b146 (diff) | |
parent | d4c4dec80dc3abd39116440a3c291c19b27258e1 (diff) | |
download | gitlab-ce-4d2be5bbec25d60a8d478bda5bc83159f2c845b1.tar.gz |
Merge branch 'master' into sidebar-fly-out-sub-nav
Diffstat (limited to 'app/assets/javascripts/layout_nav.js')
-rw-r--r-- | app/assets/javascripts/layout_nav.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/assets/javascripts/layout_nav.js b/app/assets/javascripts/layout_nav.js index e0363e091a7..5c1ba416a03 100644 --- a/app/assets/javascripts/layout_nav.js +++ b/app/assets/javascripts/layout_nav.js @@ -1,6 +1,7 @@ /* 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 Cookies from 'js-cookie'; import _ from 'underscore'; +import Cookies from 'js-cookie'; +import NewNavSidebar from './new_sidebar'; import initFlyOutNav from './fly_out_nav'; (function() { @@ -55,10 +56,13 @@ import initFlyOutNav from './fly_out_nav'; } $(() => { - $(window).on('scroll', _.throttle(applyScrollNavClass, 100)); - if (Cookies.get('new_nav') === 'true') { + const newNavSidebar = new NewNavSidebar(); + newNavSidebar.bindEvents(); + initFlyOutNav(); } + + $(window).on('scroll', _.throttle(applyScrollNavClass, 100)); }); }).call(window); |