X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.main.git;a=blobdiff_plain;f=yarrg%2Fweb%2Fquery_age;h=d9b234dd559e074353641f7c1ccd5fae7f9b4916;hp=88bc7ea16b73fa686bb30628761a725c4bd242c3;hb=872e647cac241531e4599c8b8b330d8772020253;hpb=248bc67115c51a597d806d3de9171df17a9915c0 diff --git a/yarrg/web/query_age b/yarrg/web/query_age index 88bc7ea..d9b234d 100644 --- a/yarrg/web/query_age +++ b/yarrg/web/query_age @@ -80,34 +80,18 @@ $sth->execute(); class="<% 'datarow'.($rowix & 1) %>" > <% $row->{'archipelago'} |h %> <% $row->{'islandname'} |h - %> <% prettyprint_age($age) %> + %> <% prettyprint_age($age) %> % $rowix++; % } -<& tabsort, table => 'ts_table', rowclass => 'datarow', cols => [ - {}, {}, - { DoReverse => 1, - Numeric => 1, - SortKey => "da_ages[rowid]" }] - &> - -

-Time since this page loaded: -(not known; times above not updating) - -

- -<& "lookup:formhidden", ours => sub { 0; } &> -
- +<& SELF:dataages, id2age => \%da_ages, elemidprefix => "'c'+" &> <%method dataages> <%args> $id2age $elemidprefix => '' <&| script &> - da_ages= <% to_json_protecttags($id2age) %>; function da_Refresh() { var now= Date.now(); debug('updating now='+now); @@ -119,21 +103,29 @@ Time since this page loaded: el.innerHTML= newhtml; } } + da_ages= <% to_json_protecttags($id2age) %>; window.setInterval(da_Refresh, 10000); + register_onload(da_Refresh); -<& SELF:dataages, id2age => \%da_ages, elemidprefix => "'c'+" &> - -<&| script &> +<&| tabsort, table => 'ts_table', rowclass => 'datarow', cols => [ + {}, {}, + { DoReverse => 1, + Numeric => 1, + SortKey => "da_ages[rowid]" }] + &> ts_sortkeys= <% to_json_protecttags(\%ts_sortkeys) %>; + - function all_onload() { - ts_onload__ts_table(); - da_Refresh(); - } - window.onload= all_onload; - +

+Time since this page loaded: +(not known; times above not updating) + +

+ +<& "lookup:formhidden", ours => sub { 0; } &> +
<%init> use POSIX;