midas-flash_growler 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.
data/Manifest.txt
CHANGED
@@ -14,6 +14,7 @@ rails_generators/flash_growler_assets/templates/error.png
|
|
14
14
|
rails_generators/flash_growler_assets/templates/guilded.flash_growler.js
|
15
15
|
rails_generators/flash_growler_assets/templates/info.png
|
16
16
|
rails_generators/flash_growler_assets/templates/jquery-growler-0.1.js
|
17
|
+
rails_generators/flash_growler_assets/templates/jquery-growler-0.1.min.js
|
17
18
|
script/console
|
18
19
|
script/destroy
|
19
20
|
script/generate
|
data/README.rdoc
CHANGED
@@ -1,32 +1,63 @@
|
|
1
1
|
= flash_growler
|
2
2
|
|
3
|
-
|
3
|
+
http://github.com/midas/flash_growler/tree/master
|
4
4
|
|
5
5
|
== DESCRIPTION:
|
6
6
|
|
7
|
-
A Guilded component that displays Rails flash messages in an
|
7
|
+
A Guilded (http://github.com/midas/guilded/tree/master) component that displays Rails flash messages in an
|
8
|
+
interface similar to OS/X's growler.
|
8
9
|
|
9
|
-
== FEATURES
|
10
|
+
== FEATURES:
|
10
11
|
|
12
|
+
Looks for flash messages in flash[:error], flash[:warning] and flash[:notice] and displays a message that will
|
13
|
+
slide out of view if JavaScript is enabled.
|
11
14
|
|
12
15
|
|
13
|
-
==
|
16
|
+
== INSTALL:
|
14
17
|
|
18
|
+
sudo gem install midas-flash_growler
|
15
19
|
|
16
20
|
|
17
|
-
==
|
21
|
+
== USE:
|
18
22
|
|
19
|
-
|
23
|
+
Include the gems in your Rails project:
|
20
24
|
|
21
|
-
|
25
|
+
config.gem 'midas-guilded', :version => '0.0.5', :lib => 'guilded', :source => 'http://gems.github.com'
|
26
|
+
config.gem 'midas-flash_growler', :version => '1.0.2', :lib => 'flash_growler', :source => 'http://gems.github.com'
|
27
|
+
|
28
|
+
Run generator to create the CSS and JavaScript assets:
|
29
|
+
|
30
|
+
script/generate flash_growler_assets
|
31
|
+
|
32
|
+
Call the flash growler helper somewhere in your view(s). I usually call it in the application layout (or another layout):
|
33
|
+
|
34
|
+
<%= g_flash_growler :id => 'growler', :position => 'bottom' %>
|
35
|
+
|
36
|
+
Also, as with all Guilded components, a call to the apply behavior helper. It also makes the most sense to do this
|
37
|
+
in your layout(s):
|
38
|
+
|
39
|
+
<%= g_apply_behavior %>
|
40
|
+
|
41
|
+
|
42
|
+
== OPTIONS:
|
43
|
+
|
44
|
+
* :position - 'top' to display the message at the top of the browser or 'bottom' to display message at the bottom (defaults to bottom).
|
45
|
+
* :delay - Number of milliseconds to display the message before starting the slide out of view (defaults to 4000 ms).
|
46
|
+
* :speed - Number of milliseconds to animate the slide out of view (defaults to 1000 ms).
|
47
|
+
|
48
|
+
|
49
|
+
== REQUIREMENTS:
|
22
50
|
|
51
|
+
* midas-guilded >= 0.0.5
|
52
|
+
* jQuery 1.3.2 (included with midas-guilded)
|
53
|
+
* jquery-growler-0.1.js (included with midas-guilded)
|
23
54
|
|
24
55
|
|
25
56
|
== LICENSE:
|
26
57
|
|
27
58
|
(The MIT License)
|
28
59
|
|
29
|
-
Copyright (c) 2009
|
60
|
+
Copyright (c) 2009 C. Jason Harrelson (midas)
|
30
61
|
|
31
62
|
Permission is hereby granted, free of charge, to any person obtaining
|
32
63
|
a copy of this software and associated documentation files (the
|
data/flash_growler.gemspec
CHANGED
data/lib/flash_growler.rb
CHANGED
@@ -8,6 +8,7 @@ class FlashGrowlerAssetsGenerator < Rails::Generator::Base
|
|
8
8
|
m.file "guilded.flash_growler.js", "public/javascripts/guilded.flash_growler.js"
|
9
9
|
m.directory "public/javascripts/jquery"
|
10
10
|
m.file 'jquery-growler-0.1.js', 'public/javascripts/jquery/jquery-growler-0.1.js'
|
11
|
+
m.file 'jquery-growler-0.1.js', 'public/javascripts/jquery/jquery-growler-0.1.min.js'
|
11
12
|
m.directory "public/stylesheets/guilded"
|
12
13
|
m.directory "public/stylesheets/guilded/flash_growler"
|
13
14
|
m.directory "public/stylesheets/guilded/flash_growler/default"
|
@@ -1,3 +1,18 @@
|
|
1
|
+
/*
|
2
|
+
Copyright © 2009 C. Jason Harrelson (midas)
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
|
5
|
+
files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy,
|
6
|
+
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
|
7
|
+
is furnished to do so, subject to the following conditions:
|
8
|
+
|
9
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
10
|
+
|
11
|
+
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
12
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
13
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
14
|
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
15
|
+
*/
|
1
16
|
(function($){
|
2
17
|
|
3
18
|
jQuery.fn.growl = function( opts )
|