avo-rhino_field 0.0.13 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/builds/avo-rhino_field.css +15 -2
- data/app/assets/builds/avo-rhino_field.css.map +1 -1
- data/app/assets/builds/avo-rhino_field.js +11 -292
- data/app/assets/builds/avo-rhino_field.js.map +4 -4
- data/app/components/avo/fields/rhino_field/edit_component.html.erb +4 -4
- data/app/components/avo/fields/rhino_field/show_component.html.erb +19 -12
- data/lib/avo/rhino_field/version.rb +1 -1
- metadata +2 -2
@@ -39,16 +39,16 @@
|
|
39
39
|
class="h-3.5 w-5 bg-transparent -mt-px -mb-1"
|
40
40
|
/>
|
41
41
|
</button>
|
42
|
-
<
|
43
|
-
type="button"
|
42
|
+
<a
|
44
43
|
slot="before-attach-files-button"
|
45
44
|
class="toolbar__button rhino-toolbar-button flex flex-col items-center grow-0 text-sm hidden-until-rhino-boots-up"
|
46
45
|
data-role="toolbar-item"
|
47
46
|
tabindex="-1"
|
48
|
-
|
47
|
+
href="<%= helpers.avo.attach_media_path(resource_name: @resource.name, record_id: @resource.id, controller_selector: ".#{unique_id}", controller_name: 'rhino-field') %>"
|
48
|
+
data-turbo-frame="<%= ::Avo::MODAL_FRAME_ID %>"
|
49
49
|
>
|
50
50
|
<%= helpers.svg "heroicons/outline/photo", class: "!min-h-4 !max-h-4" %>
|
51
|
-
</
|
51
|
+
</a>
|
52
52
|
<% end %>
|
53
53
|
<%= @form.text_area @field.id,
|
54
54
|
value: @field.value.try(:to_trix_html) || @field.value,
|
@@ -1,14 +1,21 @@
|
|
1
|
-
<%= field_wrapper
|
2
|
-
<%
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<%= @field.value.html_safe %>
|
1
|
+
<%= field_wrapper(**field_wrapper_args, full_width: true, data: { controller: 'hidden-input' }) do %>
|
2
|
+
<% button_classes = 'font-semibold inline-block pt-3 text-sm' %>
|
3
|
+
<%= content_tag :div,
|
4
|
+
class: "flex flex-col w-full",
|
5
|
+
data: {
|
6
|
+
controller: "trix-body hidden-input",
|
7
|
+
trix_body_always_show_value: @field.always_show
|
8
|
+
} do %>
|
9
|
+
<div class="<%= class_names("trix-content border-none px-0 py-2 max-w-4xl", "hidden": !@field.always_show) %>" data-trix-body-target="content" data-hidden-input-target="content">
|
10
|
+
<%== @field.value %>
|
12
11
|
</div>
|
13
|
-
|
12
|
+
<% if true %>
|
13
|
+
<div class="hidden" data-trix-body-target="moreContentButton">
|
14
|
+
<%= link_to t('avo.more_content'), 'javascript:void(0);', class: button_classes, data: { action: 'click->trix-body#toggleContent' } %>
|
15
|
+
</div>
|
16
|
+
<div class="hidden" data-trix-body-target="lessContentButton">
|
17
|
+
<%= link_to t('avo.less_content'), 'javascript:void(0);', class: button_classes, data: { action: 'click->trix-body#toggleContent' } %>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
<% end %>
|
14
21
|
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avo-rhino_field
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Marin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: rhino field for Avo.
|
14
14
|
email: adrian@adrianthedev.com
|