rails_modal_manager 1.0.11 → 1.0.12
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 +5 -1
- data/app/javascript/rails_modal_manager/index.js +13 -3
- data/lib/rails_modal_manager/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e3731afb3a3d006cd6256e0e19780bb24e433153ca2f459807137ef52e0cfaf7
|
|
4
|
+
data.tar.gz: 6acd94d81d76b5490185a8675b8ddacd3a2759fe5f039f765ed23e31f17d4020
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e81f5871bc33494bd283ac5adb41ca84571bfb9e3f9a23597e8a1b37ab1dfd62cd4033958030d2aaca80becc305593a68a0762d92d3d88c394d3ae80b693e22d
|
|
7
|
+
data.tar.gz: d87f1982e1dd5cb3df4c50f3ceea6a9fe1605ea789711528a89e942de5533d25fbdb8673d55a2d4b2e06ebc3305d9aeed27f58307c285887135f20bb873dd1ea
|
data/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Rails 애플리케이션을 위한 고급 모달 매니저입니다.
|
|
4
4
|
`@reshacs/react-modal-manager`에서 포팅되었습니다.
|
|
5
5
|
|
|
6
|
-
**Version:** 1.0.
|
|
6
|
+
**Version:** 1.0.12
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -789,6 +789,10 @@ MIT License
|
|
|
789
789
|
|
|
790
790
|
## 변경 이력
|
|
791
791
|
|
|
792
|
+
### v1.0.12
|
|
793
|
+
|
|
794
|
+
- **최소화된 모달 자동 복원**: `openModal()` 호출 시 해당 모달이 이미 열려있고 최소화된 상태라면 자동으로 복원되도록 개선
|
|
795
|
+
|
|
792
796
|
### v1.0.11
|
|
793
797
|
|
|
794
798
|
- **사이드바-서브메뉴 AJAX 연동 개선**: 사이드바 메뉴 전환 시 활성화된 서브메뉴의 콘텐츠가 자동으로 로드되도록 개선
|
|
@@ -80,14 +80,24 @@ export function initGlobalClickHandler() {
|
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Open a modal by ID
|
|
83
|
+
* If the modal is already open but minimized, it will be restored instead
|
|
83
84
|
* @param {string} modalId - The modal's ID
|
|
84
85
|
*/
|
|
85
86
|
export function openModal(modalId) {
|
|
86
87
|
const modalElement = document.getElementById(modalId)
|
|
87
|
-
if (modalElement)
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
if (!modalElement) return
|
|
89
|
+
|
|
90
|
+
// Check if the modal is already open and minimized
|
|
91
|
+
const config = modalStore.getModalConfig(modalId)
|
|
92
|
+
if (config && config.isMinimized) {
|
|
93
|
+
// Restore the minimized modal
|
|
94
|
+
modalStore.restoreModalGroup(modalId)
|
|
95
|
+
return
|
|
90
96
|
}
|
|
97
|
+
|
|
98
|
+
// Open the modal normally
|
|
99
|
+
modalElement.setAttribute('data-rmm-modal-open-value', 'true')
|
|
100
|
+
modalElement.dispatchEvent(new CustomEvent('rmm:open'))
|
|
91
101
|
}
|
|
92
102
|
|
|
93
103
|
/**
|