diff options
author | matthew <matthew> | 2008-01-10 14:05:20 +0000 |
---|---|---|
committer | matthew <matthew> | 2008-01-10 14:05:20 +0000 |
commit | d5833bd4c1b2c03e794e9067ad0e5bc5c3a1c128 (patch) | |
tree | fe862fa61eb33c6d287d99479af74b2858cd76b1 | |
parent | 23a1922919a221f1a2fe38b42fce5ba686d81fcb (diff) |
3 days rather than 1; slightly quicker JS.
-rwxr-xr-x | web/index.cgi | 4 | ||||
-rw-r--r-- | web/js.js | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/web/index.cgi b/web/index.cgi index 3da3e113d..c5b7d03e9 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: index.cgi,v 1.169 2008-01-03 15:00:23 matthew Exp $ +# $Id: index.cgi,v 1.170 2008-01-10 14:05:20 matthew Exp $ use strict; use Standard; @@ -83,7 +83,7 @@ EOF my $new = dbh()->selectrow_array("select count(*) from problem where state in ('confirmed','fixed') and confirmed>ms_current_timestamp()-'1 week'::interval"); my $new_text = 'in past week'; if ($new > $fixed) { - $new = dbh()->selectrow_array("select count(*) from problem where state in ('confirmed','fixed') and confirmed>ms_current_timestamp()-'1 day'::interval"); + $new = dbh()->selectrow_array("select count(*) from problem where state in ('confirmed','fixed') and confirmed>ms_current_timestamp()-'3 days'::interval"); $new_text = 'recently'; } $out .= '<form action="./" method="get" id="postcodeForm">'; @@ -149,7 +149,7 @@ function update_tiles(dx, dy, force) { y -= vertical; tile_y += vertical; - var url = '/tilma/tileserver/10k-full/' + x + '-' + (x+5) + ',' + y + '-' + (y+5) + '/JSON'; + var url = [ '/tilma/tileserver/10k-full/', x, '-', (x+5), ',', y, '-', (y+5), '/JSON' ].join(''); var req = YAHOO.util.Connect.asyncRequest('GET', url, { success: urls_loaded, failure: urls_not_loaded, argument: [tile_x, tile_y] @@ -167,7 +167,7 @@ function urls_loaded(o) { for (var j=0; j<6; j++) { if (tiles[i][j] == null) continue; var jj = (j + o.argument[0]); - var id = 't'+ii+'.'+jj; + var id = [ 't', ii, '.', jj ].join(''); var xx = x+j; var yy = y+5-i; var img = document.getElementById(id); @@ -180,7 +180,7 @@ function urls_loaded(o) { img = cloneNode(); img.style.top = ((ii-2)*tileheight) + 'px'; img.style.left = ((jj-2)*tilewidth) + 'px'; - img.name = 'tile_' + xx + '.' + yy; + img.name = [ 'tile_', xx, '.', yy ].join('') img.id = id; if (browser) { img.style.visibility = 'hidden'; |