bootstrap_flash_messages 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +30 -1
- data/lib/bootstrap_flash_messages/helpers.rb +2 -1
- data/lib/bootstrap_flash_messages/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4643ca30b2f8ac1ec59a38593f04364c488edc5a
|
4
|
+
data.tar.gz: 717b08dee3c05532cbb3beed81bf3d03dd8c87f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ac645eb19ce777de93842bbcde9b4d138cf3bf9f9d4b12aa7d9b4ee4c83d41f58647f0f78e8651a4a4579173aa059ef425a5628653dc2dd2177ac9f63d787e0
|
7
|
+
data.tar.gz: 860c18a1ba37fb39355ec2a533b7175269cb78fca2cb915754c8ed1397da560512354ff74f9cee8e795fa3b3179b4b62b67de74b91aa5a8f6f2d043535eed90e
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# bootstrap_flash_messages
|
2
2
|
|
3
|
-
version 1.0.
|
3
|
+
version 1.0.2
|
4
4
|
Robin Brouwer
|
5
5
|
|
6
6
|
Bootstrap alerts and Rails flash messages combined in one easy-to-use gem.
|
@@ -23,6 +23,14 @@ And that's it!
|
|
23
23
|
|
24
24
|
## Changes
|
25
25
|
|
26
|
+
Version 1.0.2 changes (05/08/2015):
|
27
|
+
|
28
|
+
- Added :fade_in.
|
29
|
+
|
30
|
+
Version 1.0.1 changes (02/08/2015):
|
31
|
+
|
32
|
+
- Made 'info' the default class.
|
33
|
+
|
26
34
|
Version 1.0.0 changes (31/01/2014):
|
27
35
|
|
28
36
|
- Added Boostrap 3 support.
|
@@ -160,6 +168,27 @@ If you'd like for the flash message to fade out when you click on the close icon
|
|
160
168
|
|
161
169
|
<%= flash_messages(:close, :fade) %>
|
162
170
|
|
171
|
+
If you'd like for the flash message to also fade in, you can pass in the `:fade_in` option.
|
172
|
+
|
173
|
+
<%= flash_messages(:close, :fade, :fade_in) %>
|
174
|
+
|
175
|
+
# Also add something like this to application.js:
|
176
|
+
window.setTimeout(function() {
|
177
|
+
$(".alert").addClass("in");
|
178
|
+
}, 1000);
|
179
|
+
|
180
|
+
# If you didn't add the "Component Animations" to your Bootstrap configuration, add this to application.css:
|
181
|
+
.alert.fade {
|
182
|
+
opacity: 0;
|
183
|
+
-webkit-transition: opacity 0.15s linear;
|
184
|
+
-moz-transition: opacity 0.15s linear;
|
185
|
+
-o-transition: opacity 0.15s linear;
|
186
|
+
transition: opacity 0.15s linear;
|
187
|
+
}
|
188
|
+
.alert.fade.in {
|
189
|
+
opacity: 1;
|
190
|
+
}
|
191
|
+
|
163
192
|
Want a heading? Add `:heading`. The headings inside flash.en.yml are used for the headings.
|
164
193
|
|
165
194
|
<%= flash_messages(:close, :heading) %>
|
@@ -8,6 +8,7 @@ module BootstrapFlashMessages
|
|
8
8
|
unescape_html = args.include?(:html)
|
9
9
|
simple_format = args.include?(:simple_format)
|
10
10
|
fade = args.include?(:fade)
|
11
|
+
fade_in = args.include?(:fade_in)
|
11
12
|
|
12
13
|
messages = []
|
13
14
|
flash.each do |key, value|
|
@@ -26,7 +27,7 @@ module BootstrapFlashMessages
|
|
26
27
|
value = simple_format(value) if simple_format
|
27
28
|
value = raw(value) if unescape_html
|
28
29
|
|
29
|
-
messages << content_tag(:div, close + heading + " " + value, :class => "alert alert-#{BootstrapFlashMessages.alert_class_mapping(key)}#{' alert-dismissable' if show_close}#{" fade in" if fade}")
|
30
|
+
messages << content_tag(:div, close + heading + " " + value, :class => "alert alert-#{BootstrapFlashMessages.alert_class_mapping(key)}#{' alert-dismissable' if show_close}#{" fade#{" in" unless fade_in}" if fade || fade_in}")
|
30
31
|
end
|
31
32
|
|
32
33
|
raw(messages.join)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap_flash_messages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robin Brouwer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Bootstrap alerts and Rails flash messages combined in one easy-to-use
|
14
14
|
gem.
|