leather 0.2.26 → 0.2.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/leather/off_canvas.js.coffee +9 -6
- data/lib/leather/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d52c34a7d5d6e89e4f047f89ae3115443707447c
|
4
|
+
data.tar.gz: 66811bb812b8e86356a2432fed22044d955f0644
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e26d8f086cc956d26a6743f94f6bf306a94a95d9754f326451071b7a01e2890bfe991b9cdf27c3c62ff357dcf70abee64e64940c40c4440f39c77b93e49de119
|
7
|
+
data.tar.gz: 7906d742761aec5029111fd69522f29aea24181b217f6ab6acb80f8b8bb576f2bc975fe59ec4da926abb2baf58163f52f729ee3e420a4b64555e273449951579
|
@@ -14,16 +14,19 @@ offCanvas =
|
|
14
14
|
|
15
15
|
bindEvents: ->
|
16
16
|
$(document).on 'click', '[data-toggle="off-canvas"]', (e) ->
|
17
|
-
if e.handled
|
17
|
+
if !e.handled
|
18
18
|
e.handled = offCanvas.toggle($(this), e)
|
19
19
|
|
20
20
|
$(document).on 'click touchstart', '.off-canvas-show-left, .off-canvas-show-right', (e) ->
|
21
21
|
clicked = $(e.target)
|
22
|
-
if e.handled
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
22
|
+
if !e.handled && (offCanvas.isBody(clicked)|| offCanvas.isClose(clicked))
|
23
|
+
e.handled = offCanvas.close(e)
|
24
|
+
|
25
|
+
isBody: (clicked) ->
|
26
|
+
(!clicked.hasClass("off-canvas") && clicked.parents(".off-canvas").length == 0)
|
27
|
+
|
28
|
+
isClose: (clicked) ->
|
29
|
+
(clicked.parents(".off-canvas").length && clicked.hasClass("close"))
|
27
30
|
|
28
31
|
toggle: (target, e) ->
|
29
32
|
e.stopPropagation()
|
data/lib/leather/version.rb
CHANGED