active-list 4.0.0 → 4.1.0
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/VERSION +1 -1
- data/lib/active-list/columns/action_column.rb +9 -3
- metadata +3 -7
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.1.0
|
@@ -18,15 +18,21 @@ module ActiveList
|
|
18
18
|
|
19
19
|
|
20
20
|
def operation(record='record')
|
21
|
+
@options[:method] = :delete if @name.to_s == "destroy"
|
22
|
+
@options[:confirm] = "list.do_you_really_want_to_delete_this_record".t if @name.to_s == "destroy"
|
21
23
|
link_options = ""
|
22
|
-
|
23
|
-
|
24
|
+
if @options['data-confirm'] or @options[:confirm]
|
25
|
+
link_options << ", 'data-confirm' => ::I18n.translate('labels.#{@options['data-confirm']||@options[:confirm]}')"
|
26
|
+
end
|
27
|
+
if @options['data-method'] or @options[:method]
|
28
|
+
link_options << ", :method => h('#{(@options['data-method']||@options[:method])}')"
|
29
|
+
end
|
24
30
|
action = @name
|
25
31
|
format = @options[:format] ? ", :format=>'#{@options[:format]}'" : ""
|
26
32
|
if @options[:remote]
|
27
33
|
raise Exception.new("Sure to use :remote ?")
|
28
34
|
remote_options = @options.dup
|
29
|
-
remote_options[
|
35
|
+
remote_options['data-confirm'] = ::I18n.translate('labels.'+@options[:confirm].to_s) unless @options[:confirm].nil?
|
30
36
|
remote_options.delete :remote
|
31
37
|
remote_options.delete :image
|
32
38
|
remote_options = remote_options.inspect.to_s
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active-list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
NC4wLjA=
|
4
|
+
version: 4.1.0
|
6
5
|
prerelease:
|
7
6
|
platform: ruby
|
8
7
|
authors:
|
@@ -10,7 +9,7 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2012-
|
12
|
+
date: 2012-07-20 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: rails
|
@@ -138,9 +137,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
138
137
|
- - ! '>='
|
139
138
|
- !ruby/object:Gem::Version
|
140
139
|
version: '0'
|
141
|
-
segments:
|
142
|
-
- 0
|
143
|
-
hash: -1481556699660811266
|
144
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
141
|
none: false
|
146
142
|
requirements:
|
@@ -149,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
145
|
version: '0'
|
150
146
|
requirements: []
|
151
147
|
rubyforge_project:
|
152
|
-
rubygems_version: 1.8.
|
148
|
+
rubygems_version: 1.8.23
|
153
149
|
signing_key:
|
154
150
|
specification_version: 3
|
155
151
|
summary: Easy tables in Rails app
|