X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_commod;fp=yarrg%2Fweb%2Fquery_commod;h=3c2049ca3a509af276a9c28b9c59dbdf463667f5;hb=767e625796d67e5f5cc94d7e1949b1389f753764;hp=34b1347f20f5034315a1821d535cd6de40f8f8e2;hpb=a4e2383b30189c028ae35d2f587b084803e5d888;p=ypp-sc-tools.main.git diff --git a/yarrg/web/query_commod b/yarrg/web/query_commod index 34b1347..3c2049c 100644 --- a/yarrg/web/query_commod +++ b/yarrg/web/query_commod @@ -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}) { % } -<& 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"; + <%perl> } - -<&| script &> - function all_onload() { -<% $onloads %> - } - window.onload= all_onload; -