SrBuj 0.9.0alpha1 → 0.9.0alpha2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/SrBuj/rails/action_controller/helpers.rb +9 -6
- data/lib/SrBuj/version.rb +1 -1
- data/lib/assets/javascripts/SrBuj.js +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTQ4MTJlMGFjYWRiMTdiZGY1NDU1NWZiZTY2NGY4ZDI4NTk1NzY0MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZmEyNzk3YWM4N2NhY2E3YWJmMDdjZjNmMjNiYmQxZjdhMmY0OTNmMw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTcxZmI5MDUyOGZkYjNmYmI0MTBlOGY1ZTI5NWYwNGIwMWY5OGQ1ZTVmNzQ2
|
10
|
+
ODBiY2I1NzkwMmRhNGFkMjNmZjg5ZGVkMGYyYzU1YTg5MDJlOTdkMDQ2NWM1
|
11
|
+
ZjY2MDZhM2Q2NTZhZDE4OWVlMWFjMDhhMTc2YzFjYjIxN2MxNDI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDg3NWY3YmQxNjJhMmJmY2I2OTBjMDJhZTVkZmQzY2U4ZTEyYmYwMDFlOGIz
|
14
|
+
NzA5NDZhNWJmYzIxYzE1NTg4NzU1ZWMxNWVkYWU5Y2Q3YzkzODM3NzU1ODkz
|
15
|
+
MTg1YWNlY2NjODI0ODYzNzhmZjc4ZTNkZDI5MThhZDViYWYyNzE=
|
@@ -1,7 +1,12 @@
|
|
1
1
|
module SrBuj
|
2
2
|
module ActionController
|
3
3
|
module Helpers
|
4
|
-
|
4
|
+
HEADERS = { message: 'X-SRBUJ-MSG',
|
5
|
+
type: 'X-SRBUJ-TYPE',
|
6
|
+
side: 'X-SRBUJ-SIDE',
|
7
|
+
position: 'X-SRBUJ-POS',
|
8
|
+
time: 'X-SRBUJ-TIME'
|
9
|
+
}
|
5
10
|
#=> helpfull method to return redirect_to in an js way.
|
6
11
|
# use: js_redirect(to: root_path)
|
7
12
|
# use: js_redirect(reload: true)
|
@@ -24,11 +29,9 @@ module SrBuj
|
|
24
29
|
# use: js_notify (message: 'this is madness!', type: 'error', side: 'right', position: 'top', time: 2000 )
|
25
30
|
def js_notify(options = {})
|
26
31
|
if options[:message]
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
response.headers['X-SRBUJ-POS'] = options[:position].to_s if options[:position]
|
31
|
-
response.headers['X-SRBUJ-TIME'] = options[:time].to_s if options[:time]
|
32
|
+
HEADERS.each do |value, header|
|
33
|
+
response.headers[header] = options[value].to_s if options[value]
|
34
|
+
end
|
32
35
|
end
|
33
36
|
end
|
34
37
|
end
|
data/lib/SrBuj/version.rb
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
};
|
20
20
|
var SrBuj;
|
21
21
|
$.SrBuj = SrBuj = {
|
22
|
-
version: '0.9.
|
22
|
+
version: '0.9.0alpha2',
|
23
23
|
selector: '[data-remote][data-target]',
|
24
24
|
notifyHeaders: { message: 'X-SRBUJ-MSG', type: 'X-SRBUJ-TYPE', side: 'X-SRBUJ-SIDE', position: 'X-SRBUJ-POS', time: 'X-SRBUJ-TIME' },
|
25
25
|
defaults: {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: SrBuj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.0alpha2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gagoar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|