Don't add note when disabled
[rails.git] / 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();
 
+    if ($(this).hasClass('disabled')) return;
+
     OSM.route('/new_note');
   });