pg_rails 7.1.12 → 7.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/pg_associable/app/javascript/modal_controller.js +1 -4
- data/pg_engine/app/decorators/pg_engine/base_record_decorator.rb +2 -4
- data/pg_layout/app/assets/stylesheets/sidebar.scss +1 -0
- data/pg_layout/app/javascript/config/tooltips.js +12 -2
- data/pg_layout/app/views/pg_layout/_modal_show.html.slim +1 -1
- data/pg_rails/lib/version.rb +1 -1
- data/pg_rails/scss/pg_rails.scss +4 -0
- 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: 4a90a7a62e376e482f5e3c072c38f859478a7a333d606de01c8d5481cefd8fb5
|
4
|
+
data.tar.gz: ec85008cd9234bb9c7435ca6838af3ca380c2f34c43fb80bd30e9d2608d2dfc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9039afd99e6a910e4e1a47c125e8285992360d1979836a0d7df1c1f9f4b0837ee4bf8b5d266384998cabcc765dfe8bd4b0fa96143ba9baa58946b4697e97addd
|
7
|
+
data.tar.gz: c2b42d1565fc804d2ef3015c197820abc54a8425d66d27f6b57f21a768779ceab9ade935dfefb85db8016bcce98988f3378b9bb1cf99a4dfc0f223a335b0a046
|
@@ -12,10 +12,6 @@ export default class extends Controller {
|
|
12
12
|
if (this.element.dataset.removeOnHide) {
|
13
13
|
this.element.addEventListener('hidden.bs.modal', (e) => {
|
14
14
|
this.element.remove()
|
15
|
-
// FIXME: handlear mejor
|
16
|
-
window.Stimulus.controllers.map((c) => { return c.calendar })
|
17
|
-
.filter((e) => { return e })
|
18
|
-
.forEach((c) => { c.refetchEvents() })
|
19
15
|
})
|
20
16
|
}
|
21
17
|
this.modalPuntero.show()
|
@@ -36,6 +32,7 @@ export default class extends Controller {
|
|
36
32
|
|
37
33
|
disconnect (e) {
|
38
34
|
this.modalPuntero.hide()
|
35
|
+
this.element.dispatchEvent(new Event('hidden.bs.modal'))
|
39
36
|
this.modalPuntero.dispose()
|
40
37
|
}
|
41
38
|
}
|
@@ -61,8 +61,7 @@ module PgEngine
|
|
61
61
|
return unless Pundit.policy!(Current.user, object).edit?
|
62
62
|
|
63
63
|
helpers.content_tag :span, rel: :tooltip, title: 'Modificar' do
|
64
|
-
helpers.link_to edit_object_url,
|
65
|
-
class: "btn btn-sm #{klass}" do
|
64
|
+
helpers.link_to edit_object_url, class: "btn btn-sm #{klass}" do
|
66
65
|
helpers.content_tag(:span, nil, class: clase_icono('pencil')) + text
|
67
66
|
end
|
68
67
|
end
|
@@ -72,8 +71,7 @@ module PgEngine
|
|
72
71
|
return unless Pundit.policy!(Current.user, object).show?
|
73
72
|
|
74
73
|
helpers.content_tag :span, rel: :tooltip, title: 'Ver' do
|
75
|
-
helpers.link_to object_url,
|
76
|
-
class: "btn btn-sm #{klass}" do
|
74
|
+
helpers.link_to object_url, class: "btn btn-sm #{klass}" do
|
77
75
|
helpers.content_tag(:span, nil, class: clase_icono('eye-fill')) + text
|
78
76
|
end
|
79
77
|
end
|
@@ -3,11 +3,21 @@ import * as bootstrap from 'bootstrap'
|
|
3
3
|
document.addEventListener('turbo:load', bindTooltips)
|
4
4
|
document.addEventListener('turbo:render', bindTooltips)
|
5
5
|
|
6
|
-
|
7
|
-
const tooltipsQuery = '[data-bs-toggle="tooltip"]'
|
6
|
+
const tooltipsQuery = '[data-bs-toggle="tooltip"]'
|
8
7
|
|
8
|
+
function bindTooltips () {
|
9
9
|
const toastElList = document.querySelectorAll(tooltipsQuery)
|
10
10
|
Array.from(toastElList).map(tooltipEl => {
|
11
11
|
return new bootstrap.Tooltip(tooltipEl)
|
12
12
|
})
|
13
13
|
}
|
14
|
+
|
15
|
+
document.addEventListener('show.bs.tooltip', (ev) => {
|
16
|
+
const toastElList = document.querySelectorAll(tooltipsQuery)
|
17
|
+
Array.from(toastElList).forEach(tooltipEl => {
|
18
|
+
const tooltip = bootstrap.Tooltip.getInstance(tooltipEl)
|
19
|
+
if (tooltip) {
|
20
|
+
tooltip.hide()
|
21
|
+
}
|
22
|
+
})
|
23
|
+
})
|
@@ -7,7 +7,7 @@
|
|
7
7
|
| Ir al #{object.class.nombre_singular.downcase}
|
8
8
|
a.btn-close[type="button" data-bs-dismiss="modal" aria-label="Close"]
|
9
9
|
.modal-body
|
10
|
-
= turbo_frame_tag :modal_generic
|
10
|
+
= turbo_frame_tag :modal_generic do
|
11
11
|
.float-end
|
12
12
|
= object.edit_link
|
13
13
|
= object.destroy_link
|
data/pg_rails/lib/version.rb
CHANGED
data/pg_rails/scss/pg_rails.scss
CHANGED
@@ -21,6 +21,10 @@ $info: #87accc;
|
|
21
21
|
$warning-text-emphasis: $orange;
|
22
22
|
$danger-text-emphasis: #910303;
|
23
23
|
|
24
|
+
$tooltip-opacity: 1;
|
25
|
+
$tooltip-bg: var(--bs-primary) !default;
|
26
|
+
$tooltip-color: var(--bs-light) !default;
|
27
|
+
|
24
28
|
$font-size-base: 0.9rem;
|
25
29
|
$enable-validation-icons: false;
|
26
30
|
$focus-ring-width: .05rem;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.1.
|
4
|
+
version: 7.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|