corn_starch 1.9.7 → 1.9.8
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: ea6d017af58b1134e259d02b6e5426acf89815d9
|
4
|
+
data.tar.gz: dbe767e5ae4428c2cd0c247e271b3de8eeb65fba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c16077b7ad23540024892d4f577cf3da9c04426d32d195603c55623efccc422a3048aa4e9a8cbf33c90a13bdb3a321571cd42e8d87177daffd3f5737a136c5cf
|
7
|
+
data.tar.gz: 1ca1d2b5d1ea53f75a1c180a115f5c5a6619107558cddbb8beac6af2fcbe41c8ae580ca4c2db857b4c8afed789c80e8f37b77345e713041c87787c04a5d635fb
|
@@ -3,19 +3,28 @@
|
|
3
3
|
|
4
4
|
# Modal JS
|
5
5
|
|
6
|
+
# Currently Displayed Modal
|
7
|
+
window.modal_displayed = null
|
8
|
+
|
6
9
|
# Show Modal
|
7
10
|
window.modal_show = (modal) ->
|
8
11
|
e = $("#modal-#{modal}")
|
9
12
|
onshow = e.attr 'modal-onshow'
|
10
13
|
window[onshow]() if onshow? && onshow != ''
|
14
|
+
modal_displayed = modal
|
11
15
|
e.show 'fast'
|
12
16
|
|
13
17
|
# Hide Modal
|
14
18
|
window.modal_hide = (modal) ->
|
19
|
+
modal_displayed = null
|
15
20
|
$("#modal-#{modal}").hide 'fast'
|
16
21
|
|
22
|
+
# Is Modal Visible
|
23
|
+
window.modal_visible = (modal) ->
|
24
|
+
$("#modal-#{modal}").is ':visible'
|
25
|
+
|
17
26
|
# Init Modal
|
18
|
-
window.
|
27
|
+
window.modal_init_modal = (modal) ->
|
19
28
|
|
20
29
|
# Wire up Quick Hide (Click Outside Modal)
|
21
30
|
if $("#modal-#{modal}").length
|
@@ -30,4 +39,20 @@ window.modal_init = (modal) ->
|
|
30
39
|
# Wire up Hide Button
|
31
40
|
if $("#modal-#{modal}-btn-hide").length
|
32
41
|
$("#modal-#{modal}-btn-hide").click ->
|
33
|
-
modal_hide modal
|
42
|
+
modal_hide modal
|
43
|
+
|
44
|
+
# Handle Key Presses
|
45
|
+
window.modal_handle_keyup = (e) ->
|
46
|
+
|
47
|
+
# Check Modal Visible
|
48
|
+
return if modal_displayed == null
|
49
|
+
|
50
|
+
# Hide Modal
|
51
|
+
modal_hide modal_displayed if e.which == 27
|
52
|
+
|
53
|
+
|
54
|
+
# Init Modal System
|
55
|
+
window.modal_init = ->
|
56
|
+
|
57
|
+
# Handle Key Presses
|
58
|
+
$(document).keyup modal_handle_keyup
|
data/lib/corn_starch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: corn_starch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eresse
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|