debian-mirror-gitlab/app/assets/javascripts/sidebar.js.coffee

11 lines
445 B
CoffeeScript
Raw Normal View History

2015-04-26 12:48:37 +05:30
$(document).on("click", '.toggle-nav-collapse', (e) ->
e.preventDefault()
collapsed = 'page-sidebar-collapsed'
expanded = 'page-sidebar-expanded'
$('.page-with-sidebar').toggleClass("#{collapsed} #{expanded}")
2015-09-11 14:41:01 +05:30
$('header').toggleClass("header-collapsed header-expanded")
2015-04-26 12:48:37 +05:30
$('.toggle-nav-collapse i').toggleClass("fa-angle-right fa-angle-left")
$.cookie("collapsed_nav", $('.page-with-sidebar').hasClass(collapsed), { path: '/' })
)