editmode 1.7.0.pre.2 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- 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 +20 -2
- data/lib/editmode/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb4e665ed5f5d15a4ced4b1995553f6f52f1da060d008901c14e7b009d4bfd7b
|
4
|
+
data.tar.gz: eabc2ebe2ddee8c496ce29195a972f81ca4e251b082c0515c66937ef3c40588b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 215828a7449625ef0882aa2ae144b9e6377c7b270c27148868d215e8d66a4bf12787ce2f92b16774a926d64ccb8bba50dd1cae163fb71e3077d0e1903090025a
|
7
|
+
data.tar.gz: 70b071a582578c1d6964c16e2d69971cb16ed8768bae72f3a06532411f74a512a2b1421dd298c1d5d3f62ddbce5dd097ae2c352eff524c3025a8467adb895e36
|
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", style: "display: none") 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
@@ -23,7 +23,25 @@ module Editmode
|
|
23
23
|
|
24
24
|
def watermark_tag
|
25
25
|
if has_watermark
|
26
|
-
'<div style="z-index: 9999; bottom: 8px; right: 8px; position: fixed; opacity: 1; display: flex; align-items: center; background: rgba(255, 255, 255, 0.9); cursor: pointer; border-radius: 5px; padding: 2px 5px 2px 2px; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;"><svg
|
26
|
+
'<div style="z-index: 9999; bottom: 8px; right: 8px; position: fixed; opacity: 1; display: flex; align-items: center; background: rgba(255, 255, 255, 0.9); cursor: pointer; border-radius: 5px; padding: 2px 5px 2px 2px; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;"><svg preserveAspectRatio="xMidYMid meet" version="1.0" viewBox="0 0 22 23" xmlns="http://www.w3.org/2000/svg" width="24" height="24" style="margin-right: 5px">
|
27
|
+
<g opacity=".8">
|
28
|
+
<path d="m1.6925 4.2131s6.9175-3.7666 7.5952-4.1192c0.67776-0.35253 1.2739 0.35253 1.2739 1.025v8.0945c0 1.7257-0.2199 1.7257-0.92232 2.1684-0.70239 0.4428-7.9929 4.3926-8.3935 4.5953-0.40061 0.2028-1.2459-0.0997-1.2459-1.0136v-8.4086c0-1.5545 1.6925-2.3418 1.6925-2.3418z" clip-rule="evenodd" fill="#203260" fill-rule="evenodd"></path>
|
29
|
+
<mask id="b" x="0" y="0" width="11" height="17" mask-type="alpha" maskUnits="userSpaceOnUse">
|
30
|
+
<path d="m1.6925 4.2131s6.9175-3.7666 7.5952-4.1192c0.67776-0.35253 1.2739 0.35253 1.2739 1.025v8.0945c0 1.7257-0.2199 1.7257-0.92232 2.1684-0.70239 0.4428-7.9929 4.3926-8.3935 4.5953-0.40061 0.2028-1.2459-0.0997-1.2459-1.0136v-8.4086c0-1.5545 1.6925-2.3418 1.6925-2.3418z" clip-rule="evenodd" fill="#fff" fill-rule="evenodd"></path>
|
31
|
+
</mask>
|
32
|
+
<g mask="url(#b)">
|
33
|
+
<path d="m2.9346 7.9074s6.9175-3.7666 7.5952-4.1192c0.6778-0.35254 1.2739 0.35253 1.2739 1.025v8.0944c0 1.7258-0.2199 1.7258-0.9223 2.1685s-7.9929 4.3925-8.3935 4.5953-1.2458-0.0997-1.2458-1.0136v-8.4087c0-1.5545 1.6925-2.3418 1.6925-2.3418z" clip-rule="evenodd" fill="#000719" fill-rule="evenodd"></path>
|
34
|
+
</g>
|
35
|
+
<path d="m6.978 7.3208s6.9175-3.7666 7.5952-4.1192c0.6778-0.35254 1.2739 0.35253 1.2739 1.025v8.0945c0 1.7257-0.2199 1.7257-0.9223 2.1684-0.7023 0.4428-7.9929 4.3926-8.3935 4.5954-0.40061 0.2027-1.2459-0.0998-1.2459-1.0137v-8.4086c0-1.5545 1.6925-2.3418 1.6925-2.3418z" clip-rule="evenodd" fill="#223464" fill-rule="evenodd"></path>
|
36
|
+
<mask id="a" x="5" y="3" width="11" height="17" mask-type="alpha" maskUnits="userSpaceOnUse">
|
37
|
+
<path d="m6.978 7.3208s6.9175-3.7666 7.5952-4.1192c0.6778-0.35254 1.2739 0.35253 1.2739 1.025v8.0945c0 1.7257-0.2199 1.7257-0.9223 2.1684-0.7023 0.4428-7.9929 4.3926-8.3935 4.5954-0.40061 0.2027-1.2459-0.0998-1.2459-1.0137v-8.4086c0-1.5545 1.6925-2.3418 1.6925-2.3418z" clip-rule="evenodd" fill="#fff" fill-rule="evenodd"></path>
|
38
|
+
</mask>
|
39
|
+
<g mask="url(#a)">
|
40
|
+
<path d="m8.4483 11.062s6.9175-3.7667 7.5952-4.1192c0.6778-0.35253 1.2739 0.35254 1.2739 1.025v8.0945c0 1.7257-0.2199 1.7257-0.9222 2.1684-0.7024 0.4428-7.993 4.3926-8.3936 4.5954-0.40061 0.2027-1.2458-0.0998-1.2458-1.0136v-8.4087c0-1.5546 1.6925-2.3418 1.6925-2.3418z" clip-rule="evenodd" fill="#000719" fill-rule="evenodd"></path>
|
41
|
+
</g>
|
42
|
+
<path d="m12.543 10.883s6.9235-3.7101 7.6019-4.0573c0.6783-0.34725 1.275 0.34724 1.275 1.0096v7.9731c0 1.6998-0.2201 1.6998-0.9231 2.1359s-7.9999 4.3267-8.4009 4.5264c-0.4009 0.1997-1.2469-0.0983-1.2469-0.9984v-8.2826c0-1.5312 1.694-2.3067 1.694-2.3067z" clip-rule="evenodd" fill="#405489" fill-rule="evenodd"></path>
|
43
|
+
</g>
|
44
|
+
</svg><span style="font-size: 13px; font-weight: 600;">Powered by Editmode</span></div>'
|
27
45
|
else
|
28
46
|
""
|
29
47
|
end
|
@@ -43,7 +61,7 @@ module Editmode
|
|
43
61
|
end
|
44
62
|
|
45
63
|
def script_url
|
46
|
-
ENV["EDITMODE_OVERRIDE_SCRIPT_URL"] || "https://unpkg.com/editmode-magic-editor
|
64
|
+
ENV["EDITMODE_OVERRIDE_SCRIPT_URL"] || "https://unpkg.com/editmode-magic-editor@~1/dist/magic-editor.js"
|
47
65
|
end
|
48
66
|
|
49
67
|
end
|
data/lib/editmode/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: editmode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Ennis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -108,9 +108,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
110
|
requirements:
|
111
|
-
- - "
|
111
|
+
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
|
-
version:
|
113
|
+
version: '0'
|
114
114
|
requirements: []
|
115
115
|
rubygems_version: 3.0.3.1
|
116
116
|
signing_key:
|