add option to toggle clear map before loading
parent
7f323b030c
commit
39b2eea922
|
@ -461,7 +461,9 @@ function loadFile(file){
|
||||||
}
|
}
|
||||||
var url = OC.generateUrl('/apps/gpxedit/getgpx');
|
var url = OC.generateUrl('/apps/gpxedit/getgpx');
|
||||||
$.post(url, req).done(function (response) {
|
$.post(url, req).done(function (response) {
|
||||||
|
if ($('#clearbeforeload').is(':checked')){
|
||||||
clear();
|
clear();
|
||||||
|
}
|
||||||
if (response.gpx === ''){
|
if (response.gpx === ''){
|
||||||
alert('The file does not exist or it is not a gpx');
|
alert('The file does not exist or it is not a gpx');
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,12 @@ p($_['gpxedit_version']);
|
||||||
<hr/>
|
<hr/>
|
||||||
<h2 id="loadtitle">Load <b id="loadoptiontoggle"><i class="fa fa-expand"></i></b></h2>
|
<h2 id="loadtitle">Load <b id="loadoptiontoggle"><i class="fa fa-expand"></i></b></h2>
|
||||||
<div id="loaddiv" style="display:none;">
|
<div id="loaddiv" style="display:none;">
|
||||||
<p>Select a gpx file to load it on the map</p><br/>
|
<p>Select a gpx file to load it on the map</p>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="clearbeforeload"></input>
|
||||||
|
<label for="clearbeforeload">Clear map before loading</label>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
<div id="loadtree"></div>
|
<div id="loadtree"></div>
|
||||||
</div>
|
</div>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
Loading…
Reference in New Issue