growlyflash 0.8.1 → 0.8.2
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: b1baad0d7665e972816a67497b48d981203b5a0b
|
4
|
+
data.tar.gz: be7f580fc858b5e03639757f3aa6ad9dc2387ccc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b6de4c99e7ea1f48055601d45802180d81a77228195a55fd78a439b2e39c9decd7424be0773d8ba510317ddd8dcf3f185e403701b55472a1e6f5ebe8af53a4e
|
7
|
+
data.tar.gz: 621a9460fd7e752ab6ed78591fed417689c451c4fa40cbb950b7316da65b1cea5257a86025ae06c280035881ba6523302605ab0d9858236e95bd0b79c4641d92
|
@@ -19,6 +19,16 @@ class Growlyflash
|
|
19
19
|
notice: 'info'
|
20
20
|
success: 'success'
|
21
21
|
|
22
|
+
_build_shorthand = (type) -> (msg) ->
|
23
|
+
$.growlyflash(new Growlyflash.FlashStruct(msg, type))
|
24
|
+
|
25
|
+
@build_shorthands = ->
|
26
|
+
for type, name of @KEY_MAPPING
|
27
|
+
Growlyflash[type] ?= _build_shorthand(type)
|
28
|
+
if name isnt type
|
29
|
+
Growlyflash[name] ?= Growlyflash[type]
|
30
|
+
return
|
31
|
+
|
22
32
|
@DISMISS = """<button type="close" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>"""
|
23
33
|
|
24
34
|
_titleize = (s) -> s.replace /^./, (m) -> do m.toUpperCase
|
@@ -61,7 +71,11 @@ class Growlyflash
|
|
61
71
|
list
|
62
72
|
|
63
73
|
show: => @el.toggleClass('in', on)
|
64
|
-
close: =>
|
74
|
+
close: =>
|
75
|
+
@el.fadeOut( =>
|
76
|
+
$(@).remove()
|
77
|
+
)
|
78
|
+
|
65
79
|
|
66
80
|
calc_top_offset: ({spacing}) ->
|
67
81
|
amount = _top(@el)
|
data/lib/growlyflash/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: growlyflash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tõnis Simo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|