editmode 1.7.0.pre.2 → 1.7.0.pre.3
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.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/editmode/action_view_extensions/editmode_helper.rb +12 -10
- data/lib/editmode/script_tag.rb +1 -1
- data/lib/editmode/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ccfb14c467ba1d9cf222c8ad5536aa77fc2ec97d9d8819e47951959a68a38c5
|
4
|
+
data.tar.gz: 62e8d0ffa22c375b6346d2eb7caa1ea6ff74bb3d29970d4bf0b0d764797fffd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8465c2b1962540c653cd3c654dec448146b5cd7749621f4aeacab32810ff8914fa2be2f2f726d04336ddf3e4aed0571c0aaed0cda79149fa8b7c9c889c6756c
|
7
|
+
data.tar.gz: 103435c578a6d735ca9870217fc1e51c52719201bc66e091c2e40d3c6aea778b34059ddc42ee1f825714a1b2b4d6c54c3cfcbbaaafb8643ff045076f8a2c7cee
|
data/Gemfile
CHANGED
@@ -63,27 +63,29 @@ module Editmode
|
|
63
63
|
end
|
64
64
|
|
65
65
|
if chunks.any?
|
66
|
-
content_tag :div, class: "chunks-collection-wrapper #{parent_class}", data: {chunk_collection_identifier: collection_identifier, chunk_tags: tags.join("|")} do
|
66
|
+
return content_tag :div, class: "chunks-collection-wrapper #{parent_class}", data: {chunk_collection_identifier: collection_identifier, chunk_tags: tags.join("|")} do
|
67
67
|
chunks.each_with_index do |chunk, index|
|
68
68
|
@custom_field_chunk = chunk
|
69
|
-
concat(
|
70
|
-
|
71
|
-
|
69
|
+
concat(
|
70
|
+
content_tag(:div, class: "chunks-collection-item--wrapper #{item_class}") do
|
71
|
+
yield(@custom_field_chunk, index)
|
72
|
+
end
|
73
|
+
)
|
72
74
|
end
|
73
|
-
|
75
|
+
|
74
76
|
# Placeholder element for new collection item
|
75
77
|
@custom_field_chunk = chunks.first.merge!({placeholder: true})
|
76
|
-
concat(content_tag(
|
77
|
-
yield(@custom_field_chunk)
|
78
|
+
concat(content_tag("em-template", class: "chunks-col-placeholder-wrapper") do
|
79
|
+
yield(@custom_field_chunk, 0)
|
78
80
|
end)
|
79
81
|
end
|
80
82
|
else
|
81
|
-
content_tag(:span, " ".html_safe)
|
83
|
+
return content_tag(:span, " ".html_safe)
|
82
84
|
end
|
83
85
|
end
|
84
86
|
rescue => error
|
85
87
|
puts error
|
86
|
-
return
|
88
|
+
return ""
|
87
89
|
end
|
88
90
|
end
|
89
91
|
alias_method :c, :chunk_collection
|
@@ -198,7 +200,7 @@ module Editmode
|
|
198
200
|
options[:variable_fallbacks] = @custom_field_chunk["variable_fallbacks"] || {}
|
199
201
|
options[:variable_values] = options[:variables] || {}
|
200
202
|
|
201
|
-
chunk_field_value(@custom_field_chunk, field_name, options)
|
203
|
+
chunk_field_value(@custom_field_chunk, field_name, **options)
|
202
204
|
end
|
203
205
|
alias_method :F, :render_custom_field
|
204
206
|
|
data/lib/editmode/script_tag.rb
CHANGED
@@ -43,7 +43,7 @@ module Editmode
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def script_url
|
46
|
-
ENV["EDITMODE_OVERRIDE_SCRIPT_URL"] || "https://unpkg.com/editmode-magic-editor
|
46
|
+
ENV["EDITMODE_OVERRIDE_SCRIPT_URL"] || "https://unpkg.com/editmode-magic-editor@~1/dist/magic-editor.js"
|
47
47
|
end
|
48
48
|
|
49
49
|
end
|
data/lib/editmode/version.rb
CHANGED