fix:모달 함수를 window 객체에 등록하여 AJAX HTML에서 접근 가능하도록

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
pro
2026-01-29 21:30:37 +09:00
parent 05f69017a2
commit 27b4295224

View File

@@ -210,8 +210,8 @@ class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none foc
@push('scripts')
<script>
// 상세 모달 열기
function openShowModal(id) {
// 전역 스코프에 함수 등록 (AJAX로 로드된 HTML에서 접근 가능하도록)
window.openShowModal = function(id) {
const modal = document.getElementById('partnerModal');
const content = document.getElementById('partnerModalContent');
@@ -252,7 +252,7 @@ function openShowModal(id) {
}
// 수정 모달 열기
function openEditModal(id) {
window.openEditModal = function(id) {
const modal = document.getElementById('partnerModal');
const content = document.getElementById('partnerModalContent');
@@ -293,7 +293,7 @@ function openEditModal(id) {
}
// 모달 닫기
function closePartnerModal() {
window.closePartnerModal = function() {
const modal = document.getElementById('partnerModal');
modal.classList.add('hidden');
document.body.style.overflow = ''; // 배경 스크롤 복원