pg_rails 7.6.13 → 7.6.15
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3db6eee59bbd35a8a834cb9d09b7a6a1d04fe49026661b4dba7d66dd02580484
|
4
|
+
data.tar.gz: e4aca63a466bba3b75d01db82a4146b79d7f25de228afcede2568c072edd3808
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8b824b4d410a79f47b13696748dcbcfc051a762a6b9e2a0a400f33d58f1ed6db699e4bbcb6c77c1920f5f5601c0e81caa4c161487e6dc274388ba154af5a22c
|
7
|
+
data.tar.gz: a7f81b4a9bdc9e86ee4595b5d64af8f11992f09e089c14f0e9468a41cd982b6f5106b382c05051986689504bc8156ab46f7cee9ce5397972f74ed14c5a83d39c
|
@@ -3,7 +3,7 @@ class InlineEditComponent < InlineComponent
|
|
3
3
|
@wrapper_mappings = {
|
4
4
|
string: :inline_form_grow,
|
5
5
|
pg_associable: :inline_form_control,
|
6
|
-
date: :
|
6
|
+
date: :inline_form_control,
|
7
7
|
datetime: :inline_form_control,
|
8
8
|
time: :inline_multi_select,
|
9
9
|
select: :inline_form_select
|
@@ -2,6 +2,7 @@ import './config'
|
|
2
2
|
import './channels'
|
3
3
|
import './controllers'
|
4
4
|
import './elements'
|
5
|
+
import { flashMessage } from './utils/utils'
|
5
6
|
|
6
7
|
import { Turbo } from '@hotwired/turbo-rails'
|
7
8
|
|
@@ -31,6 +32,14 @@ document.addEventListener('trix-before-initialize', (ev) => {
|
|
31
32
|
Trix.config.lang.urlPlaceholder = 'Ingresá una URL'
|
32
33
|
})
|
33
34
|
|
35
|
+
window.addEventListener('trix-file-accept', function (event) {
|
36
|
+
const maxFileSize = 1024 * 1024 * 10 // 10MB
|
37
|
+
if (event.file.size > maxFileSize) {
|
38
|
+
event.preventDefault()
|
39
|
+
flashMessage('Lo siento mucho pero el tamaño máximo por archivo es de 10MB', 'warning')
|
40
|
+
}
|
41
|
+
})
|
42
|
+
|
34
43
|
document.addEventListener('pg:record-created', (ev) => {
|
35
44
|
Turbo.visit(window.location)
|
36
45
|
setTimeout(() => {
|
@@ -39,10 +48,12 @@ document.addEventListener('pg:record-created', (ev) => {
|
|
39
48
|
})
|
40
49
|
|
41
50
|
document.addEventListener('pg:record-updated', (ev) => {
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
51
|
+
if (!ev.data.dataset.inline) {
|
52
|
+
Turbo.visit(window.location)
|
53
|
+
setTimeout(() => {
|
54
|
+
Turbo.cache.clear()
|
55
|
+
}, 1000)
|
56
|
+
}
|
46
57
|
})
|
47
58
|
|
48
59
|
document.addEventListener('pg:record-destroyed', (ev) => {
|
data/pg_rails/lib/version.rb
CHANGED