Files
RootPanel/core/static/script/layout.coffee
2014-07-26 02:41:05 +08:00

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 = '/'