Add option to delete all nogos to clear route dialog

This commit is contained in:
Norbert Renner 2018-06-27 09:50:58 +02:00
parent ce32c0da71
commit 1a078ae630

View file

@ -74,12 +74,22 @@
deleteButton = L.easyButton(
'fa-trash-o',
function () {
bootbox.confirm({
bootbox.prompt({
size: 'small',
message: "Delete route?",
title: "Delete route?",
inputType: 'checkbox',
inputOptions: [
{
text: '  also delete all no-go areas',
value: 'nogo'
}
],
callback: function(result) {
if (result) {
if (result !== null) {
routing.clear();
if (result.length > 0 && result[0] === 'nogo') {
nogos.clear();
}
onUpdate();
urlHash.onMapMove();
}