From: Ian Jackson Date: Wed, 12 Aug 2009 01:25:41 +0000 (+0100) Subject: wip arch list change X-Git-Tag: 3.4~226 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=commitdiff_plain;h=55c0517c2048155553c3e593125135ba83acd679 wip arch list change --- diff --git a/yarrg/web/pirate-route b/yarrg/web/pirate-route index 639c8b1..e414e6e 100644 --- a/yarrg/web/pirate-route +++ b/yarrg/web/pirate-route @@ -82,65 +82,67 @@ Enter route (islands, or archipelagoes, separated by |s or commas; abbreviations are OK):

+ onchange="tr_element= event.currentTarget; tr_Needed();" + onkeydown="tr_element= event.currentTarget; tr_Later();">
 

% } else { <%perl> -my $sth=$dbh->prepare("SELECT islandid,islandname +my $sth=$dbh->prepare("SELECT islandid,islandname,archipelago FROM islands ORDER BY islandname;"); $sth->execute(); my $row; my $islandlistdata=''; +my %archmap=(); while ($row=$sth->fetchrow_arrayref) { $islandlistdata.= sprintf('', - map { encode_entities($_) } @$row); + map { encode_entities($_) } @$row[0..1]); + $archmap{$row->[0]}= $row->[2]; } $sth=$dbh->prepare("SELECT DISTINCT archipelago FROM islands @@ -156,11 +158,25 @@ while ($row=$sth->fetchrow_arrayref) { @@ -176,7 +192,7 @@ function setisland(dd) { % for my $dd (0..$a{Dropdowns}-1) { - <% $islandlistdata %> % }