2016-03-04 04:45:05 -05:00
|
|
|
collapsed = 'page-sidebar-collapsed'
|
|
|
|
expanded = 'page-sidebar-expanded'
|
2015-02-03 16:11:33 -05:00
|
|
|
|
2016-03-04 04:45:05 -05:00
|
|
|
toggleSidebar = ->
|
2015-02-03 20:13:06 -05:00
|
|
|
$('.page-with-sidebar').toggleClass("#{collapsed} #{expanded}")
|
2015-04-22 09:48:39 -04:00
|
|
|
$('header').toggleClass("header-collapsed header-expanded")
|
2016-04-07 17:20:16 -04:00
|
|
|
$('.toggle-nav-collapse i').toggleClass("fa-angle-right fa-angle-left")
|
2015-02-03 20:13:06 -05:00
|
|
|
$.cookie("collapsed_nav", $('.page-with-sidebar').hasClass(collapsed), { path: '/' })
|
2016-02-16 17:04:01 -05:00
|
|
|
|
|
|
|
setTimeout ( ->
|
|
|
|
niceScrollBars = $('.nicescroll').niceScroll();
|
|
|
|
niceScrollBars.updateScrollBar();
|
|
|
|
), 300
|
|
|
|
|
2016-05-09 19:53:25 -04:00
|
|
|
$(document).on("click", '.toggle-nav-collapse, .side-nav-toggle', (e) ->
|
2016-03-04 04:45:05 -05:00
|
|
|
e.preventDefault()
|
|
|
|
|
|
|
|
toggleSidebar()
|
2015-01-30 14:23:35 -05:00
|
|
|
)
|
2016-03-04 04:45:05 -05:00
|
|
|
|
2016-03-10 12:04:45 -05:00
|
|
|
$ ->
|
2016-03-14 07:51:07 -04:00
|
|
|
size = bp.getBreakpointSize()
|
2016-03-11 10:11:11 -05:00
|
|
|
|
|
|
|
if size is "xs" or size is "sm"
|
2016-03-04 04:45:05 -05:00
|
|
|
if $('.page-with-sidebar').hasClass(expanded)
|
|
|
|
toggleSidebar()
|