]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/menu.js
Use L.OSM tile classes
[rails.git] / app / assets / javascripts / menu.js
index 595b153986f3e102424bccec97db812eb7bde3a3..a01fc39cc68bbfe86f85f79a0e786a4c8f77481c 100644 (file)
@@ -34,14 +34,16 @@ function createMenu(anchorid, menuid, align) {
   }
 
   $arrow.click(function(e) {
-    e.stopPropagation();
-    e.preventDefault();
-    if ($menu.is(":visible")) {
-      $menu.hide();
-      $page.off("click", hide);
-    } else {
-      openMenu($anchor, $menu.show(), align);
-      $page.on("click", hide);
+    if ($anchor.is(":not(.disabled)")) {
+      e.stopPropagation();
+      e.preventDefault();
+      if ($menu.is(":visible")) {
+        $menu.hide();
+        $page.off("click", hide);
+      } else {
+        openMenu($anchor, $menu.show(), align);
+        $page.on("click", hide);
+      }
     }
   });
 }