/[suikacvs]/test/html-whatpm/table.cgi
Suika

Diff of /test/html-whatpm/table.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wakaba, Sun May 27 06:37:05 2007 UTC revision 1.6 by wakaba, Tue May 6 07:50:28 2008 UTC
# Line 51  if ($mode eq '/table') { Line 51  if ($mode eq '/table') {
51  <html lang="en">  <html lang="en">
52  <head>  <head>
53  <title>HTML5 Table Structure Viewer</title>  <title>HTML5 Table Structure Viewer</title>
54    <!--[if IE]><script type="text/javascript" src="../excanvas.js"></script><![endif]-->
55  <script src="../table-script.js" type="text/javascript"></script>  <script src="../table-script.js" type="text/javascript"></script>
56  </head>  </head>
57  <body>  <body>
58  <noscript><p>How great the world without any script were!</p></noscript>  <noscript><p>How great if there were no script at all!</p></noscript>
59  ';  ';
60    
61    my $i = 0;    my $i = 0;
# Line 62  if ($mode eq '/table') { Line 63  if ($mode eq '/table') {
63      $i++; print STDOUT "<h1>Table $i</h1>\n";      $i++; print STDOUT "<h1>Table $i</h1>\n";
64    
65      my $table = Whatpm::HTMLTable->form_table ($table_el);      my $table = Whatpm::HTMLTable->form_table ($table_el);
66        Whatpm::HTMLTable->assign_header ($table);
67    
68      for (@{$table->{column_group}}, @{$table->{column}}) {      for (@{$table->{column_group}}, @{$table->{column}}, $table->{caption},
69             @{$table->{row}}) {
70        next unless $_;        next unless $_;
71        delete $_->{element};        delete $_->{element};
72      }      }
# Line 80  if ($mode eq '/table') { Line 83  if ($mode eq '/table') {
83        for (@{$_}) {        for (@{$_}) {
84          next unless $_;          next unless $_;
85          for (@$_) {          for (@$_) {
86              $_->{id} = ''.$_->{element} if defined $_->{element};
87            delete $_->{element};            delete $_->{element};
88              $_->{is_header} = $_->{is_header} ? 1 : 0;
89          }          }
90        }        }
91      }      }
92    
93      print STDOUT '<script type="text/javascript">      print STDOUT '<script type="text/javascript">
94    tableToCanvas (    tableToCanvas (
95  ';  ';
96      print STDOUT objToJson ($table);      print STDOUT objToJson ($table);
97      print STDOUT ');      print STDOUT ', document.body, "");
98  </script>';  </script>';
99    }    }
100    
# Line 106  Wakaba <w@suika.fam.cx>. Line 111  Wakaba <w@suika.fam.cx>.
111    
112  =head1 LICENSE  =head1 LICENSE
113    
114  Copyright 2007 Wakaba <w@suika.fam.cx>  Copyright 2007-2008 Wakaba <w@suika.fam.cx>
115    
116  This library is free software; you can redistribute it  This library is free software; you can redistribute it
117  and/or modify it under the same terms as Perl itself.  and/or modify it under the same terms as Perl itself.

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24