diff options
-rw-r--r-- | perllib/FixMyStreet/Map.pm | 6 | ||||
-rw-r--r-- | perllib/Page.pm | 7 | ||||
-rw-r--r-- | templates/website/cobrands/barnet/barnet-header | 1 | ||||
-rw-r--r-- | templates/website/cobrands/emptyhomes/emptyhomes-header | 1 | ||||
-rw-r--r-- | templates/website/header | 2 | ||||
-rwxr-xr-x | web/import.cgi | 1 |
6 files changed, 13 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm index 0aae808b9..315de0958 100644 --- a/perllib/FixMyStreet/Map.pm +++ b/perllib/FixMyStreet/Map.pm @@ -24,6 +24,12 @@ use constant TIF_SIZE_M => mySociety::Config::get('TILES_TIFF_SIZE_METRES'); use constant TIF_SIZE_PX => mySociety::Config::get('TILES_TIFF_SIZE_PIXELS'); use constant SCALE_FACTOR => TIF_SIZE_M / (TIF_SIZE_PX / TILE_WIDTH); +sub header_js { + return ' +<script type="text/javascript" src="/js/map-tilma.js"></script> +'; +} + # display_map Q PARAMS # PARAMS include: # EASTING, NORTHING for the centre point of the map diff --git a/perllib/Page.pm b/perllib/Page.pm index b3ab35b33..16ce1befd 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -194,6 +194,7 @@ sub template_vars ($%) { 'lang_url' => $lang_url, 'title' => $params{title}, 'rss' => '', + map_js => FixMyStreet::Map::header_js(), ); if ($params{rss}) { @@ -274,7 +275,7 @@ sub header ($%) { my $default_params = Cobrand::header_params(get_cobrand($q), $q, %params); my %default_params = %{$default_params}; %params = (%default_params, %params); - my %permitted_params = map { $_ => 1 } qw(title rss js expires lastmodified template cachecontrol context status_code); + my %permitted_params = map { $_ => 1 } qw(title rss expires lastmodified template cachecontrol context status_code); foreach (keys %params) { croak "bad parameter '$_'" if (!exists($permitted_params{$_})); } @@ -307,8 +308,6 @@ sub header ($%) { sub footer { my ($q, %params) = @_; my $extra = $params{extra}; - my $js = $params{js} || ''; - $js = ''; # Don't use fileupload JS at the moment if ($q->{site} ne 'fixmystreet') { my $template = template($q, %params) . '-footer'; @@ -370,8 +369,6 @@ $orglogo $track -$js - $piwik </body> diff --git a/templates/website/cobrands/barnet/barnet-header b/templates/website/cobrands/barnet/barnet-header index 3474091e6..67619b417 100644 --- a/templates/website/cobrands/barnet/barnet-header +++ b/templates/website/cobrands/barnet/barnet-header @@ -51,6 +51,7 @@ <script type="text/javascript" src="/cobrands/barnet/javascript/2008-portsurf.js"></script>
<script type="text/javascript" src="/yui/utilities.js"></script>
<script type="text/javascript" src="/js.js"></script>
+{{ $map_js }}
{{ $rss }}
diff --git a/templates/website/cobrands/emptyhomes/emptyhomes-header b/templates/website/cobrands/emptyhomes/emptyhomes-header index 1ece0cf30..a9ed5ce51 100644 --- a/templates/website/cobrands/emptyhomes/emptyhomes-header +++ b/templates/website/cobrands/emptyhomes/emptyhomes-header @@ -5,6 +5,7 @@ <meta http-equiv="content-type" content="text/html; charset=utf-8"> <script type="text/javascript" src="/yui/utilities.js"></script> <script type="text/javascript" src="/js.js"></script> +{{ $map_js }} <style type="text/css"> @import "/css/core.css"; @import "/css/cobrands/emptyhomes/emptyhomes.css"; diff --git a/templates/website/header b/templates/website/header index 44f51ca55..060d317cb 100644 --- a/templates/website/header +++ b/templates/website/header @@ -4,6 +4,8 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript" src="/yui/utilities.js"></script> <script type="text/javascript" src="/js.js"></script> + {{ $map_js }} + <title>{{ $title }}{{ $site_title }}</title> <style type="text/css">@import url("/css/core.css"); @import url("/css/main.css");</style> <!--[if LT IE 7]> diff --git a/web/import.cgi b/web/import.cgi index f839bd5f5..2aede1697 100755 --- a/web/import.cgi +++ b/web/import.cgi @@ -11,6 +11,7 @@ use strict; use Error qw(:try); use Standard; +use Utils; use mySociety::AuthToken; use mySociety::EmailUtil; use mySociety::EvEl; |