easy_menu 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e6b54e73b6bcb3845ddbdda82ee48e70772f4b3
|
4
|
+
data.tar.gz: 00388681057f5b4f5c52d18023aded4bf6eaa1a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dae36512187cf5b3a021c845979c67f4fa28d44edbe8746fe897a0916403673976876f2d3b8b648e4e8b128b54df41071b221e07a9d45e795c5a263b9a66815
|
7
|
+
data.tar.gz: 6ab2608b447eab5c6ec4d478c0cff5ca27332a422f1398e566ce51bcb87d89b946532d04416b2b08a799ec70aaa98029204201d882e2362b6db5297fd06e9d8f
|
@@ -30,7 +30,8 @@ $(document).ready(function() {
|
|
30
30
|
mbc.toggleClass('open');
|
31
31
|
});
|
32
32
|
|
33
|
-
|
33
|
+
// Close the menu if the user clicked outside
|
34
|
+
$(document).click(function(event){
|
34
35
|
if ($(event.target).closest('.menu_bar_content.with_menu .menu_bar_item').length > 0) { return } // Don't close the menus if the click came from a menu
|
35
36
|
$(menuBarRootSelector + '.menu_bar_content.with_menu.open').removeClass('open');
|
36
37
|
});
|
@@ -27,7 +27,9 @@ $(document).observe('dom:loaded', function() {
|
|
27
27
|
$$('.menu_bar_content.with_menu').without(mbc).invoke('removeClassName', 'open');
|
28
28
|
mbc.toggleClassName('open');
|
29
29
|
});
|
30
|
-
|
30
|
+
|
31
|
+
// Close the menu if the user clicked outside
|
32
|
+
Element.observe(document, 'click', function(event){
|
31
33
|
if (event.findElement('.menu_bar_content.with_menu .menu_bar_item')){ return } // Don't close the menus if the click came from a menu trigger
|
32
34
|
$$(menuBarRootSelector + '.menu_bar_content.with_menu.open').invoke('removeClassName', 'open');
|
33
35
|
});
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_menu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Jakobsen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-01-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|