README.md in gritter-1.1.0 vs README.md in gritter-1.2.0
- old
+ new
@@ -1,10 +1,9 @@
# gritter
- version 1.1.0
+ version 1.2.0
Robin Brouwer
- montblanc
This Ruby on Rails gem allows you to easily add Growl-like notifications to your application using a jQuery plugin called 'gritter'. [Check out the demo for this plugin](http://boedesign.com/demos/gritter/).
## Note
@@ -14,11 +13,11 @@
## Installation
You can use this gem by putting the following inside your Gemfile:
- gem "gritter", "1.1.0"
+ gem "gritter", "1.2.0"
Now generate the locale for gritter:
rails g gritter:locale
@@ -32,13 +31,18 @@
And that's it!
## Changes
+Version 1.2.0 changes (02/08/2015):
+
+ - Added Rails 4 support.
+ - Added on_click support.
+
Version 1.1.0 changes (31/01/2013):
- - All gflash messages are also stored in the Rails flash messages.
+ - All gflash messages can also be stored in the Rails flash messages (optional).
- Added i18n interpolation for gflash messages.
- Added default values for the gflash messages.
- Fixed several other issues.
Version 1.0.3 changes (26/01/2013):
@@ -109,10 +113,11 @@
:sticky => true # => Allows you to make the notification sticky.
:time => 4000 # => Allows you to set the time when the notification disappears (in ms).
:class_name => "gritter" # => Allows you to set a different classname.
:before_open => "alert('Opening!');" # => Execute javascript before opening.
:after_open => "alert('Opened!');" # => Execute javascript after opening.
+:on_click => "alert('Clicked!');" # => Execute javascript on click (close button click is ignored).
:before_close => "alert('Closing!');" # => Execute javascript before closing.
:after_close => "alert('Closed!');" # => Execute javascript after closing.
:nodom_wrap => true # => Removes the DOM wrap on the produced JQuery code. Default, this argument
# is false or not present, hence you always get a DOM wrap.
```
@@ -273,11 +278,11 @@
warning: "Warning"
error: "Error"
progress: "Progress"
products: # => Controller name
create: # => Action name
- notice: "Custom notice message"
+ notice: "Custom notice message"case
It's also possible to add default gflash messages.
en:
gflash:
@@ -329,11 +334,11 @@
gflash :error => { :value => "Something went wrong.", :time => 4000 },
:warning => { :value => "Some fields weren't filled in correctly.", :time => 7000 }
render :new
end
end
-```ruby
+```
You can also use gflash directly inside the `redirect_to` method.
```ruby
def create
@@ -436,6 +441,6 @@
Many thanks to Jordan Boesch, creator of the AWESOME jQuery plugin gritter.
http://boedesign.com/blog/2009/07/11/growl-for-jquery-gritter/
Also special thanks to Liam McKay for creating the awesome icons!
-http://wefunction.com/2008/07/function-free-icon-set/
\ No newline at end of file
+http://wefunction.com/2008/07/function-free-icon-set/