diff --git a/js/index.js b/js/index.js index 666fa7e..200c8e2 100644 --- a/js/index.js +++ b/js/index.js @@ -94,18 +94,25 @@ function() { bootbox.prompt({ size: 'small', - title: i18next.t('map.delete-route'), + title: i18next.t('map.delete-route-nogos'), inputType: 'checkbox', inputOptions: [ + { + text: i18next.t('map.delete-route'), + value: 'route' + }, { text: i18next.t('map.delete-nogo-areas'), value: 'nogo' } ], + value: ['route'], callback: function(result) { if (result !== null) { - routing.clear(); - if (result.length > 0 && result[0] === 'nogo') { + if (result.indexOf('route') !== -1) { + routing.clear(); + } + if (result.indexOf('nogo') !== -1) { nogos.clear(); } onUpdate(); @@ -114,7 +121,7 @@ } }); }, - i18next.t('map.clear-route') + i18next.t('map.delete-route-nogos') ); function updateRoute(evt) { diff --git a/locales/en.json b/locales/en.json index 77f0ea3..95eee34 100644 --- a/locales/en.json +++ b/locales/en.json @@ -76,12 +76,12 @@ "map": { "attribution-osm-long": "OpenStreetMap contributors", "attribution-osm-short": "OpenStreetMap", - "clear-route": "Clear route", "copyright": "Copyright", "cycling": "Cycling", "delete-last-point": "Delete last point", - "delete-nogo-areas": "  also delete all no-go areas", - "delete-route": "Delete route?", + "delete-nogo-areas": "Delete all no-go areas", + "delete-route": "Delete route", + "delete-route-nogos": "Delete route and nogos", "draw-route-start": "Draw route (D key)", "draw-route-stop": "Stop drawing route (ESC key)", "hikebike-hillshading": "Hillshading",