Skip to content

Commit

Permalink
Passing current location to login page. Addresses #560
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsielicki committed Jan 21, 2016
1 parent c12b3f0 commit 1ab6a6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions web-server/js/slycat-navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,10 @@ define("slycat-navbar", ["slycat-server-root", "slycat-web-client", "slycat-chan
component.sign_out = function()
{
client.sign_out({
success: function(){
window.location.href = "/login/slycat-login.html";
success: function(){
window.location.href = "/login/slycat-login.html?from=" + window.location.href;
},
error: function(){
error: function(){
window.alert("Sorry, something went wrong and you are not signed out.");
}
})
Expand Down
4 changes: 3 additions & 1 deletion web-server/slycat-login/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ require(["jquery", "URI"], function($, URI)
var sendInfo = JSON.stringify(
{
"user_name": user_name,
"password": password
"password": password,
"location": window.location,
}
);

Expand All @@ -23,6 +24,7 @@ require(["jquery", "URI"], function($, URI)
{
console.log("success " + result);
window.location.replace("/");
//window.location.replace(result.target);
},
error: function(request, status, reason_phrase)
{
Expand Down

0 comments on commit 1ab6a6c

Please sign in to comment.