projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e87cdcc
)
usage hints for 477 zone editor, #30260
author
Mark Wells
<mark@freeside.biz>
Thu, 10 Dec 2015 21:32:48 +0000
(13:32 -0800)
committer
Mark Wells
<mark@freeside.biz>
Thu, 10 Dec 2015 21:39:51 +0000
(13:39 -0800)
httemplate/elements/polygon.html
patch
|
blob
|
history
diff --git
a/httemplate/elements/polygon.html
b/httemplate/elements/polygon.html
index
062aa48
..
813aa41
100644
(file)
--- a/
httemplate/elements/polygon.html
+++ b/
httemplate/elements/polygon.html
@@
-8,9
+8,10
@@
my $vertices_json = $opt{'curr_value'} || '[]';
</%init>
<& hidden.html, %opt &>
<div id="<% $div_id %>" style="height: 600px; width: 600px"></div>
</%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="<% $fsurl %>elements/jquery.js"></script>
<script src="<% $fsurl %>elements/jquery.js"></script>
-<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.2
2"></script>
<script>
var map;
var drawingManager;
<script>
var map;
var drawingManager;
@@
-35,7
+36,13
@@
$(function() {
scaleControl: true,
streetViewControl: false,
};
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;
var polygonComplete = function(p) {
window.polygon = p;
@@
-56,6
+63,9
@@
$(function() {
// and also now
updateFormInput();
// and also now
updateFormInput();
+
+ set_hint('Edit the zone by dragging the markers. Double-click to remove a vertex.');
+
};
var polygonOptions = {
};
var polygonOptions = {
@@
-119,6
+129,8
@@
$(function() {
map.setZoom(12);
});
} // on error, or if geolocation isn't available, do nothing
map.setZoom(12);
});
} // on error, or if geolocation isn't available, do nothing
+
+ set_hint('Click to place the corners of the zone.');
}
});
}
});