Commit 8c8ab46e authored by Leigh Stoller's avatar Leigh Stoller

Minor tweaks.

parent ad31cfd4
......@@ -68,7 +68,7 @@ function ($, sup)
}
}
else if (pageType == 'manage_profile') {
if (0) {
if (1) {
try {
$('#rspecfile').change(function() {
var reader = new FileReader();
......@@ -94,8 +94,6 @@ function ($, sup)
$('#quickvm_topomodal').on('hidden.bs.modal', function() {
sup.ShowProfileList($('.current'))
});
sup.InitProfileSelector();
initIndexButtons();
}
......
......@@ -237,21 +237,6 @@ function ShowProfile(direction)
$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)
{
var callback = function(json) {
......@@ -989,7 +974,6 @@ function Logout()
// Exports from this module for use elsewhere
return {
Extend: Extend,
InitProfileSelector: InitProfileSelector,
InitQuickVM: InitQuickVM,
RegisterAccount: RegisterAccount,
RequestExtension: RequestExtension,
......
......@@ -216,11 +216,7 @@ if (!$this_user) {
if (isset($formfields)) {
$_SESSION["formfields"] = $formfields;
}
# 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']));
# Use exit because of the session.
RedirectLoginPage();
exit();
}
......
......@@ -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']));
}
?>
Markdown is supported
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