Organization html
Jump to navigation
Jump to search
| Line 486: | Line 486: | ||
| − | + | function drawMap(lat,lon) { | |
| − | |||
| − | |||
| − | + | var mapCenter = [lat,lon] | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
var map = L.map('map', {center : mapCenter, zoom : 7}); | var map = L.map('map', {center : mapCenter, zoom : 7}); | ||
| Line 538: | Line 520: | ||
updateMarker(e.latlng.lat, e.latlng.lng); | updateMarker(e.latlng.lat, e.latlng.lng); | ||
}); | }); | ||
| + | |||
| + | } | ||
| + | |||
| + | |||
| + | |||
| + | $(function(){ | ||
| + | |||
| + | $('#select_countries option:contains("</html>{{#ci_visitorCountry:}}<html>")').prop('selected',true); | ||
| + | |||
| + | $('#select_countries').on('change',function() { | ||
| + | var selected_country = $(this).find('option:selected").text() | ||
| + | for(var i in obj) { | ||
| + | if(obj[i].name == selected_country) { | ||
| + | drawMap(obj[i].lat, obj[i].long); | ||
| + | break; | ||
| + | } | ||
| + | } | ||
| + | }) | ||
| + | |||
| + | $('.ci_form textarea').autosize(); | ||
| + | |||
| + | |||
| + | |||
| + | // | ||
| + | if(obj.hasOwnProperty("</html>{{#ci_visitorIsoCode:}}<html>")) { | ||
| + | var key = obj["</html>{{#ci_visitorIsoCode:}}<html>"]; | ||
| + | drawMap(key.lat, key.long); | ||
| + | |||
| + | } else { | ||
| + | drawMap(22, 87); | ||
| + | } | ||
| + | |||
| + | |||
/* | /* | ||
Revision as of 09:46, 7 March 2020