From: Tom Hughes Date: Sun, 3 Feb 2013 16:18:06 +0000 (+0000) Subject: Disable the "add note" link while a note is being added X-Git-Tag: live~5616^2~34 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/2da3b85a7a188dde5ef89538ea4ceb4dea80dbe0 Disable the "add note" link while a note is being added --- diff --git a/app/assets/javascripts/index/notes.js.erb b/app/assets/javascripts/index/notes.js.erb index 433740129..9be29726a 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -182,6 +182,8 @@ $(document).ready(function () { if ($(e.target).hasClass("disabled")) return; + $(e.target).removeClass("geolink").addClass("disabled"); + map.addLayer(noteLayer); var mapSize = map.getSize(); @@ -217,6 +219,8 @@ $(document).ready(function () { $(".leaflet-popup-close-button").on("click.close", function (e) { map.removeLayer(marker); + + $("#createnoteanchor").removeClass("disabled").addClass("geolink"); }); marker.on("dragend", function (e) {