From e4581a7db8f1e3e9b9bbfb3a52b1fd49927c2c18 Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Wed, 21 Dec 2011 01:03:49 +0000 Subject: [PATCH] Changed the horizontal placement of the javascript code in the head section of the page. svn: r18646 --- src/plugins/webreport/NarrativeWeb.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 201bd90d0..b5c87755e 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -3313,18 +3313,19 @@ class PlacePage(BasePage): # begin inline javascript code # because jsc is a docstring, it does NOT have to be properly indented - with Html("script", type = "text/javascript") as jsc: - if self.mapservice == "Google": + if self.mapservice == "Google": + with Html("script", type = "text/javascript", indent = False) as jsc: head += jsc # Google adds Latitude/ Longitude to its maps... jsc += google_jsc % (latitude, longitude, placetitle) - elif self.mapservice == "OpenStreetMap": + else: + # OpenStreetMap (OSM) adds Longitude/ Latitude to its maps, + # and needs a country code in lowercase letters... + with Html("script", type = "text/javascript") as jsc: canvas += jsc - # OpenStreetMap (OSM) adds Longitude/ Latitude to its maps, - # and needs a country code in lowercase letters... jsc += openstreetmap_jsc % (Utils.xml_lang()[3:5].lower(), longitude, latitude) # add javascript function call to body element