Ignore clicks on the add note button when it is disabled
authorTom Hughes <tom@compton.nu>
Tue, 6 Aug 2013 09:40:05 +0000 (10:40 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 6 Aug 2013 09:40:05 +0000 (10:40 +0100)
app/assets/javascripts/index/notes.js.erb

index 63576c0..8972d6b 100644 (file)
@@ -223,6 +223,7 @@ function initializeNotes(map, params) {
     e.preventDefault();
     e.stopPropagation();
 
+    if (addNoteButton.hasClass("disabled")) return;
     if (addNoteButton.hasClass("active")) return;
 
     addNoteButton.removeClass("geolink").addClass("active");