refs #16 cancel deletion or edition when loading or clearing the map, this avoids data losses
parent
2515fe0553
commit
814c681e60
|
@ -1430,9 +1430,17 @@
|
|||
});
|
||||
|
||||
$('button#clearButton').click(function(e) {
|
||||
var cancelButton = $('.leaflet-draw .leaflet-draw-section:nth-child(2) li:nth-child(2) a');
|
||||
if (cancelButton.is(':visible')) {
|
||||
cancelButton[0].click();
|
||||
}
|
||||
clear();
|
||||
});
|
||||
$('button#loadButton').click(function(e) {
|
||||
var cancelButton = $('.leaflet-draw .leaflet-draw-section:nth-child(2) li:nth-child(2) a');
|
||||
if (cancelButton.is(':visible')) {
|
||||
cancelButton[0].click();
|
||||
}
|
||||
if (gpxedit.currentAjax !== null) {
|
||||
gpxedit.currentAjax.abort();
|
||||
hideLoadingAnimation();
|
||||
|
|
Loading…
Reference in New Issue