gluon-config-mode-geo-location: load only on internet conection and dont let browsers cache OpenLayers.js
This commit is contained in:
parent
dfeafcd58e
commit
ad1872163e
@ -56,10 +56,10 @@ return function(form, uci)
|
||||
|
||||
text = text .. [[
|
||||
<div id="locationPickerMap" style="width:100%; height:300px; display: none;"></div>
|
||||
<script async="true" type="text/javascript" src="]] .. show_olurl() .. [["></script>
|
||||
<script type="text/javascript" src="/static/osm.js"></script>
|
||||
<script type="text/javascript">
|
||||
var latitude=]] .. show_lon() .. ",longitude=" .. show_lat() .. [[;
|
||||
function loadedContent() {
|
||||
document.addEventListener("DOMContentLoaded", showMap, false);
|
||||
setInterval(function() {
|
||||
if(false !== findObj("longitude")) {
|
||||
@ -67,8 +67,10 @@ return function(form, uci)
|
||||
}else{
|
||||
document.getElementById("locationPickerMap").style.display="none";
|
||||
}
|
||||
}, 1000);
|
||||
}, 10);
|
||||
}
|
||||
</script>
|
||||
<script onload="loadedContent();" type="text/javascript" src="]] .. show_olurl() .. [[?noCache=]] .. os.time() .. [["></script>
|
||||
]]
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user