mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-05 07:00:36 +08:00
17 lines
383 B
CoffeeScript
17 lines
383 B
CoffeeScript
$ ->
|
|
$.ajaxSetup
|
|
contentType: 'application/json; charset=UTF-8'
|
|
|
|
$('nav a').each ->
|
|
if $(@).attr('href') == location.pathname
|
|
$(@).parent().addClass('active')
|
|
|
|
if window.location.hash == '#redirect'
|
|
$('#site-not-exist').modal 'show'
|
|
|
|
$('#logout').click (e) ->
|
|
e.preventDefault()
|
|
$.post '/account/logout/', {}
|
|
.success ->
|
|
location.reload()
|