Commit c227a8f7 authored by Leigh Stoller's avatar Leigh Stoller

More UI tweaks.

parent 23659098
......@@ -465,9 +465,17 @@ TBGroupUnixInfo($pid, $gid, $unix_gid, $unix_name);
# Okay, we can spit back a header now that there is no worry of redirect.
PAGEHEADER("Create an Experiment Template");
echo "<b>Starting template creation!</b> ... ";
echo "this will take a few moments; please be patient.";
echo "<script type='text/javascript' language='javascript' ".
" src='template_sup.js'>\n";
echo "</script>\n";
echo "<center>\n";
echo "<b>Starting template creation!</b> ...<br>\n";
echo "This will take a few moments; please be patient.<br>\n";
echo "<br><br>\n";
echo "<img id='busy' src='busy.gif'><span id='loading'> Working ...</span>";
echo "<br><br>\n";
echo "</center>\n";
flush();
# And run that script!
......@@ -480,6 +488,11 @@ if ($deletensfile) {
unlink($thensfile);
}
/* Clear the various 'loading' indicators. */
echo "<script type='text/javascript' language='javascript'>\n";
echo "ClearLoadingIndicators();\n";
echo "</script>\n";
#
# Fatal Error. Report to the user, even though there is not much he can
# do with the error. Also reports to tbops.
......@@ -494,10 +507,20 @@ if ($retval) {
return;
}
unset($guid);
if (TBPidTid2Template($pid, $tid, $guid, $version)) {
echo "<script type='text/javascript' language='javascript'>\n";
echo "PageReplace('template_show.php?guid=$guid&version=$version');\n";
echo "</script>\n";
}
#
# In case the above fails.
#
echo "Done!";
echo "<br><br>\n";
if (TBPidTid2Template($pid, $tid, $guid, $version)) {
if (isset($guid)) {
SHOWTEMPLATE($guid, $version);
}
......
......@@ -227,6 +227,10 @@ if (count($errors)) {
exit(1);
}
echo "<script type='text/javascript' language='javascript' ".
" src='template_sup.js'>\n";
echo "</script>\n";
#
# Generate a unique and hard to guess filename, and write NS to it.
#
......@@ -242,9 +246,13 @@ chmod($nsfile, 0666);
# Need this for running scripts.
TBGroupUnixInfo($pid, $gid, $unix_gid, $unix_name);
echo "<b>Starting template modification!</b> ... ";
echo "this will take a few moments; please be patient.";
echo "<center>\n";
echo "<b>Starting template modification!</b> ...<br>\n";
echo "This will take a few moments; please be patient.<br>\n";
echo "<br><br>\n";
echo "<img id='busy' src='busy.gif'><span id='loading'> Working ...</span>";
echo "<br><br>\n";
echo "</center>\n";
flush();
# And run that script!
......@@ -255,6 +263,11 @@ $retval = SUEXEC($uid, "$pid,$unix_gid",
unlink($nsfile);
/* Clear the various 'loading' indicators. */
echo "<script type='text/javascript' language='javascript'>\n";
echo "ClearLoadingIndicators();\n";
echo "</script>\n";
#
# Fatal Error. Report to the user, even though there is not much he can
# do with the error. Also reports to tbops.
......@@ -269,10 +282,20 @@ if ($retval) {
return;
}
unset($guid);
if (TBPidTid2Template($pid, $tid, $guid, $version)) {
echo "<script type='text/javascript' language='javascript'>\n";
echo "PageReplace('template_show.php?guid=$guid&version=$version');\n";
echo "</script>\n";
}
#
# In case the above redirect fails.
#
echo "Done!";
echo "<br><br>\n";
if (TBPidTid2Template($pid, $tid, $guid, $version)) {
if (isset($guid)) {
SHOWTEMPLATE($guid, $version);
}
......
/*
* Some utility stuff.
*/
/* Clear the various 'loading' indicators. */
function ClearLoadingIndicators()
{
var busyimg = document.getElementById('busy');
var loadingspan = document.getElementById('loading');
loadingspan.innerHTML = "";
busyimg.style.display = "none";
busyimg.src = "1px.gif";
}
/* Replace the current page */
function PageReplace(URL)
{
window.location.replace(URL);
}
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