lato 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/javascripts/lato/controllers/lato_action_controller.js +30 -2
- data/app/assets/javascripts/lato/controllers/lato_operation_controller.js +5 -1
- data/app/views/lato/components/_index.html.erb +1 -1
- data/app/views/layouts/lato/_navbar-brand_content.html.erb +6 -1
- data/lib/lato/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: '068d1c201b840125377b8642cd80521f5a0a4666e0b1610dd5652e3cddd3bbb3'
|
4
|
+
data.tar.gz: 2cbe84bb4f4c2f9de5ea1784bd0bcfed5895a1b0d904f9ab5338f90897cca601
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db9aabc6b8fa9d03b0267112d34f89ad6724caadcdf3f2b7d7c070fa2197e182e8511f91c479280d128d38b172767916870823af3d147b7387fd7dbbd4ee511c
|
7
|
+
data.tar.gz: eb095e507554d867bd6ea8d24a3639bf507cac2e3e80b58c3ab64f96164f66b4cfd96fe1d8134450c1ba3cc0a85d5b588696eaf07e1b0dadcb153171a20d34d1
|
data/README.md
CHANGED
@@ -22,18 +22,46 @@ export default class extends Controller {
|
|
22
22
|
|
23
23
|
modalTarget.addEventListener('show.bs.modal', () => {
|
24
24
|
this.usedModals.push(index)
|
25
|
+
|
26
|
+
// update backdrop z-index in case of multiple opened modals
|
27
|
+
setTimeout(() => { // use setTimeout because bsModalBackdropElement is not always ready after 'show.bs.modal' event
|
28
|
+
if (this.usedModals.length > 1) {
|
29
|
+
for (let i = 0; i < this.usedModals.length; i++) {
|
30
|
+
const bsModal = this.bsModals[this.usedModals[i]]
|
31
|
+
|
32
|
+
const bsModalElement = bsModal._element
|
33
|
+
if (bsModalElement) bsModalElement.style.zIndex = 1055 + i + 1
|
34
|
+
|
35
|
+
const bsModalBackdropElement = bsModal._backdrop._element
|
36
|
+
if (bsModalBackdropElement) bsModalBackdropElement.style.zIndex = 1055 + i
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}, 1)
|
25
40
|
})
|
26
41
|
modalTarget.addEventListener('hide.bs.modal', () => {
|
27
|
-
|
28
|
-
|
42
|
+
setTimeout(() => {
|
43
|
+
this.usedModals = this.usedModals.filter((i) => i != index)
|
44
|
+
this.modalBodyTargets[index].innerHTML = ''
|
45
|
+
}, 500)
|
29
46
|
})
|
30
47
|
})
|
31
48
|
}
|
32
49
|
|
33
50
|
disconnect() {
|
51
|
+
// call dispose to all bootstrap modals (clear bootstrap modal)
|
34
52
|
this.bsModals.forEach((bsModal) => {
|
35
53
|
bsModal.dispose()
|
36
54
|
})
|
55
|
+
|
56
|
+
// clean modalTitle content
|
57
|
+
this.modalTitleTargets.forEach((modalTitleTarget) => {
|
58
|
+
modalTitleTarget.innerHTML = ''
|
59
|
+
})
|
60
|
+
|
61
|
+
// clean modalBody content
|
62
|
+
this.modalBodyTargets.forEach((modalBodyTarget) => {
|
63
|
+
modalBodyTarget.innerHTML = ''
|
64
|
+
})
|
37
65
|
}
|
38
66
|
|
39
67
|
triggerTargetConnected(element) {
|
@@ -12,12 +12,16 @@ export default class extends Controller {
|
|
12
12
|
|
13
13
|
connect() {
|
14
14
|
if (this.hasUpdateTarget) {
|
15
|
-
setTimeout(() => {
|
15
|
+
this._timeout = setTimeout(() => {
|
16
16
|
this.updateTarget.click()
|
17
17
|
}, 2000)
|
18
18
|
}
|
19
19
|
}
|
20
20
|
|
21
|
+
disconnect() {
|
22
|
+
if (this._timeout) clearTimeout(this._timeout)
|
23
|
+
}
|
24
|
+
|
21
25
|
outputFileTargetConnected(element) {
|
22
26
|
element.click()
|
23
27
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= turbo_frame_tag "lato_index_#{key}_#{model_name_underscore}" do %>
|
1
|
+
<%= turbo_frame_tag "lato_index_#{key}_#{model_name_underscore}", class: 'lato-index' do %>
|
2
2
|
|
3
3
|
<%= form_tag request.path, method: :get, data: { turbo_frame: '_self' } do %>
|
4
4
|
<%= hidden_field_tag :key, key %>
|
@@ -1 +1,6 @@
|
|
1
|
-
<%= Lato.config.application_title %>
|
1
|
+
<%= Lato.config.application_title %>
|
2
|
+
|
3
|
+
<!--
|
4
|
+
<img src="https://getbootstrap.com/docs/5.0/assets/brand/bootstrap-logo.svg" alt="" width="30" height="24" class="d-inline-block align-text-top">
|
5
|
+
<span><%= Lato.config.application_title %></span>
|
6
|
+
-->
|
data/lib/lato/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|