]> git.openstreetmap.org Git - rails.git/commitdiff
Don't add note when disabled
authorJohn Firebaugh <john.firebaugh@gmail.com>
Wed, 13 Nov 2013 20:40:36 +0000 (12:40 -0800)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Wed, 13 Nov 2013 20:40:36 +0000 (12:40 -0800)
app/assets/javascripts/index/new_note.js.erb

index c47cb563c9ffa91abc93e71ddb23d659ee93fafb..7ac37ab728c34aa409ca056b2580ad612baa8301 100644 (file)
@@ -27,6 +27,8 @@ OSM.NewNote = function(map) {
     e.preventDefault();
     e.stopPropagation();
 
     e.preventDefault();
     e.stopPropagation();
 
+    if ($(this).hasClass('disabled')) return;
+
     OSM.route('/new_note');
   });
 
     OSM.route('/new_note');
   });