]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/login.js
Controllers + a few tests + new notification added. Work pending on the notification...
[rails.git] / app / assets / javascripts / login.js
index 755c3bf657164658e8e5603a853cabcec6e2bb34..b7a540f6e12426a8de4477e875c3eed33dcafa24 100644 (file)
@@ -4,6 +4,13 @@ $(document).ready(function() {
     $("#referer").val($("#referer").val() + window.location.hash);
   }
 
+  // Attach referer to authentication buttons
+  $(".auth_button").each(function () {
+    var params = querystring.parse(this.search.substring(1));
+    params.referer = $("#referer").val();
+    this.search = querystring.stringify(params);
+  });
+
   // Add click handler to show OpenID field
   $("#openid_open_url").click(function() {
     $("#openid_url").val("http://");