avo 1.19.1.pre.11 → 1.20.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -3
- data/lib/avo/fields/key_value_field.rb +8 -28
- data/lib/avo/version.rb +1 -1
- metadata +3 -6
- data/app/assets/builds/avo.css +0 -8590
- data/app/assets/builds/avo.js +0 -87755
- data/app/assets/builds/avo.js.map +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e21fad20822df8f410cc1a6eca03d840949a4acd6bee9e47ea320927fa9c253d
|
4
|
+
data.tar.gz: 61dc6595933b686526948f1ec9f7b37dfaad833f85928609d6bc296f9d6eb694
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04c07e302dc1cd1ab911edeed99543ab93dd7b8f29ddf460dd42a85e828412b07f3a5f9fd113eeb520185f712b5586f2be89b2cc58271fe3762b26acc7cb3c73
|
7
|
+
data.tar.gz: '09968da7c74ed31cd98d3fe99ef64578bc26466b30db7d10a087ecc63424e42af2809f20c68df228637c4c54acd80e4144d35e64cb21df5d96833e14894c34f2'
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
avo (1.
|
4
|
+
avo (1.20.1)
|
5
5
|
active_link_to
|
6
6
|
addressable
|
7
7
|
breadcrumbs_on_rails
|
@@ -229,8 +229,6 @@ GEM
|
|
229
229
|
nokogiri (1.13.1)
|
230
230
|
mini_portile2 (~> 2.7.0)
|
231
231
|
racc (~> 1.4)
|
232
|
-
nokogiri (1.13.1-x86_64-linux)
|
233
|
-
racc (~> 1.4)
|
234
232
|
orm_adapter (0.5.0)
|
235
233
|
pagy (5.10.1)
|
236
234
|
activesupport
|
@@ -3,6 +3,10 @@ require "json"
|
|
3
3
|
module Avo
|
4
4
|
module Fields
|
5
5
|
class KeyValueField < BaseField
|
6
|
+
attr_reader :key_label
|
7
|
+
attr_reader :value_label
|
8
|
+
attr_reader :action_text
|
9
|
+
attr_reader :delete_text
|
6
10
|
attr_reader :disable_editing_keys
|
7
11
|
attr_reader :disable_adding_rows
|
8
12
|
|
@@ -11,10 +15,10 @@ module Avo
|
|
11
15
|
|
12
16
|
hide_on :index
|
13
17
|
|
14
|
-
@key_label = args[:key_label].
|
15
|
-
@value_label = args[:value_label].
|
16
|
-
@action_text = args[:action_text].
|
17
|
-
@delete_text = args[:delete_text].
|
18
|
+
@key_label = args[:key_label].present? ? args[:key_label].to_s : I18n.translate('avo.key_value_field.key')
|
19
|
+
@value_label = args[:value_label].present? ? args[:value_label].to_s : I18n.translate('avo.key_value_field.value')
|
20
|
+
@action_text = args[:action_text].present? ? args[:action_text].to_s : I18n.translate('avo.key_value_field.add_row')
|
21
|
+
@delete_text = args[:delete_text].present? ? args[:delete_text].to_s : I18n.translate('avo.key_value_field.delete_row')
|
18
22
|
|
19
23
|
@disable_editing_keys = args[:disable_editing_keys].present? ? args[:disable_editing_keys] : false
|
20
24
|
# disabling editing keys also disables adding rows (doesn't take into account the value of disable_adding_rows)
|
@@ -28,30 +32,6 @@ module Avo
|
|
28
32
|
@disable_deleting_rows = args[:disable_deleting_rows].present? ? args[:disable_deleting_rows] : false
|
29
33
|
end
|
30
34
|
|
31
|
-
def key_label
|
32
|
-
return @key_label if @key_label && !@key_label.empty?
|
33
|
-
|
34
|
-
I18n.translate('avo.key_value_field.key')
|
35
|
-
end
|
36
|
-
|
37
|
-
def value_label
|
38
|
-
return @value_label if @value_label && !@value_label.empty?
|
39
|
-
|
40
|
-
I18n.translate('avo.key_value_field.value')
|
41
|
-
end
|
42
|
-
|
43
|
-
def action_text
|
44
|
-
return @action_text if @action_text && !@action_text.empty?
|
45
|
-
|
46
|
-
I18n.translate('avo.key_value_field.add_row')
|
47
|
-
end
|
48
|
-
|
49
|
-
def delete_text
|
50
|
-
return @delete_text if @delete_text && !@delete_text.empty?
|
51
|
-
|
52
|
-
I18n.translate('avo.key_value_field.delete_row')
|
53
|
-
end
|
54
|
-
|
55
35
|
def to_permitted_param
|
56
36
|
[:"#{id}", "#{id}": {}]
|
57
37
|
end
|
data/lib/avo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.20.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Marin
|
@@ -206,9 +206,6 @@ files:
|
|
206
206
|
- Gemfile.lock
|
207
207
|
- README.md
|
208
208
|
- Rakefile
|
209
|
-
- app/assets/builds/avo.css
|
210
|
-
- app/assets/builds/avo.js
|
211
|
-
- app/assets/builds/avo.js.map
|
212
209
|
- app/assets/config/avo_manifest.js
|
213
210
|
- app/assets/images/avo/logo.png
|
214
211
|
- app/assets/stylesheets/avo.css
|
@@ -710,9 +707,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
710
707
|
version: '0'
|
711
708
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
712
709
|
requirements:
|
713
|
-
- - "
|
710
|
+
- - ">="
|
714
711
|
- !ruby/object:Gem::Version
|
715
|
-
version:
|
712
|
+
version: '0'
|
716
713
|
requirements: []
|
717
714
|
rubygems_version: 3.3.3
|
718
715
|
signing_key:
|