Closes #262 Display map div only after getting location
This commit is contained in:
parent
458bbc8bdc
commit
9986e41c5c
@ -1001,7 +1001,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
|||||||
<label for="location" class="col-md-3 control-label"><?php echo $hesklang['location_colon']; ?></label>
|
<label for="location" class="col-md-3 control-label"><?php echo $hesklang['location_colon']; ?></label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<p id="console"><?php echo $hesklang['requesting_location_ellipsis']; ?></p>
|
<p id="console"><?php echo $hesklang['requesting_location_ellipsis']; ?></p>
|
||||||
<div id="map" style="height: 300px">
|
<div id="map" style="height: 300px; display:none">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -969,7 +969,7 @@ if ( ! isset($_SESSION['c_category']) && ! $hesk_settings['select_cat'])
|
|||||||
<label for="location" class="col-md-3 control-label"><?php echo $hesklang['location_colon']; ?></label>
|
<label for="location" class="col-md-3 control-label"><?php echo $hesklang['location_colon']; ?></label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<p id="console"><?php echo $hesklang['requesting_location_ellipsis']; ?></p>
|
<p id="console"><?php echo $hesklang['requesting_location_ellipsis']; ?></p>
|
||||||
<div id="map" style="height: 300px">
|
<div id="map" style="height: 300px; display:none">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -113,9 +113,9 @@ function requestUserLocation(yourLocationText, unableToDetermineText) {
|
|||||||
var longitude = position.coords.longitude;
|
var longitude = position.coords.longitude;
|
||||||
setLatLon(latitude, longitude);
|
setLatLon(latitude, longitude);
|
||||||
$('#console').hide();
|
$('#console').hide();
|
||||||
|
$('#map').show();
|
||||||
initializeMapForCustomer(latitude, longitude, yourLocationText);
|
initializeMapForCustomer(latitude, longitude, yourLocationText);
|
||||||
}, function(error) {
|
}, function(error) {
|
||||||
$('#map').hide();
|
|
||||||
$('#console').text(unableToDetermineText).show();
|
$('#console').text(unableToDetermineText).show();
|
||||||
switch(error.code) {
|
switch(error.code) {
|
||||||
case error.PERMISSION_DENIED:
|
case error.PERMISSION_DENIED:
|
||||||
@ -133,7 +133,6 @@ function requestUserLocation(yourLocationText, unableToDetermineText) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$('#map').hide();
|
|
||||||
$('#console').text(unableToDetermineText).show();
|
$('#console').text(unableToDetermineText).show();
|
||||||
setLatLon('E-5','E-5');
|
setLatLon('E-5','E-5');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user