katalyst-kpop 2.0.4 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/helpers/kpop_helper.rb +8 -4
- data/lib/katalyst/kpop/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d5516f4264830591abc464744c7ebaf9ca5ea6664eef727f1219a434df9f9be
|
4
|
+
data.tar.gz: 7370d64af3b49070f957d41425e644f08269750205d0964b0ba155244c1b22ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e9d15134011c34b615f1d79929b48220ae6a1e714e002be508c5dcc4320545e170855b92d1bedc71ff720dd8ba5b6e09697a66be303830ad73ac12a748b003e
|
7
|
+
data.tar.gz: 77401e288f4198a50f8fca9fb13514d8c0f4bdae8bbe3ba7029df58d5c1423fde2d6ead18b1ba9f29c36cdb711a70d61ceb74b22f30dc2e8317d7d7cf184a4ef
|
data/README.md
CHANGED
@@ -96,7 +96,7 @@ frame. The targeted action will need to generate content in a `kpop_frame_tag`,
|
|
96
96
|
```
|
97
97
|
|
98
98
|
Note that, because kpop modals render in a turbo frame, if you want to navigate the parent frame you will need to use
|
99
|
-
`target: "_top"` on your links and forms.
|
99
|
+
`target: "_top"` on your links and forms, or add `target: "_top"` to the `kpop_frame_tag` call in your body.
|
100
100
|
|
101
101
|
## Development
|
102
102
|
|
data/app/helpers/kpop_helper.rb
CHANGED
@@ -13,10 +13,14 @@ module KpopHelper
|
|
13
13
|
end
|
14
14
|
|
15
15
|
# Render a turbo frame tag that can be targeted for rendering kpop modals.
|
16
|
-
def kpop_frame_tag(&block)
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
def kpop_frame_tag(**html_attributes, &block)
|
17
|
+
html_attributes[:class] ||= "kpop-container"
|
18
|
+
html_attributes[:data] ||= {}
|
19
|
+
html_attributes[:data][:controller] = "kpop"
|
20
|
+
html_attributes[:data][:action] = "scrim:hide@window->kpop#dismiss"
|
21
|
+
html_attributes[:data][:turbo_temporary] = ""
|
22
|
+
|
23
|
+
turbo_frame_tag("kpop", **html_attributes) do
|
20
24
|
capture(&block) if block
|
21
25
|
end
|
22
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katalyst-kpop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katalyst Interactive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|