From a2dfc00f27ed6fe511410142eaf6679a16aecd2e Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 8 Nov 2013 13:51:44 -0800 Subject: [PATCH] Include layers in all geolinks except edit --- app/assets/javascripts/application.js | 7 ++++--- app/views/layouts/_header.html.erb | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index f1a13132c..1cd6e224d 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -63,9 +63,10 @@ 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)); + args = querystring.parse(link.search.substring(1)), + editlink = $(link).hasClass("editlink"); - if (object && $(link).hasClass("object")) args[object.type] = object.id; + if (object && editlink) args[object.type] = object.id; var query = querystring.stringify(args); if (query) href += '?' + query; @@ -76,7 +77,7 @@ function updatelinks(loc, zoom, layers, object) { zoom: zoom }; - if (layers && $(link).hasClass("layers")) { + if (layers && !editlink) { args.layers = layers; } diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index b0631b431..1142eeb79 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -1,6 +1,6 @@

- + <%= image_tag "osm_logo.png", :alt => t('layouts.logo.alt_text'), :class => 'logo' %> <%= t 'layouts.project_name.h1' %> @@ -9,7 +9,7 @@