From ee530d8111c92999e1a495b5a23aea9319c1309c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 4 Dec 2012 14:31:08 +0000 Subject: [PATCH 1/1] Don't try and add a note when the control is disabled --- app/assets/javascripts/index/notes.js.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/javascripts/index/notes.js.erb b/app/assets/javascripts/index/notes.js.erb index eecf91ef0..c4f758482 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -174,6 +174,8 @@ $(document).ready(function () { $("#createnoteanchor").click(function (e) { e.preventDefault(); + if ($(e.target).hasClass("disabled")) return; + map.addLayer(noteLayer); var marker = L.marker(map.getCenter(), { -- 2.43.2