From 3946894492caeedc1c7211fc439f1d8ab585cfa5 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 25 Nov 2013 13:49:47 -0800 Subject: [PATCH] Fix accumulation of parameters in edit link --- app/assets/javascripts/application.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index e5ac811e6..25d68d0ea 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -61,15 +61,13 @@ function remoteEditHandler(bbox, select) { function updatelinks(loc, zoom, layers, object) { $(".geolink").each(function(index, link) { var href = link.href.split(/[?#]/)[0], - args = querystring.parse(link.search.substring(1)), editlink = $(link).hasClass("editlink"); - if (object && editlink) args[object.type] = object.id; - - var query = querystring.stringify(args); - if (query) href += '?' + query; + if (object && editlink) { + href += '?' + object.type + '=' + object.id; + } - args = { + var args = { lat: loc.lat, lon: loc.lon || loc.lng, zoom: zoom -- 2.39.5