mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-01 22:18:54 +08:00
15 lines
317 B
CoffeeScript
15 lines
317 B
CoffeeScript
$ ->
|
|
$.ajaxSetup {
|
|
contentType: 'application/json; charset=UTF-8'
|
|
}
|
|
|
|
$('nav a').each ->
|
|
if $(@).attr('href') == location.pathname
|
|
$(@).parent().addClass('active')
|
|
|
|
$('#logout').on 'click', (e) ->
|
|
e.preventDefault()
|
|
$.post '/account/logout/', {}
|
|
.success ->
|
|
location.href = '/'
|