glow 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/glow/version.rb +1 -1
- data/vendor/assets/javascripts/glow.js +28 -0
- metadata +9 -8
data/lib/glow/version.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
(function() {
|
2
|
+
window.Glow = {
|
3
|
+
flash: function(type, message) {
|
4
|
+
return $(document).trigger('glow:flash', {
|
5
|
+
type: type,
|
6
|
+
message: message
|
7
|
+
});
|
8
|
+
}
|
9
|
+
};
|
10
|
+
$(document).ajaxComplete(function(evt, xhr, options) {
|
11
|
+
var message, type;
|
12
|
+
if (type = xhr.getResponseHeader('X-Message-Type') && (message = xhr.getResponseHeader('X-Message'))) {
|
13
|
+
return Glow.flash(type, message);
|
14
|
+
}
|
15
|
+
});
|
16
|
+
window.Flash = {
|
17
|
+
fire: Glow.flash,
|
18
|
+
success: function(message) {
|
19
|
+
return Glow.flash('success', message);
|
20
|
+
},
|
21
|
+
notice: function(message) {
|
22
|
+
return Glow.flash('notice', message);
|
23
|
+
},
|
24
|
+
error: function(message) {
|
25
|
+
return Glow.flash('error', message);
|
26
|
+
}
|
27
|
+
};
|
28
|
+
}).call(this);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-09-
|
13
|
+
date: 2011-09-26 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
17
|
-
requirement: &
|
17
|
+
requirement: &70163950694700 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -25,10 +25,10 @@ dependencies:
|
|
25
25
|
version: 3.2.0
|
26
26
|
type: :runtime
|
27
27
|
prerelease: false
|
28
|
-
version_requirements: *
|
28
|
+
version_requirements: *70163950694700
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: jquery-rails
|
31
|
-
requirement: &
|
31
|
+
requirement: &70163950693680 !ruby/object:Gem::Requirement
|
32
32
|
none: false
|
33
33
|
requirements:
|
34
34
|
- - ! '>='
|
@@ -36,7 +36,7 @@ dependencies:
|
|
36
36
|
version: '0'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
|
-
version_requirements: *
|
39
|
+
version_requirements: *70163950693680
|
40
40
|
description: ! ' Handles Flash messages in Javascript for Rails xhr-responses.
|
41
41
|
Fires a dom event when flash messages are present.
|
42
42
|
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- lib/glow/version.rb
|
57
57
|
- lib/glow.rb
|
58
58
|
- lib/tasks/glow_tasks.rake
|
59
|
+
- vendor/assets/javascripts/glow.js
|
59
60
|
- MIT-LICENSE
|
60
61
|
- Rakefile
|
61
62
|
- README.md
|
@@ -162,7 +163,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
162
163
|
version: '0'
|
163
164
|
segments:
|
164
165
|
- 0
|
165
|
-
hash:
|
166
|
+
hash: -935168484040291410
|
166
167
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
168
|
none: false
|
168
169
|
requirements:
|
@@ -171,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
172
|
version: '0'
|
172
173
|
segments:
|
173
174
|
- 0
|
174
|
-
hash:
|
175
|
+
hash: -935168484040291410
|
175
176
|
requirements: []
|
176
177
|
rubyforge_project:
|
177
178
|
rubygems_version: 1.8.9
|