IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 19, 2008, 6:15:23 AM (18 years ago)
Author:
eugene
Message:

all sorts of updates to the format; up/down icons, etc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/scripts/generate

    r18143 r18193  
    228228sub write_table_header {
    229229
    230     # add column sorting elements here
     230    # print the table header (field labels)
     231    print FILE "echo \"<tr><td></td>\\n\";\n";
    231232    for ($i = 0; $i < @field; $i++) {
    232233        ($label, $value, $string) = &parse_label ($show[$i]);
    233234        if ($show[$i] eq "none")  { next; }
    234         # print FILE "echo \"<th class=\\\"list\\\"> $name[$i] </th>\\n\";\n";
     235        print FILE "write_header_cell (\"list\", \"$name[$i]\");\n";
     236    }
     237    print FILE "echo \"</tr>\\n\";\n";
     238
     239    # print the column sort cells
     240    print FILE "echo \"<tr><td></td>\\n\";\n";
     241    for ($i = 0; $i < @field; $i++) {
     242        ($label, $value, $string) = &parse_label ($show[$i]);
     243        if ($show[$i] eq "none")  { next; }
    235244        if ($label eq "op") {
    236             print FILE "write_table_header (\"list\", \"$name[$i]\", \"$opf{$value}\", \$buttonLink, \$ID, '$myFile');\n";
     245            print FILE "write_sort_cell (\"list\", \"$opf{$value}\", \$buttonLink, \$ID, '$myFile');\n";
    237246        } else {
    238             print FILE "write_table_header (\"list\", \"$name[$i]\", \"$field[$i]\", \$buttonLink, \$ID, '$myFile');\n";
    239         }
    240     }
     247            print FILE "write_sort_cell (\"list\", \"$field[$i]\", \$buttonLink, \$ID, '$myFile');\n";
     248        }
     249    }
     250    print FILE "echo \"</tr>\\n\";\n";
    241251}
    242252
     
    248258
    249259        # TD_CLASS class field expression
    250         ($class, $field, $testline) = split (" ", $tdClass, 3);
    251 
    252         $field = &parse_fieldname ($field);
    253 
    254         print FILE "  if ($field $testline) {\n";
     260        ($class, $testline) = split (" ", $tdClass, 2);
     261
     262        $testlineFixed = "";
     263        @testlineBits = split (" ", $testline);
     264        foreach my $bit (@testlineBits) {
     265            $newbit = &parse_fieldname ($bit);
     266            $testlineFixed = "$testlineFixed $newbit";
     267        }
     268
     269        print FILE "  if ($testlineFixed) {\n";
    255270        print FILE "    \$class = \"$class\";\n";
    256271        print FILE "  }\n";
     
    270285            print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'string');\n";
    271286        } else {
     287            print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'string');\n";
    272288            print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'min');\n";
    273289            print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'max');\n";
     
    286302            print FILE "\$buttonLink = button_restrict_string ('$value', \$buttonLink);\n";
    287303        } else {
     304            print FILE "\$buttonLink = button_restrict_string ('$value', \$buttonLink);\n";
    288305            print FILE "\$buttonLink = button_restrict_min ('$value', \$buttonLink);\n";
    289306            print FILE "\$buttonLink = button_restrict_max ('$value', \$buttonLink);\n";
     
    297314    my ($i);
    298315
    299     print FILE "echo \"<tr>\\n\";\n";
     316    print FILE "echo \"<tr><td>&ge</td>\\n\";\n";
    300317    for ($i = 0; $i < @field; $i++) {
    301318        if ($show[$i] eq "none")  { next; }
     
    311328        }
    312329    }
    313     print FILE "echo \"</tr> <tr>\\n\";\n";
     330    print FILE "echo \"</tr><tr><td>&le</td>\\n\";\n";
    314331    for ($i = 0; $i < @field; $i++) {
    315332        if ($show[$i] eq "none")  { next; }
     
    347364            # print the actual table cell line with the link...
    348365            if (! $value && ($field[$i] ne "*")) { $value = "\$row[$Nrow]"; }
     366
     367            # add special format elements
     368            # $realFormat = $format[$i];
     369            # if ($format[$i] eq '%T') {
     370            #   $realFormat = '%s';
     371            # }
    349372            print FILE "  write_table_cell (\$class, '$format[$i]', $myLink, $value);\n";
    350373            next;
     
    557580    foreach $word (@words) {
    558581        $fword = &parse_fieldname ($word);
     582        # print "field: $word -> $fword\n";
    559583        push @outwords, $fword;
    560584        if ($word =~ m|^\$|) {
Note: See TracChangeset for help on using the changeset viewer.