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