]> jspc29.x-matter.uni-frankfurt.de Git - coral.git/commitdiff
cleaned up, hover boxes to the settings dialog
authorMichael Wiebusch <m.wiebusch@gsi.de>
Thu, 15 Jan 2015 13:28:52 +0000 (14:28 +0100)
committerMichael Wiebusch <m.wiebusch@gsi.de>
Thu, 15 Jan 2015 13:28:52 +0000 (14:28 +0100)
user_interface/pmt_ro.pl
user_interface/settings_subs.pm
user_interface/table_control.pm

index b536b09cb37c31b7ea62f4bddde13ce777ee4f12..e4b1791b7e5e3c1e9500f29d3500f235eb0ca7ae 100755 (executable)
@@ -24,6 +24,7 @@ my $dispatch_table = {
   load_settings => 1,
   save_settings => 1,
   reset_settings => 1,
+  settings_form => 1,
   zero_calib => 1,
   signal_thresh => 1,
   veto_thresh => 1,
index a547c5263b6ce047de18388714772aa95bc35a99..89f610843d85bbc1b6de8ff529a7e69a7c7afd69 100644 (file)
@@ -37,6 +37,7 @@ sub reset_settings {
 sub settings_form {
   my $self=shift;
   my $settings = $self->load_settings();
+  my $settings_desc = $self->{settings_desc};
 
   printHeader('text/html');
   
@@ -45,28 +46,43 @@ sub settings_form {
 .hidden {
   visibility:collapse
 }
+
+span.dropt {border-bottom: thin dotted; background: #ffeedd;}
+span.dropt:hover {text-decoration: none; background: #ffffff; z-index: 6; }
+span.dropt span {position: absolute; left: -9999px;
+  margin: 20px 0 0 0px; padding: 3px 3px 3px 3px;
+  border-style:solid; border-color:black; border-width:1px; z-index: 6;}
+span.dropt:hover span {left: 2%; background: #ffffff;} 
+span.dropt span {position: absolute; left: -9999px;
+  margin: 4px 0 0 0px; padding: 3px 3px 3px 3px; 
+  border-style:solid; border-color:black; border-width:1px;}
+span.dropt:hover span {margin: 20px 0 0 170px; background: #ffffff; z-index:6;} 
+
 </style>
 
   
-<form action="table_control.pl" method="get">
+<form action="'.__PACKAGE__.'.pl" method="get" target="_self">
   <input type="text" name="sub" value="save_settings" class="hidden"><br>
   <table>
   ';
   
   for my $key ( sort(keys %$settings) ) {
     my $value = $settings->{$key};
-    print "<tr><td align=right>$key :</td>";
+    print "<tr><td align=right><span class=dropt>$key :";
+    
+    print "<span style=\"width:300px;\" >".$settings_desc->{$key}."</span></span></td>";
     print "<td><input type='text' name='$key' value='$value'></td></tr>";
   }
 
 print '
-
-  </table><input type="submit" value="save settings">
+  <tr><td></td><td>
+  <input type="submit" value="save settings"></td>
+  </table>
 </form>
 
 
 ';
-  return 1;
+  return " ";
 
 }
 
index d95009590f84599decaa133abb554587e90efc7a..8a151be05dcc04b066e60f6c487a4996b6368a53 100644 (file)
@@ -54,6 +54,25 @@ sub new {
     
     
   };
+  
+  $self->{settings_desc} = {
+    tty => "The address of the serial device (COMPORT) of the linear table",
+    baudrate => "Baudrate (bits/second) setting of the serial device (tty) of the linear table",
+    approx_speed => "Approximate speed of the linear table in mm/sec. Value is used to estimate timeouts",
+    size_x => "Length/travel of the linear table x axis in mm",
+    size_y => "Length/travel of the linear table y axis in mm",
+    table_precision => "Precision of the linear table in mm/step",
+    
+    sample_rect_x1 => "x start coordinate of sample area in mm",
+    sample_rect_x2 => "x end coordinate of sample area in mm",
+    sample_rect_y1 => "y start coordinate of sample area in mm",
+    sample_rect_y2 => "y end coordinate of sample area in mm",
+    sample_step_size => "The step size/width for the scan pattern in mm",
+    sample_aperture_dia => "Estimate of the radiation aperture in mm",
+    
+    scan_pattern_svg_file => "Filename for the visualization (svg image) of the scan pattern",
+    scan_pattern_style => "Defines the scan modus, available options are 'linebyline' and 'meander'"
+  };
 
   $self->{has_run} = {}; # remember which subs already have run