summaryrefslogtreecommitdiff
path: root/users/app/assets
diff options
context:
space:
mode:
Diffstat (limited to 'users/app/assets')
-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