summaryrefslogtreecommitdiff
path: root/users/app/assets/javascripts/users.js.coffee
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-12-17 19:03:45 +0100
committerAzul <azul@leap.se>2012-12-17 19:03:45 +0100
commitbe2d8fbd65f4ed2e1e97b19a3322da20e2fb4eda (patch)
treee4443e2dfcc90529d4cbf72303eacdc580fc5b72 /users/app/assets/javascripts/users.js.coffee
parentb90ce01890907d1c7f46f46bafcef416570a4c4b (diff)
activate email tab after changing email settings
Diffstat (limited to 'users/app/assets/javascripts/users.js.coffee')
-rw-r--r--users/app/assets/javascripts/users.js.coffee8
1 files changed, 8 insertions, 0 deletions
diff --git a/users/app/assets/javascripts/users.js.coffee b/users/app/assets/javascripts/users.js.coffee
index 0c1fb55..86bacee 100644
--- a/users/app/assets/javascripts/users.js.coffee
+++ b/users/app/assets/javascripts/users.js.coffee
@@ -24,7 +24,15 @@ srp.error = (message) ->
pollUsers = (query, process) ->
$.get( "/users.json", query: query).done(process)
+followLocationHash = ->
+ location = window.location.hash
+ if location
+ href_select = 'a[href="' + location + '"]'
+ link = $(href_select)
+ link.tab('show') if link
+
$(document).ready ->
+ followLocationHash()
$('#new_user').submit preventDefault
$('#new_user').submit srp.signup
$('#new_session').submit preventDefault