[freeside-commits] branch master updated. 845355bf3864661dd37f52996c73a09599110b8d

Mark Wells mark at 420.am
Thu Dec 10 13:40:00 PST 2015


The branch, master has been updated
       via  845355bf3864661dd37f52996c73a09599110b8d (commit)
      from  5259890066c6a6dc90048b209cfb86550d5336a4 (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 845355bf3864661dd37f52996c73a09599110b8d
Author: Mark Wells <mark at freeside.biz>
Date:   Thu Dec 10 13:32:48 2015 -0800

    usage hints for 477 zone editor, #30260

diff --git a/httemplate/elements/polygon.html b/httemplate/elements/polygon.html
index 41ba653..469ae7f 100644
--- a/httemplate/elements/polygon.html
+++ b/httemplate/elements/polygon.html
@@ -8,8 +8,9 @@ my $vertices_json = $opt{'curr_value'} || '[]';
 </%init>
 <& hidden.html, %opt &>
 <div id="<% $div_id %>" style="height: 600px; width: 600px"></div>
+<div id="<% $div_id %>_hint" style="width: 100%; border: 2px solid black; text-align: center; box-sizing: border-box; padding: 4px"> </div>
 
-<script src="https://maps.googleapis.com/maps/api/js?libraries=drawing&v=2"></script>
+<script src="https://maps.googleapis.com/maps/api/js?libraries=drawing&v=3.22"></script>
 <script>
 var map;
 var drawingManager;
@@ -34,7 +35,13 @@ $(function() {
     scaleControl: true,
     streetViewControl: false,
   };
-  map = new google.maps.Map($('#<% $div_id %>')[0], mapOptions);
+  var div_map = $('#<% $div_id %>');
+  var div_hint = $('#<% $div_id %>_hint');
+  map = new google.maps.Map(div_map[0], mapOptions);
+
+  var set_hint = function(txt) {
+    div_hint.text(txt);
+  }
 
   var polygonComplete = function(p) {
     window.polygon = p;
@@ -55,6 +62,9 @@ $(function() {
 
     // and also now
     updateFormInput();
+
+    set_hint('Edit the zone by dragging the markers. Double-click to remove a vertex.');
+
   };
 
   var polygonOptions = {
@@ -118,6 +128,8 @@ $(function() {
         map.setZoom(12);
       });
     } // on error, or if geolocation isn't available, do nothing
+
+    set_hint('Click to place the corners of the zone.');
   }
 
 });

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

Summary of changes:
 httemplate/elements/polygon.html |   16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list