Commit 8c8ab46e authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minor tweaks.

parent ad31cfd4
...@@ -68,7 +68,7 @@ function ($, sup) ...@@ -68,7 +68,7 @@ function ($, sup)
} }
} }
else if (pageType == 'manage_profile') { else if (pageType == 'manage_profile') {
if (0) { if (1) {
try { try {
$('#rspecfile').change(function() { $('#rspecfile').change(function() {
var reader = new FileReader(); var reader = new FileReader();
...@@ -94,8 +94,6 @@ function ($, sup) ...@@ -94,8 +94,6 @@ function ($, sup)
$('#quickvm_topomodal').on('hidden.bs.modal', function() { $('#quickvm_topomodal').on('hidden.bs.modal', function() {
sup.ShowProfileList($('.current')) sup.ShowProfileList($('.current'))
}); });
sup.InitProfileSelector();
initIndexButtons(); initIndexButtons();
} }
......
...@@ -237,21 +237,6 @@ function ShowProfile(direction) ...@@ -237,21 +237,6 @@ function ShowProfile(direction)
$xmlthing.done(callback); $xmlthing.done(callback);
} }
function InitProfileSelector()
{
$('#scrollleft').click(function () {
ShowProfile(-1);
});
$('#scrollright').click(function () {
ShowProfile(1);
});
$('#showtopo_select').click(function () {
HideModal("#quickvm_topomodal");
profile = $("#profile_name :nth("+ ShowProfile.index + ")").val();
$('#profile_name').val(profile);
});
}
function Setsshurl(uuid) function Setsshurl(uuid)
{ {
var callback = function(json) { var callback = function(json) {
...@@ -989,7 +974,6 @@ function Logout() ...@@ -989,7 +974,6 @@ function Logout()
// Exports from this module for use elsewhere // Exports from this module for use elsewhere
return { return {
Extend: Extend, Extend: Extend,
InitProfileSelector: InitProfileSelector,
InitQuickVM: InitQuickVM, InitQuickVM: InitQuickVM,
RegisterAccount: RegisterAccount, RegisterAccount: RegisterAccount,
RequestExtension: RequestExtension, RequestExtension: RequestExtension,
......
...@@ -216,11 +216,7 @@ if (!$this_user) { ...@@ -216,11 +216,7 @@ if (!$this_user) {
if (isset($formfields)) { if (isset($formfields)) {
$_SESSION["formfields"] = $formfields; $_SESSION["formfields"] = $formfields;
} }
# HTTP_REFERER will not work reliably when redirecting so RedirectLoginPage();
# pass in the URI for this page as an argument
header("Location: login.php?referrer=".
urlencode($_SERVER['REQUEST_URI']));
# Use exit because of the session.
exit(); exit();
} }
......
...@@ -341,4 +341,15 @@ function RedirectSecure() ...@@ -341,4 +341,15 @@ function RedirectSecure()
} }
} }
#
# Redirect to the login page()
#
function RedirectLoginPage()
{
# HTTP_REFERER will not work reliably when redirecting so
# pass in the URI for this page as an argument
header("Location: login.php?referrer=".
urlencode($_SERVER['REQUEST_URI']));
}
?> ?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment