[freeside-commits] branch FREESIDE_3_BRANCH updated. 10565379f20ec07d1138b025dab5705da9c8165d

Jonathan Prykop jonathan at 420.am
Wed Jan 4 15:22:54 PST 2017


The branch, FREESIDE_3_BRANCH has been updated
       via  10565379f20ec07d1138b025dab5705da9c8165d (commit)
      from  6a7573c32518c6c124c91f61dbd950ea23adaae7 (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 10565379f20ec07d1138b025dab5705da9c8165d
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Wed Jan 4 17:16:01 2017 -0600

    73107: Map regression: now always requiring API key [apikey errmsg limited to REQUEST_DENIED]

diff --git a/httemplate/view/directions.html b/httemplate/view/directions.html
index 1c99cda..0b4d139 100644
--- 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 { 
-      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;
     }
   });
 }

-----------------------------------------------------------------------

Summary of changes:
 httemplate/view/directions.html |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list