rails_admin_toggleable 0.4.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.ruby-version +1 -1
- data/Gemfile +2 -0
- data/Gemfile.lock +166 -0
- data/lib/rails_admin_toggleable/action.rb +3 -3
- data/lib/rails_admin_toggleable/field.rb +5 -5
- data/lib/rails_admin_toggleable/version.rb +1 -1
- data/rails_admin_toggleable.gemspec +4 -1
- metadata +22 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3310468953ecb98451944c810ec7690a45db3acc
|
4
|
+
data.tar.gz: 4869de62fdc502137594f5c3a7186e23947eac48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d75473c403f29caccc5e958086551e55d22ca4bf38c2210987db64706cb5c17f8c7dc2451418fa2e797afb8593b818d3c3e270fe01aa91120da357239f831ba6
|
7
|
+
data.tar.gz: 205a93ae8caf6bbdf988052bde10a5fcb20c2e222ea07126bf50574616d81d818a90a2d406eb00c652e0b662eab496506e7c5308dc37bd08b78977c3b4f5fdae
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.5
|
2
2
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git://github.com/sferik/rails_admin.git
|
3
|
+
revision: f8f3e026960272d00cae50b2d7293e25d849cc02
|
4
|
+
specs:
|
5
|
+
rails_admin (0.6.6)
|
6
|
+
builder (~> 3.1)
|
7
|
+
coffee-rails (~> 4.0)
|
8
|
+
font-awesome-rails (>= 3.0, < 5)
|
9
|
+
haml (~> 4.0)
|
10
|
+
jquery-rails (>= 3.0, < 5)
|
11
|
+
jquery-ui-rails (~> 5.0)
|
12
|
+
kaminari (~> 0.14)
|
13
|
+
nested_form (~> 0.3)
|
14
|
+
rack-pjax (~> 0.7)
|
15
|
+
rails (~> 4.0)
|
16
|
+
remotipart (~> 1.0)
|
17
|
+
safe_yaml (~> 1.0)
|
18
|
+
sass-rails (>= 4.0, < 6)
|
19
|
+
|
20
|
+
PATH
|
21
|
+
remote: .
|
22
|
+
specs:
|
23
|
+
rails_admin_toggleable (0.5.0)
|
24
|
+
rails_admin (~> 0.6.6)
|
25
|
+
|
26
|
+
GEM
|
27
|
+
remote: https://rubygems.org/
|
28
|
+
specs:
|
29
|
+
actionmailer (4.2.0)
|
30
|
+
actionpack (= 4.2.0)
|
31
|
+
actionview (= 4.2.0)
|
32
|
+
activejob (= 4.2.0)
|
33
|
+
mail (~> 2.5, >= 2.5.4)
|
34
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
35
|
+
actionpack (4.2.0)
|
36
|
+
actionview (= 4.2.0)
|
37
|
+
activesupport (= 4.2.0)
|
38
|
+
rack (~> 1.6.0)
|
39
|
+
rack-test (~> 0.6.2)
|
40
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
41
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
42
|
+
actionview (4.2.0)
|
43
|
+
activesupport (= 4.2.0)
|
44
|
+
builder (~> 3.1)
|
45
|
+
erubis (~> 2.7.0)
|
46
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
47
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
48
|
+
activejob (4.2.0)
|
49
|
+
activesupport (= 4.2.0)
|
50
|
+
globalid (>= 0.3.0)
|
51
|
+
activemodel (4.2.0)
|
52
|
+
activesupport (= 4.2.0)
|
53
|
+
builder (~> 3.1)
|
54
|
+
activerecord (4.2.0)
|
55
|
+
activemodel (= 4.2.0)
|
56
|
+
activesupport (= 4.2.0)
|
57
|
+
arel (~> 6.0)
|
58
|
+
activesupport (4.2.0)
|
59
|
+
i18n (~> 0.7)
|
60
|
+
json (~> 1.7, >= 1.7.7)
|
61
|
+
minitest (~> 5.1)
|
62
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
63
|
+
tzinfo (~> 1.1)
|
64
|
+
arel (6.0.0)
|
65
|
+
builder (3.2.2)
|
66
|
+
coffee-rails (4.1.0)
|
67
|
+
coffee-script (>= 2.2.0)
|
68
|
+
railties (>= 4.0.0, < 5.0)
|
69
|
+
coffee-script (2.3.0)
|
70
|
+
coffee-script-source
|
71
|
+
execjs
|
72
|
+
coffee-script-source (1.8.0)
|
73
|
+
erubis (2.7.0)
|
74
|
+
execjs (2.2.2)
|
75
|
+
font-awesome-rails (4.2.0.0)
|
76
|
+
railties (>= 3.2, < 5.0)
|
77
|
+
globalid (0.3.0)
|
78
|
+
activesupport (>= 4.1.0)
|
79
|
+
haml (4.0.6)
|
80
|
+
tilt
|
81
|
+
hike (1.2.3)
|
82
|
+
i18n (0.7.0)
|
83
|
+
jquery-rails (4.0.2)
|
84
|
+
rails-dom-testing (~> 1.0)
|
85
|
+
railties (>= 4.2.0)
|
86
|
+
thor (>= 0.14, < 2.0)
|
87
|
+
jquery-ui-rails (5.0.3)
|
88
|
+
railties (>= 3.2.16)
|
89
|
+
json (1.8.1)
|
90
|
+
kaminari (0.16.1)
|
91
|
+
actionpack (>= 3.0.0)
|
92
|
+
activesupport (>= 3.0.0)
|
93
|
+
loofah (2.0.1)
|
94
|
+
nokogiri (>= 1.5.9)
|
95
|
+
mail (2.6.3)
|
96
|
+
mime-types (>= 1.16, < 3)
|
97
|
+
mime-types (2.4.3)
|
98
|
+
mini_portile (0.6.1)
|
99
|
+
minitest (5.5.0)
|
100
|
+
multi_json (1.10.1)
|
101
|
+
nested_form (0.3.2)
|
102
|
+
nokogiri (1.6.5)
|
103
|
+
mini_portile (~> 0.6.0)
|
104
|
+
rack (1.6.0)
|
105
|
+
rack-pjax (0.8.0)
|
106
|
+
nokogiri (~> 1.5)
|
107
|
+
rack (~> 1.1)
|
108
|
+
rack-test (0.6.2)
|
109
|
+
rack (>= 1.0)
|
110
|
+
rails (4.2.0)
|
111
|
+
actionmailer (= 4.2.0)
|
112
|
+
actionpack (= 4.2.0)
|
113
|
+
actionview (= 4.2.0)
|
114
|
+
activejob (= 4.2.0)
|
115
|
+
activemodel (= 4.2.0)
|
116
|
+
activerecord (= 4.2.0)
|
117
|
+
activesupport (= 4.2.0)
|
118
|
+
bundler (>= 1.3.0, < 2.0)
|
119
|
+
railties (= 4.2.0)
|
120
|
+
sprockets-rails
|
121
|
+
rails-deprecated_sanitizer (1.0.3)
|
122
|
+
activesupport (>= 4.2.0.alpha)
|
123
|
+
rails-dom-testing (1.0.5)
|
124
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
125
|
+
nokogiri (~> 1.6.0)
|
126
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
127
|
+
rails-html-sanitizer (1.0.1)
|
128
|
+
loofah (~> 2.0)
|
129
|
+
railties (4.2.0)
|
130
|
+
actionpack (= 4.2.0)
|
131
|
+
activesupport (= 4.2.0)
|
132
|
+
rake (>= 0.8.7)
|
133
|
+
thor (>= 0.18.1, < 2.0)
|
134
|
+
rake (10.4.2)
|
135
|
+
remotipart (1.2.1)
|
136
|
+
safe_yaml (1.0.4)
|
137
|
+
sass (3.4.9)
|
138
|
+
sass-rails (5.0.0)
|
139
|
+
railties (>= 4.0.0, < 5.0)
|
140
|
+
sass (~> 3.1)
|
141
|
+
sprockets (>= 2.8, < 4.0)
|
142
|
+
sprockets-rails (>= 2.0, < 4.0)
|
143
|
+
tilt (~> 1.1)
|
144
|
+
sprockets (2.12.3)
|
145
|
+
hike (~> 1.2)
|
146
|
+
multi_json (~> 1.0)
|
147
|
+
rack (~> 1.0)
|
148
|
+
tilt (~> 1.1, != 1.3.0)
|
149
|
+
sprockets-rails (2.2.2)
|
150
|
+
actionpack (>= 3.0)
|
151
|
+
activesupport (>= 3.0)
|
152
|
+
sprockets (>= 2.8, < 4.0)
|
153
|
+
thor (0.19.1)
|
154
|
+
thread_safe (0.3.4)
|
155
|
+
tilt (1.4.1)
|
156
|
+
tzinfo (1.2.2)
|
157
|
+
thread_safe (~> 0.1)
|
158
|
+
|
159
|
+
PLATFORMS
|
160
|
+
ruby
|
161
|
+
|
162
|
+
DEPENDENCIES
|
163
|
+
bundler
|
164
|
+
rails_admin!
|
165
|
+
rails_admin_toggleable!
|
166
|
+
rake
|
@@ -25,7 +25,7 @@ module RailsAdmin
|
|
25
25
|
render json: {
|
26
26
|
text: fv.html_safe,
|
27
27
|
href: toggle_path(model_name: @abstract_model, id: @object.id, method: @meth, on: on.to_s),
|
28
|
-
class: '
|
28
|
+
class: 'label ' + badge,
|
29
29
|
}
|
30
30
|
end
|
31
31
|
if params['id'].present?
|
@@ -36,9 +36,9 @@ module RailsAdmin
|
|
36
36
|
if @object.save
|
37
37
|
if params['ajax'].present?
|
38
38
|
if params[:on] == '1'
|
39
|
-
ajax_link.call('✓', 0, '
|
39
|
+
ajax_link.call('✓', 0, 'label-success')
|
40
40
|
else
|
41
|
-
ajax_link.call('✘', 1, '
|
41
|
+
ajax_link.call('✘', 1, 'label-danger')
|
42
42
|
end
|
43
43
|
else
|
44
44
|
if params[:on] == '1'
|
@@ -20,20 +20,20 @@ module RailsAdmin
|
|
20
20
|
fv.html_safe,
|
21
21
|
toggle_path(model_name: @abstract_model, id: bindings[:object].id, method: name, on: on.to_s),
|
22
22
|
# method: :post,
|
23
|
-
class: '
|
23
|
+
class: 'label ' + badge,
|
24
24
|
onclick: 'var $t = $(this); $t.html("<i class=\"fa fa-spinner fa-spin\"></i>"); $.ajax({type: "POST", url: $t.attr("href"), data: {ajax:true}, success: function(r) { $t.attr("href", r.href); $t.attr("class", r.class); $t.text(r.text); $t.parent().attr("title", r.text); }, error: function(e) { alert(e.responseText); }}); return false;'
|
25
25
|
)
|
26
26
|
end
|
27
27
|
|
28
28
|
case value
|
29
29
|
when nil
|
30
|
-
g_link('✘', 0, '
|
30
|
+
g_link('✘', 0, 'label-danger') + g_link('✓', 1, 'label-success')
|
31
31
|
when false
|
32
|
-
g_link('✘', 1, '
|
32
|
+
g_link('✘', 1, 'label-danger')
|
33
33
|
when true
|
34
|
-
g_link('✓', 0, '
|
34
|
+
g_link('✓', 0, 'label-success')
|
35
35
|
else
|
36
|
-
%{<span class="
|
36
|
+
%{<span class="label">-</span>}
|
37
37
|
end.html_safe
|
38
38
|
end
|
39
39
|
|
@@ -17,6 +17,9 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
+
gem.add_dependency "rails_admin", '~> 0.6.6'
|
21
|
+
|
20
22
|
gem.add_development_dependency "bundler"
|
21
|
-
gem.add_development_dependency "rake"
|
23
|
+
gem.add_development_dependency "rake"
|
22
24
|
end
|
25
|
+
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_toggleable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gleb Tv
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails_admin
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.6.6
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.6.6
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -28,16 +42,16 @@ dependencies:
|
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- - "
|
45
|
+
- - ">="
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
47
|
+
version: '0'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- - "
|
52
|
+
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
54
|
+
version: '0'
|
41
55
|
description: Toggleable field for rails admin
|
42
56
|
email:
|
43
57
|
- glebtv@gmail.com
|
@@ -49,6 +63,7 @@ files:
|
|
49
63
|
- ".ruby-gemset"
|
50
64
|
- ".ruby-version"
|
51
65
|
- Gemfile
|
66
|
+
- Gemfile.lock
|
52
67
|
- LICENSE.txt
|
53
68
|
- README.md
|
54
69
|
- Rakefile
|
@@ -80,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
95
|
version: '0'
|
81
96
|
requirements: []
|
82
97
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
98
|
+
rubygems_version: 2.4.4
|
84
99
|
signing_key:
|
85
100
|
specification_version: 4
|
86
101
|
summary: Make any boolean field easily toggleable on\off from index view in rails
|