Open new tab/window for "report a problem" link
authorFlorian Schäfer <florian@schaeferban.de>
Fri, 15 Jan 2016 20:56:41 +0000 (21:56 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 9 Mar 2016 19:23:03 +0000 (19:23 +0000)
This avoids closing whatever site the user was looking at when they
spotted he problem, and avoid problems when the embedded map is part
of an iframe as the problem report page denies embedding.

app/assets/javascripts/embed.js.erb

index ca5594459101720b3e95d297c40411e9a21ba1b8..5f8b253188240801a303cc62d7afa1000fe6bf82 100644 (file)
@@ -51,7 +51,7 @@ window.onload = function () {
 L.Control.OSMReportAProblem = L.Control.Attribution.extend({
   options: {
     position: 'bottomright',
-    prefix: '<a href="http://www.openstreetmap.org/fixthemap?lat={x}&lon={y}&zoom={z}">Report a problem</a>'
+    prefix: '<a href="http://www.openstreetmap.org/fixthemap?lat={x}&lon={y}&zoom={z}" target="_blank">Report a problem</a>'
   },
 
   onAdd: function (map) {