pg_rails 7.1.13 → 7.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/pg_engine/app/components/search_bar_component.html.slim +2 -1
- data/pg_engine/app/components/search_bar_component.rb +4 -0
- data/pg_engine/app/controllers/admin/emails_controller.rb +2 -1
- data/pg_engine/app/controllers/concerns/pg_engine/resource.rb +8 -3
- data/pg_engine/spec/components/previews/alert_component_preview/tooltips.html.slim +1 -1
- data/pg_layout/app/javascript/config/tooltips.js +1 -11
- data/pg_layout/app/javascript/controllers/index.js +2 -0
- data/pg_layout/app/javascript/controllers/tooltip_controller.js +14 -0
- data/pg_rails/lib/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a86bbc28d3c58f60700af25390dc43d051e14c2c9b493005554ddd3407380351
|
4
|
+
data.tar.gz: 061c9da5f9ddf70bf5b878f5a7ecc21d4916bcd6bba702d652213a80e8f085f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9da11c05db885cdf43976ff3114e4c1971a1dc27909d529b4447bcd31bf750957b84701663ae1003c7e6d993493922270a61f4512e13d67eef83f92f73ddead3
|
7
|
+
data.tar.gz: 4e66d31c2819f903c9a8dc30654e3b4522662c310fe931f98f49d3bd9ee1815017515f28dede35bc018433a531fe25ed70081333a89cdf26795852ca6c602653
|
@@ -3,11 +3,12 @@
|
|
3
3
|
.d-flex.align-items-center.px-3.py-2
|
4
4
|
.px-2.d-none.d-sm-inline-block
|
5
5
|
span.bi.bi-funnel-fill
|
6
|
-
= helpers.search_form_for @q, url: url_for do |f|
|
6
|
+
= helpers.search_form_for @q, url: url_for, html: { 'data-turbo-action': :advance } do |f|
|
7
7
|
.row.g-1
|
8
8
|
.col
|
9
9
|
.row.g-1
|
10
10
|
= @builder.filtros_html(form: f)
|
11
|
+
= @extra_fields
|
11
12
|
.col-auto.gap-1.d-flex.align-items-start
|
12
13
|
= helpers.button_tag class: 'btn btn-sm btn-primary col-auto' do
|
13
14
|
span.bi.bi-search
|
@@ -22,7 +22,8 @@ module Admin
|
|
22
22
|
def create
|
23
23
|
saved = false
|
24
24
|
ActiveRecord::Base.transaction do
|
25
|
-
#
|
25
|
+
# TODO: acá la transaction jode porque el ActiveJob no puede deserializar el Email
|
26
|
+
# Con rails 7.2 esto se debería arreglar
|
26
27
|
if (saved = @email.save)
|
27
28
|
PgEngine::AdminMailer.with(email_object: @email).admin_mail.deliver_later
|
28
29
|
end
|
@@ -162,9 +162,14 @@ module PgEngine
|
|
162
162
|
def pg_respond_show(object = nil)
|
163
163
|
object ||= instancia_modelo
|
164
164
|
if params[:modal].present?
|
165
|
-
|
166
|
-
|
167
|
-
|
165
|
+
respond_to do |format|
|
166
|
+
format.html
|
167
|
+
format.turbo_stream do
|
168
|
+
render turbo_stream: turbo_stream.append_all(
|
169
|
+
'body', partial: 'pg_layout/modal_show', locals: { object: }
|
170
|
+
)
|
171
|
+
end
|
172
|
+
end
|
168
173
|
else
|
169
174
|
respond_to do |format|
|
170
175
|
format.json { render json: object }
|
@@ -1 +1 @@
|
|
1
|
-
span#tooltip data-
|
1
|
+
span#tooltip data-controller="tooltip" data-bs-title="El tooltip" las cosas
|
@@ -1,16 +1,6 @@
|
|
1
1
|
import * as bootstrap from 'bootstrap'
|
2
2
|
|
3
|
-
|
4
|
-
document.addEventListener('turbo:render', bindTooltips)
|
5
|
-
|
6
|
-
const tooltipsQuery = '[data-bs-toggle="tooltip"]'
|
7
|
-
|
8
|
-
function bindTooltips () {
|
9
|
-
const toastElList = document.querySelectorAll(tooltipsQuery)
|
10
|
-
Array.from(toastElList).map(tooltipEl => {
|
11
|
-
return new bootstrap.Tooltip(tooltipEl)
|
12
|
-
})
|
13
|
-
}
|
3
|
+
const tooltipsQuery = '[data-controller="tooltip"]'
|
14
4
|
|
15
5
|
document.addEventListener('show.bs.tooltip', (ev) => {
|
16
6
|
const toastElList = document.querySelectorAll(tooltipsQuery)
|
@@ -10,6 +10,7 @@ import FiltrosController from './filtros_controller'
|
|
10
10
|
import NotificationsController from './notifications_controller'
|
11
11
|
import SelectizeController from './selectize_controller'
|
12
12
|
import ThemeController from './theme_controller'
|
13
|
+
import TooltipController from './tooltip_controller'
|
13
14
|
|
14
15
|
application.register('navbar', NavbarController)
|
15
16
|
application.register('nested', NestedController)
|
@@ -21,5 +22,6 @@ application.register('filtros', FiltrosController)
|
|
21
22
|
application.register('notifications', NotificationsController)
|
22
23
|
application.register('selectize', SelectizeController)
|
23
24
|
application.register('theme', ThemeController)
|
25
|
+
application.register('tooltip', TooltipController)
|
24
26
|
|
25
27
|
// TODO: testear con capybara todo lo que se pueda
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Controller } from '@hotwired/stimulus'
|
2
|
+
import * as bootstrap from 'bootstrap'
|
3
|
+
|
4
|
+
export default class extends Controller {
|
5
|
+
tooltip = null
|
6
|
+
|
7
|
+
connect () {
|
8
|
+
this.tooltip = new bootstrap.Tooltip(this.element)
|
9
|
+
}
|
10
|
+
|
11
|
+
disconnect () {
|
12
|
+
this.tooltip.dispose()
|
13
|
+
}
|
14
|
+
}
|
data/pg_rails/lib/version.rb
CHANGED
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.14
|
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-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -839,6 +839,7 @@ files:
|
|
839
839
|
- pg_layout/app/javascript/controllers/selectize_controller.js
|
840
840
|
- pg_layout/app/javascript/controllers/switcher_controller.js
|
841
841
|
- pg_layout/app/javascript/controllers/theme_controller.js
|
842
|
+
- pg_layout/app/javascript/controllers/tooltip_controller.js
|
842
843
|
- pg_layout/app/javascript/utils/cookies.js
|
843
844
|
- pg_layout/app/javascript/utils/utils.ts
|
844
845
|
- pg_layout/app/lib/navbar.rb
|