User:Wjw

I use this perl script to build a form which allows the user to select parameters which determine what goes into the timeline which is empty when this script initializes it.

The user can select start time end time report plantProd Line The report and line are radio buttons which have an onChange attribute which calls the reLoad function to clear the timeline event sources and load in a new set based on the newly selected parameters.

);  print " "; #end of calendar div } sub pick_loader {   my $ret;   #if($params{'report'} =~ /history/) {   #   $ret = qw(/cgi-bin/lib/jscript/timeline/wjw_load_timeline_1.js);   #} else {   #   $ret = qw(/cgi-bin/lib/jscript/timeline/wjw_load_timeline_split.js);   #}   $ret = qw(/cgi-bin/lib/jscript/timeline/wjw_load_timeline_split.js);   return $ret; } sub gen_phase_list {   print qq();   print qq(Select Line); if ($params{'plant'} =~ /tremonton/i) {      print radio_group(-name=>'phase', -values=>[qw/1 4 5 3/], -onChange=>"reLoad(this.form)", -labels=>{'1' => 'L1', '4' => 'L2', '5' => 'L3', '3' => 'L4'}, -default=>'1');     print " ";   }   if ($params{'plant'} =~ /northfield/i) {      print radio_group(-name=>'phase', -values=>[qw/8 9 11 16 12 1 3 17 20 10 18/], -onChange=>"reLoad(this.form)", -labels=>{'8' => 'P3', '9' => 'P4', '11' => 'P6', '16' => 'P7', '12' => 'P8', '1' => 'P9', '3' => 'P10', '17' => 'P11', '20' => 'P12', '10' => 'P13', '18' => 'P14'}, -default=>'8');
 * 1) I left this routine in place to remind myself of an old method I used to
 * 2) load the timeline differently. Now that the timeline is set up to use
 * 3) individual eventsources for each band, this is not required, so I just return
 * 4) the one set of js functions and load them.
 * 1) the one set of js functions and load them.
 * 1) this is specific to my app, but provides for some of the parameters the user
 * 2) selects. Each facility has a set of lines, and I just hard coded them in as
 * 3) they don't change.
 * 1) they don't change.

print " "; }  if ($params{'plant'} =~ /asheboro/i) { print radio_group(-name=>'phase',                 -values=>[qw/2 1/],                  -onChange=>"reLoad(this.form)",                  -labels=>{'2'  => 'L1',                            '1'  => 'L2'},                  -default=>'2'); }  print " "; } sub gen_plant_list { print qq(Select Plant); #print qq(
 * 1) selection of facilities in which the timeline can be run
 * 1) selection of facilities in which the timeline can be run