From 58af2647dc6a5bd7805e703a32fe45190d62c7d3 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Fri, 20 Oct 2017 16:14:55 -0700 Subject: [PATCH] Rename new_sidebar in JS --- .../javascripts/{new_sidebar.js => contextual_sidebar.js} | 4 ++-- app/assets/javascripts/layout_nav.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename app/assets/javascripts/{new_sidebar.js => contextual_sidebar.js} (96%) diff --git a/app/assets/javascripts/new_sidebar.js b/app/assets/javascripts/contextual_sidebar.js similarity index 96% rename from app/assets/javascripts/new_sidebar.js rename to app/assets/javascripts/contextual_sidebar.js index 997550b37fb..46b68ebe158 100644 --- a/app/assets/javascripts/new_sidebar.js +++ b/app/assets/javascripts/contextual_sidebar.js @@ -2,7 +2,7 @@ import Cookies from 'js-cookie'; import _ from 'underscore'; import bp from './breakpoints'; -export default class NewNavSidebar { +export default class ContextualSidebar { constructor() { this.initDomElements(); this.render(); @@ -55,7 +55,7 @@ export default class NewNavSidebar { this.$sidebar.toggleClass('sidebar-icons-only', collapsed); this.$page.toggleClass('page-with-icon-sidebar', breakpoint === 'sm' ? true : collapsed); } - NewNavSidebar.setCollapsedCookie(collapsed); + ContextualSidebar.setCollapsedCookie(collapsed); this.toggleSidebarOverflow(); } diff --git a/app/assets/javascripts/layout_nav.js b/app/assets/javascripts/layout_nav.js index d064a2c0024..a6f82b247e2 100644 --- a/app/assets/javascripts/layout_nav.js +++ b/app/assets/javascripts/layout_nav.js @@ -1,7 +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 _ from 'underscore'; import Cookies from 'js-cookie'; -import NewNavSidebar from './new_sidebar'; +import ContextualSidebar from './contextual_sidebar'; import initFlyOutNav from './fly_out_nav'; (function() { @@ -51,8 +51,8 @@ import initFlyOutNav from './fly_out_nav'; }); $(() => { - const newNavSidebar = new NewNavSidebar(); - newNavSidebar.bindEvents(); + const contextualSidebar = new ContextualSidebar(); + contextualSidebar.bindEvents(); initFlyOutNav(); });