pg_rails 7.1.14 → 7.1.16
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 -1
- data/pg_engine/app/controllers/pg_engine/base_controller.rb +3 -2
- data/pg_engine/app/views/admin/eventos/new.html.slim +2 -0
- data/pg_layout/app/javascript/config/turbo_rails/index.js +1 -0
- data/pg_layout/app/javascript/config/turbo_rails/progress_bar.js +17 -0
- data/pg_layout/app/javascript/controllers/tooltip_controller.js +16 -2
- 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: fc6c2d6a41256b2a5b2093e50eb1aad097f039a60a0ee32ea4e7c4efd2f01133
|
4
|
+
data.tar.gz: fcd00160147fc1dbfe25e3f632433fc34e83b69018af77fc2e22c20bd23c4b2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4c1efe2aff72b203b3e448dfa78eeb647b00da5ccb598c13b1679a8c7cbcee4db72a9c64b0196965109c77ba8b626dea1d95d98b66856218a16a74d94734f5d
|
7
|
+
data.tar.gz: 2ec78e73c57f3c1665e55b8e8885624a2ae17af16588955ad8ab135296bbbf16f2208b2776b27696c523a8ba281c9445e98a7676fa420c46ec158240b717db52
|
@@ -91,11 +91,12 @@ module PgEngine
|
|
91
91
|
end
|
92
92
|
|
93
93
|
if Current.user.present?
|
94
|
+
# TODO: quitar el limit 3, discard en events
|
94
95
|
@notifications = Current.user.notifications.order(id: :desc).includes(:event)
|
95
96
|
.where(type: 'SimpleUserNotifier::Notification')
|
97
|
+
.limit(3)
|
96
98
|
unseen = @notifications.unseen.any?
|
97
|
-
|
98
|
-
tooltip = @notifications.unseen.map(&:tooltip).first
|
99
|
+
tooltip = @notifications.unseen.map(&:tooltip).select(&:presence).first
|
99
100
|
@notifications_bell = NotificationsBellComponent.new(
|
100
101
|
unseen:,
|
101
102
|
tooltip:
|
@@ -3,8 +3,10 @@
|
|
3
3
|
|
4
4
|
= f.input :type, as: :select, collection: @notifier_types
|
5
5
|
- if params[:plain_text]
|
6
|
+
= link_to 'Change to rich text', url_for
|
6
7
|
= f.input :message, as: :text
|
7
8
|
- else
|
9
|
+
= link_to 'Change to plain text', url_for(plain_text: true)
|
8
10
|
= f.rich_text_area :message
|
9
11
|
= f.input :message_text, as: :text, hint: 'Solo para emails, para la plain/text part'
|
10
12
|
= f.input :tooltip
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// app/javascript/turbo_progress_bar.js
|
2
|
+
import { Turbo } from '@hotwired/turbo-rails'
|
3
|
+
|
4
|
+
const adapter = Turbo.navigator.delegate.adapter
|
5
|
+
|
6
|
+
document.addEventListener('turbo:before-fetch-request', function (event) {
|
7
|
+
const target = event.target
|
8
|
+
if (!(target instanceof HTMLElement)) return
|
9
|
+
|
10
|
+
if (target.getAttribute('data-turbo-action') === 'advance') {
|
11
|
+
adapter.formSubmissionStarted(this)
|
12
|
+
}
|
13
|
+
})
|
14
|
+
|
15
|
+
document.addEventListener('turbo:before-fetch-response', function (event) {
|
16
|
+
adapter.formSubmissionFinished(this)
|
17
|
+
})
|
@@ -5,10 +5,24 @@ export default class extends Controller {
|
|
5
5
|
tooltip = null
|
6
6
|
|
7
7
|
connect () {
|
8
|
-
|
8
|
+
if (this.element.dataset.bsTrigger === 'contextmenu') {
|
9
|
+
this.element.addEventListener('contextmenu', (ev) => {
|
10
|
+
ev.preventDefault()
|
11
|
+
if (!this.tooltip) {
|
12
|
+
this.tooltip = new bootstrap.Tooltip(this.element, {
|
13
|
+
trigger: 'focus'
|
14
|
+
})
|
15
|
+
this.tooltip.show()
|
16
|
+
}
|
17
|
+
})
|
18
|
+
} else {
|
19
|
+
this.tooltip = new bootstrap.Tooltip(this.element)
|
20
|
+
}
|
9
21
|
}
|
10
22
|
|
11
23
|
disconnect () {
|
12
|
-
this.tooltip
|
24
|
+
if (this.tooltip) {
|
25
|
+
this.tooltip.dispose()
|
26
|
+
}
|
13
27
|
}
|
14
28
|
}
|
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.16
|
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-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -826,6 +826,7 @@ files:
|
|
826
826
|
- pg_layout/app/javascript/config/rollbar.js
|
827
827
|
- pg_layout/app/javascript/config/tooltips.js
|
828
828
|
- pg_layout/app/javascript/config/turbo_rails/index.js
|
829
|
+
- pg_layout/app/javascript/config/turbo_rails/progress_bar.js
|
829
830
|
- pg_layout/app/javascript/config/turbo_rails/set_consumer.js
|
830
831
|
- pg_layout/app/javascript/controllers/application.js
|
831
832
|
- pg_layout/app/javascript/controllers/clear_timeout_controller.js
|