Commit 58af2647 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Rename new_sidebar in JS

parent 33380f81
...@@ -2,7 +2,7 @@ import Cookies from 'js-cookie'; ...@@ -2,7 +2,7 @@ import Cookies from 'js-cookie';
import _ from 'underscore'; import _ from 'underscore';
import bp from './breakpoints'; import bp from './breakpoints';
export default class NewNavSidebar { export default class ContextualSidebar {
constructor() { constructor() {
this.initDomElements(); this.initDomElements();
this.render(); this.render();
...@@ -55,7 +55,7 @@ export default class NewNavSidebar { ...@@ -55,7 +55,7 @@ export default class NewNavSidebar {
this.$sidebar.toggleClass('sidebar-icons-only', collapsed); this.$sidebar.toggleClass('sidebar-icons-only', collapsed);
this.$page.toggleClass('page-with-icon-sidebar', breakpoint === 'sm' ? true : collapsed); this.$page.toggleClass('page-with-icon-sidebar', breakpoint === 'sm' ? true : collapsed);
} }
NewNavSidebar.setCollapsedCookie(collapsed); ContextualSidebar.setCollapsedCookie(collapsed);
this.toggleSidebarOverflow(); this.toggleSidebarOverflow();
} }
......
/* 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 */ /* 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 _ from 'underscore';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import NewNavSidebar from './new_sidebar'; import ContextualSidebar from './contextual_sidebar';
import initFlyOutNav from './fly_out_nav'; import initFlyOutNav from './fly_out_nav';
(function() { (function() {
...@@ -51,8 +51,8 @@ import initFlyOutNav from './fly_out_nav'; ...@@ -51,8 +51,8 @@ import initFlyOutNav from './fly_out_nav';
}); });
$(() => { $(() => {
const newNavSidebar = new NewNavSidebar(); const contextualSidebar = new ContextualSidebar();
newNavSidebar.bindEvents(); contextualSidebar.bindEvents();
initFlyOutNav(); initFlyOutNav();
}); });
......
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