From: Art Cancro Date: Wed, 5 Jan 2011 21:18:18 +0000 (-0500) Subject: push/pop destination_url instead of passing it through the chain X-Git-Tag: v8.11~928 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=8d5bb0b7d801a9fe8a237da3d4ad231c602f9746 push/pop destination_url instead of passing it through the chain --- diff --git a/webcit/static/authmethods.js b/webcit/static/authmethods.js index 1fc45a03c..67018a7c2 100644 --- a/webcit/static/authmethods.js +++ b/webcit/static/authmethods.js @@ -31,14 +31,16 @@ function GetLoggedInFirst(destination_url) { return; } + p = 'push?url=' + destination_url; + new Ajax.Request(p, { method: 'get' } ); + /* If not logged in, go modal and ask the user to log in first. */ - p = 'do_template?template=get_logged_in?destination_url=' + destination_url; new Ajax.Updater( 'md-content', - p, + 'do_template?template=get_logged_in', { method: 'get', - onSuccess: function(cl_success) { + onSuccess: function() { toggleModal(1); } } @@ -49,13 +51,13 @@ function GetLoggedInFirst(destination_url) { /* * Attempt login with username/password, called from modal dialog */ -function ajax_try_username_and_password(destination_url) { +function ajax_try_username_and_password() { $('login_errmsg').innerHTML = ""; $('ajax_username_password_form').request({ onSuccess: function(ctdlresult) { if (ctdlresult.responseText.substr(0,1) == '2') { - window.location = decodeURIComponent(destination_url); + window.location = 'pop'; } else { $('login_errmsg').innerHTML = ctdlresult.responseText.substr(4) ; diff --git a/webcit/static/t/get_logged_in.html b/webcit/static/t/get_logged_in.html index 0b24ef3be..de071c3f1 100644 --- a/webcit/static/t/get_logged_in.html +++ b/webcit/static/t/get_logged_in.html @@ -45,7 +45,7 @@ FIXME login to continue

-
');">
+