From: Ian Jackson Date: Thu, 10 Sep 2009 17:10:48 +0000 (+0100) Subject: Add [?] links to help for advanced strings X-Git-Tag: 5.0^2~144 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=commitdiff_plain;h=4c6a28f4cbed2ed351697f63f30fb4827259f6a9;ds=sidebyside Add [?] links to help for advanced strings --- diff --git a/yarrg/web/docs b/yarrg/web/docs index 6ed64d1..6f754bf 100755 --- a/yarrg/web/docs +++ b/yarrg/web/docs @@ -101,7 +101,7 @@ After getting the results, you can untick various trades individually, and select `Update' to get a new plan. The unticked trades will be excluded from the voyage plan (if any) and also from the totals. -

Vessel capacity

+

Vessel capacity

If you don't specify a vessel or a vessel capacity, the trading plan will not take into account the fact that your voyage will be on a ship @@ -139,7 +139,7 @@ all the preceding terms. The first term may be a ship name or abbrevation instead. If the first term specifies only one of mass or volume, all the subsequent terms may only adjust that same value. -

Expected losses

+

Expected losses

In theory if you were guaranteed to have a trouble-free voyage it would be worth trading goods at very low margins. However, in diff --git a/yarrg/web/qtextstring b/yarrg/web/qtextstring index 639e9ab..d57f863 100644 --- a/yarrg/web/qtextstring +++ b/yarrg/web/qtextstring @@ -42,6 +42,7 @@ $thingstring $emsgstore $perresult $prefix => 'ts'; +$helpref => undef; <%perl> my $stringval= $qa->{$thingstring}; @@ -97,7 +98,7 @@ register_onload(<%$p%>Needed); id="<% $thingstring %>" name="<% $thingstring %>" onchange="<%$p%>Needed();" onkeyup="<%$p%>Later();" value="<% $stringval |h %>" - > + ><% defined($helpref) ? "[?]" : '' %>
 

diff --git a/yarrg/web/query_route b/yarrg/web/query_route index ed9fa44..9a6ca08 100644 --- a/yarrg/web/query_route +++ b/yarrg/web/query_route @@ -97,6 +97,7 @@ Enter route (islands, or archipelagoes, separated by |s or commas; Vessel or capacity: <&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'cs', thingstring => 'capacitystring', emsgstore => \$emsg, + helpref => 'capacity', perresult => sub { ($max_mass,$max_volume) = @_; } @@ -113,9 +114,10 @@ Expected losses: <&| qtextstring, qa => $qa, dbh => $dbh, prefix => 'll', thingstring => 'lossperleague', emsgstore => \$emsg, + helpref => 'losses', perresult => sub { ($lossperleaguepct)= @_; } &> - size=10 + size=9