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');
|
||||
$.post(url, req).done(function (response) {
|
||||
clear();
|
||||
if ($('#clearbeforeload').is(':checked')){
|
||||
clear();
|
||||
}
|
||||
if (response.gpx === ''){
|
||||
alert('The file does not exist or it is not a gpx');
|
||||
}
|
||||
|
|
|
@ -25,7 +25,12 @@ p($_['gpxedit_version']);
|
|||
<hr/>
|
||||
<h2 id="loadtitle">Load <b id="loadoptiontoggle"><i class="fa fa-expand"></i></b></h2>
|
||||
<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>
|
||||
<hr/>
|
||||
|
|
Loading…
Reference in New Issue