[freeside-commits] branch FREESIDE_4_BRANCH updated. f083eaba222c062310512f3aacae1ec90299ee93
Jonathan Prykop
jonathan at 420.am
Tue Oct 25 12:34:46 PDT 2016
The branch, FREESIDE_4_BRANCH has been updated
via f083eaba222c062310512f3aacae1ec90299ee93 (commit)
from d42c4ffce20ee7a745a5f6a85a310a8930494879 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f083eaba222c062310512f3aacae1ec90299ee93
Author: Jonathan Prykop <jonathan at freeside.biz>
Date: Tue Oct 25 14:23:40 2016 -0500
73107: Map regression: now always requiring API key
diff --git a/httemplate/view/directions.html b/httemplate/view/directions.html
index f23b7eb..8377d12 100644
--- a/httemplate/view/directions.html
+++ b/httemplate/view/directions.html
@@ -1,5 +1,3 @@
-% if ( $apikey ) {
-
%# the actual page
<& /elements/header-popup.html, {
title => '',#$name,
@@ -12,11 +10,6 @@
<div id="directions_panel"></div>
<div id="map_canvas"></div>
-% } else {
-<& /elements/header-popup.html &>
-<& /elements/google_maps_api_key.html &>
-% }
-
<%def .head>
% my $lat = $cgi->param('lat');
% my $lon = $cgi->param('lon');
@@ -45,7 +38,7 @@ body { height: 100%; margin: 0px; padding: 0px }
}
</style>
-<script type="text/javascript" src="https://maps.google.com/maps/api/js?v=3&key=<% $apikey %>">
+<script type="text/javascript" src="https://maps.google.com/maps/api/js?v=3<% $apikey ? '&key='.$apikey : '' %>">
</script>
<script type="text/javascript">
@@ -77,7 +70,7 @@ function show_route() {
// function name specified by google maps api, special hook for auth errors
function gm_authFailure () {
document.body.innerHTML =
-<% include('/elements/google_maps_api_key.html', autherror => 1) |js_string%>;
+<% include('/elements/google_maps_api_key.html', autherror => $apikey ) |js_string%>;
}
function initialize() {
diff --git a/httemplate/view/map.html b/httemplate/view/map.html
index b3459dc..01ffc6d 100644
--- a/httemplate/view/map.html
+++ b/httemplate/view/map.html
@@ -1,5 +1,3 @@
-% if ( $apikey ) {
-
%# the actual page
<& /elements/header-popup.html, {
title => '',#$name,
@@ -11,11 +9,6 @@
<div id="map_canvas"></div>
-% } else {
-<& /elements/header-popup.html &>
-<& /elements/google_maps_api_key.html &>
-% }
-
<%def .head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
@@ -29,7 +22,7 @@ body { height: 100%; margin: 0px; padding: 0px }
@media print { #map_canvas { height: 500px; margin: 0; } }
</style>
-<script type="text/javascript" src="https://maps.google.com/maps/api/js?v=3&key=<% $apikey %>">
+<script type="text/javascript" src="https://maps.google.com/maps/api/js?v=3<% $apikey ? '&key='.$apikey : '' %>">
</script>
<script type="text/javascript">
@@ -39,7 +32,7 @@ var map;
// function name specified by google maps api, special hook for auth errors
function gm_authFailure () {
document.body.innerHTML =
-<% include('/elements/google_maps_api_key.html', autherror => 1) |js_string%>;
+<% include('/elements/google_maps_api_key.html', autherror => $apikey ) |js_string%>;
}
-----------------------------------------------------------------------
Summary of changes:
httemplate/view/directions.html | 11 ++---------
httemplate/view/map.html | 11 ++---------
2 files changed, 4 insertions(+), 18 deletions(-)
More information about the freeside-commits
mailing list