projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
755969f
)
73107: Map regression: now always requiring API key [apikey errmsg limited to REQUEST...
author
Jonathan Prykop
<jonathan@freeside.biz>
Wed, 4 Jan 2017 23:16:01 +0000
(17:16 -0600)
committer
Jonathan Prykop
<jonathan@freeside.biz>
Wed, 4 Jan 2017 23:16:01 +0000
(17:16 -0600)
httemplate/view/directions.html
patch
|
blob
|
history
diff --git
a/httemplate/view/directions.html
b/httemplate/view/directions.html
index
1c99cda
..
0b4d139
100644
(file)
--- a/
httemplate/view/directions.html
+++ b/
httemplate/view/directions.html
@@
-62,8
+62,11
@@
function show_route() {
if ( status == google.maps.DirectionsStatus.OK ) {
directionsDisplay.setDirections(result);
} else {
if ( status == google.maps.DirectionsStatus.OK ) {
directionsDisplay.setDirections(result);
} else {
- document.body.innerHTML = ('<P STYLE="color: red;">Directions lookup failed with the following error: '+status+'</P>')
- + <% include('/elements/google_maps_api_key.html' ) |js_string%>;
+ var errmsg = ('<P STYLE="color: red;">Directions lookup failed with the following error: '+status+'</P>');
+ if (status == 'REQUEST_DENIED') {
+ errmsg = errmsg + <% include('/elements/google_maps_api_key.html' ) |js_string%>;
+ }
+ document.body.innerHTML = errmsg;
}
});
}
}
});
}