Mercurial > repos > saskia-hiltemann > ireport
annotate tsv2html_simple.pl @ 6:42076db43d42 draft
Fixed auto resizing plus various other minor bugs
author | saskia-hiltemann |
---|---|
date | Mon, 16 Nov 2015 08:56:22 -0500 |
parents | ac5f9272033b |
children |
rev | line source |
---|---|
0 | 1 print <<END; |
2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
3 "http://www.w3.org/TR/html4/strict.dtd"> | |
4 <html> | |
5 <head> | |
6
42076db43d42
Fixed auto resizing plus various other minor bugs
saskia-hiltemann
parents:
0
diff
changeset
|
6 <script src=\"jquery-1.10.2.js\"></script> |
42076db43d42
Fixed auto resizing plus various other minor bugs
saskia-hiltemann
parents:
0
diff
changeset
|
7 <script src=\"jquery-ui.js\"></script> |
0 | 8 <script type="text/javascript" src="jquery.dataTables.js"></script> |
9 <script type="text/javascript" src="iframe-resizer/js/iframeResizer.contentWindow.min.js"></script> | |
10 <script> | |
11 | |
12 <!-- data tables --> | |
13 \$(document).ready(function() { | |
14 \$('#datatable').dataTable( { | |
15 "bPaginate": false, | |
16 "bLengthChange": false, | |
17 "bFilter": false, | |
18 "bSort": false, | |
19 "bInfo": false, | |
6
42076db43d42
Fixed auto resizing plus various other minor bugs
saskia-hiltemann
parents:
0
diff
changeset
|
20 "bAutoWidth": false |
0 | 21 } ); |
22 } ); | |
6
42076db43d42
Fixed auto resizing plus various other minor bugs
saskia-hiltemann
parents:
0
diff
changeset
|
23 <!-- data tables tsv2html_simple.pl --> |
0 | 24 </script> |
25 | |
26 <link rel="stylesheet" type="text/css" href="jquery.dataTables.css"> | |
27 </head> | |
28 <body> | |
29 <table class="display dataTable" id="datatable" border="1" cellspacing="0" cellpadding="0" style="font-size: 12px;" > | |
30 <thead> | |
31 <tr><th> | |
32 END | |
33 chomp ($_ = <STDIN>); | |
34 s?\t?</th><th>?g; | |
35 print "$_</th></tr>\n"; | |
36 #print "</tr>\n</thead>\n<tbody>\n"; | |
37 print "</thead>\n<tbody>\n"; | |
38 while (<>) { | |
39 print "<tr>\n"; | |
40 my @fields = split('\t'); | |
41 my $first=1; | |
42 for $cell(@fields) { | |
43 if($cell =~ /^(\d|\s)+$/) { | |
44 1 while ($cell =~ s/^(-?\d+)(\d{3})/$1,$2/); | |
45 print "<td align=\"right\">$cell</td>"; | |
46 #print "<td>$cell</td>"; | |
47 } | |
48 else { | |
49 print "<td>$cell</td>"; } } | |
50 print "</tr>\n"; } | |
51 #print "</tr>\n</tbody>\n</table></body></html>\n"; | |
52 print "</tbody>\n</table></body></html>\n"; | |
53 |