Fix accumulation of parameters in edit link
This commit is contained in:
parent
4729163aa8
commit
3946894492
1 changed files with 4 additions and 6 deletions
|
@ -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;
|
||||
if (object && editlink) {
|
||||
href += '?' + object.type + '=' + object.id;
|
||||
}
|
||||
|
||||
var query = querystring.stringify(args);
|
||||
if (query) href += '?' + query;
|
||||
|
||||
args = {
|
||||
var args = {
|
||||
lat: loc.lat,
|
||||
lon: loc.lon || loc.lng,
|
||||
zoom: zoom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue