growlyflash 0.8.3.1 → 0.8.4.0
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: 81283e4f502073ecbb1484707f9ff26a4fa2e00a
|
4
|
+
data.tar.gz: fdf59b0f53b3dc9eb293d0af392b3e9ceb276552
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 542e350891e8e584f7dfe99cf9e4cd240b17e7cff7fb377041cbc0ce5e7bbcfc1866c6a3d4aadfc1c19be773f3feff8886846aec449577b37ff0005155ad3fac
|
7
|
+
data.tar.gz: 69f5b86aadac5c245755fc11f465e757d524c918fc4915d710aee1ee1010d3688642a479e19053188dc178ca20f98ea33b2ab6f61c84a07c9a439bf8b321836e
|
data/README.md
CHANGED
@@ -19,16 +19,6 @@ 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
|
-
|
32
22
|
@DISMISS = """<button type="close" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>"""
|
33
23
|
|
34
24
|
_titleize = (s) -> s.replace /^./, (m) -> do m.toUpperCase
|
@@ -85,9 +75,18 @@ class Growlyflash
|
|
85
75
|
css.marginLeft = "-#{@el.outerWidth() / 2}px" if @opts.align is 'center'
|
86
76
|
css
|
87
77
|
|
88
|
-
|
78
|
+
@alert = (flash, options = {}) ->
|
79
|
+
options = $.extend(on, {}, Growlyflash.defaults, type: flash.type, options)
|
80
|
+
alert = new Growlyflash.Alert(flash, options)
|
81
|
+
if flash instanceof Growlyflash.FlashStruct then flash else alert
|
89
82
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
83
|
+
@build_shorthands = ->
|
84
|
+
for type, name of @KEY_MAPPING
|
85
|
+
Growlyflash[type] ?= (msg) ->
|
86
|
+
Growlyflash.alert(new Growlyflash.FlashStruct(msg, type))
|
87
|
+
if name isnt type
|
88
|
+
Growlyflash[name] ?= Growlyflash[type]
|
89
|
+
return
|
90
|
+
|
91
|
+
window.Growlyflash = Growlyflash
|
92
|
+
jQuery.growlyflash = Growlyflash.alert
|
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.4.0
|
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:
|
11
|
+
date: 2016-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.5.1
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: Popup ActionDispatch::Flash within Bootstrap alert in Rails app like a growl
|