Commit 20d3cade authored by Clouard Regis's avatar Clouard Regis
Browse files

Fix bug GPX import

parent c1f6bb78
......@@ -150,16 +150,16 @@
displayedFormat = courseFormat;
clearTimeSheet();
clearTracks();
clearDownloadButton(document.getElementById("files-tab"));
clearDownloadButton(document.getElementById("export-tab"));
}
gpxDictionary[element.value] = addTrack(event, map, gpxTrace);
addTimeSheet(element.innerHTML, punchedPoints, splitTimes, distances, paces);
buttonDictionary[element.value] = addDownloadButton(event, element.innerHTML, gpxTrace, document.getElementById("files-tab"));
buttonDictionary[element.value] = addDownloadButton(event, element.innerHTML, gpxTrace, document.getElementById("export-tab"));
} else {
let gpxLayer = gpxDictionary[element.value][0];
removeTrack(event, map, gpxLayer);
removeTimeSheet(event, element.innerHTML);
removeDownloadButton(document.getElementById("files-tab"), buttonDictionary[element.value]);
removeDownloadButton(document.getElementById("export-tab"), buttonDictionary[element.value]);
delete gpxDictionary[element.value];
delete buttonDictionary[element.value];
}
......@@ -196,20 +196,20 @@
<button class="tab-links" onclick="openTab('tab1', 'map-tab')" id="tab1">{% trans %}track.map{% endtrans %}</button>
<button class="tab-links" onclick="openTab('tab2', 'times-tab')" id="tab2">{% trans %}track.time{% endtrans %}</button>
<button class="tab-links" onclick="openTab('tab3', 'import-tab')" id="tab3">{% trans %}track.import{% endtrans %}</button>
<button class="tab-links" onclick="openTab('tab4', 'files-tab')" id="tab4">{% trans %}track.export{% endtrans %}</button>
<button class="tab-links" onclick="openTab('tab4', 'export-tab')" id="tab4">{% trans %}track.export{% endtrans %}</button>
</div>
<!-- Tab content -->
<div id="map-tab" class="tab-content">
<button class="btn btn-primary" id="show-map" onclick="switchMapDisplay(overlay, 100)" style="position: absolute; z-index: 9999; top: 60px; right: 35px">{% trans %} course.description.mask.map {% endtrans %}</button>
<button class="btn btn-primary" id="hide-map" onclick="switchMapDisplay(overlay, 0)" style="display:none; position: absolute; z-index: 9999; top: 60px; right: 35px">{% trans %} course.description.show.map {% endtrans %}</button>
<button class="btn btn-primary" id="show-map" onclick="switchMapDisplay(overlay, 100)" style="position: absolute; z-index: 9999; top: 60px; right: 35px">{% trans %}course.description.mask.map{% endtrans %}</button>
<button class="btn btn-primary" id="hide-map" onclick="switchMapDisplay(overlay, 0)" style="display:none; position: absolute; z-index: 9999; top: 60px; right: 35px">{% trans %}course.description.show.map{% endtrans %}</button>
<div id="map-div" style="min-width: 300px"></div>
<p id="map-not-found" class="alert alert-danger" style="display : none">{% trans %}course.error.map.not.found{% endtrans %}</p>
</div>
<div id="times-tab" class="tab-content">
<div id="time-sheet-div" style="min-width: 300px"></div>
</div>
<div id="files-tab" class="tab-content" style="min-width: 300px">
<div id="export-tab" class="tab-content" style="min-width: 300px">
<div class="panel-heading">
<h3 class="panel-title">{% trans %}track.export.title{% endtrans %}</h3>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment