Commit dd05c488 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Just for Eric, add tooltip mouseovers for the parameter (names) in the

instantiate and start run page. Hover over the parameter name ...
parent e2b866fd
......@@ -853,6 +853,34 @@ class Template
return 0;
}
#
# Return an array of the formal parameters for a template.
#
function FormalParameterMouseOvers(&$mouseovers) {
$mouseovers = array();
$guid = $this->guid();
$vers = $this->vers();
$query_result =
DBQueryFatal("select p.name,m.value as description ".
" from experiment_template_parameters as p ".
"left join experiment_template_metadata_items as m ".
" on m.guid=p.metadata_guid and ".
" m.vers=p.metadata_vers ".
"where p.parent_guid='$guid' and ".
" p.parent_vers='$vers'");
while ($row = mysql_fetch_array($query_result)) {
$name = $row['name'];
$description = $row['description'];
if (isset($description) && $description != "") {
$mouseovers[$name] = MakeMouseOver($description);
}
}
return 0;
}
#
# Find next candidate for a template (modify) TID
#
......
......@@ -231,6 +231,7 @@ function SPITFORM($instance, $formfields, $parameters, $errors)
# initial setting for the parameters.
#
$template->FormalParameters($formal_parameters);
$template->FormalParameterMouseOvers($mouseovers);
$instance->Bindings($instance_parameters);
$instance->RunBindings($instance->LastRunIdx(), $lastrun_parameters);
......@@ -362,9 +363,10 @@ function SPITFORM($instance, $formfields, $parameters, $errors)
while (list ($name, $value) = each ($parameters)) {
if (!isset($value))
$value = "&nbsp";
$mouseover = (isset($mouseovers[$name]) ? $mouseovers[$name] : "");
echo "<tr>
<td class='pad4'>$name</td>
<td class='pad4' $mouseover>$name</td>
<td class='pad4' class=left>
<input type=text
id='parameter_$name'
......
......@@ -196,6 +196,12 @@ function SPITFORM($template, $formfields, $parameters, $errors)
}
if (count($parameters)) {
#
# Lets get an array of mouseovers to use in the form.
#
unset($mouseovers);
$template->FormalParameterMouseOvers($mouseovers);
#
# Table of inputs.
#
......@@ -207,9 +213,10 @@ function SPITFORM($template, $formfields, $parameters, $errors)
while (list ($name, $value) = each ($parameters)) {
if (!isset($value))
$value = "&nbsp";
$mouseover = (isset($mouseovers[$name]) ? $mouseovers[$name] : "");
echo "<tr>
<td class='pad4'>$name</td>
<td class='pad4' $mouseover>$name</td>
<td class='pad4' class=left>
<input type=text
name=\"parameters[$name]\"
......
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