chiark / gitweb /
New onload arrangments; make tabsort take script argument
[ypp-sc-tools.db-test.git] / yarrg / web / query_commod
index 34b1347f20f5034315a1821d535cd6de40f8f8e2..3c2049ca3a509af276a9c28b9c59dbdf463667f5 100644 (file)
@@ -89,8 +89,6 @@ $someresults->();
 
 #---------- actually compute the results and print them ----------
 
-my $onloads= "";
-
 foreach my $bs (split /_/, $ARGS{BuySell}) {
        $bs =~ m/^(buy|sell)$/ or die;
        $bs= $1;
@@ -197,7 +195,7 @@ foreach my $bs (split /_/, $ARGS{BuySell}) {
 %      }
 </table>
 
-<& tabsort,    table => "${bs}_table", sortkeys => "${bs}_sortkeys",
+<&| tabsort,   table => "${bs}_table", sortkeys => "${bs}_sortkeys",
                throw => "${bs}_table_thr", rowclass => 'datarow', cols => [
        {}, {},
        { DoReverse => 1 },
@@ -207,22 +205,13 @@ foreach my $bs (split /_/, $ARGS{BuySell}) {
        { DoReverse => 1, Numeric => 1 },
        { DoReverse => 1, Numeric => 1 },
        ] &>
-<&| script &>
   <% $bs %>_sortkeys= <% to_json_protecttags(\%ts_sortkeys) %>;
   function ts_Pricemap_<% $bs %>(price) {
     if (price=='-') { return <% $bs eq 'buy' ? '-1' : '99999999' %>; }
     return price;
   }
-</&>
-%      $onloads .= "    ts_onload__${bs}_table();\n";
+</&tabsort>
 
 <%perl>
 }
 </%perl>
-
-<&| script &>
-  function all_onload() {
-<% $onloads %>
-  }
-  window.onload= all_onload;
-</&>