BigW Consortium Gitlab

sidebar.js.coffee 519 Bytes
Newer Older
1 2
$(document).on("click", '.toggle-nav-collapse', (e) ->
  e.preventDefault()
3 4 5
  collapsed = 'page-sidebar-collapsed'
  expanded = 'page-sidebar-expanded'

6
  $('.page-with-sidebar').toggleClass("#{collapsed} #{expanded}")
7
  $('header').toggleClass("header-collapsed header-expanded")
8
  $('.sidebar-wrapper').toggleClass("sidebar-collapsed sidebar-expanded")
9 10
  $('.toggle-nav-collapse i').toggleClass("fa-angle-right fa-angle-left")
  $.cookie("collapsed_nav", $('.page-with-sidebar').hasClass(collapsed), { path: '/' })
11
)