+
-
+
-
-
- Loading images...
-
+
+
+
+
+
@@ -3220,4 +3239,41 @@ $('.point-overlay *').on(
}
);
+
+/**
+ * 1. IMAGE 모달이 열릴 때, 클릭한 버튼의 Customer ID를
+ * 주황색 [UPLOAD NEW IMAGE] 버튼에게 전달해주는 코드입니다.
+ */
+jQuery('#customerImageModal').on('show.bs.modal', function (event) {
+ var button = jQuery(event.relatedTarget); // 지도의 [IMAGE] 버튼
+ var cuid = button.data('cuid'); // 고객 번호 가져오기
+
+ // 모달 내부에 새로 만든 주황색 버튼에 ID를 심어줍니다.
+ jQuery('#btn-modal-upload-action').attr('data-cuid', cuid);
+
+ // (선택사항) 업체명 표시
+ var cname = button.data('cname');
+ jQuery('#imageCustomerName').text(cname);
+});
+
+/**
+ * 2. 주황색 버튼을 눌렀을 때 실제로 팝업창을 띄우는 함수입니다.
+ */
+function openCustomerImageUploadDirect(custUid) {
+ if (!custUid || custUid === 'undefined') {
+ alert("Customer ID를 찾을 수 없습니다.");
+ return;
+ }
+
+ var width = 600;
+ var height = 750;
+ var left = (window.screen.width / 2) - (width / 2);
+ var top = (window.screen.height / 2) - (height / 2);
+
+ // 경로와 변수명을 어제 확인한 /lib/ 폴더와 c_uid로 맞췄습니다.
+ var url = "/lib/customer_image_upload_popup.php?c_uid=" + custUid;
+
+ window.open(url, "uploadImage", "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + ",scrollbars=yes");
+}
+
\ No newline at end of file
diff --git a/public_html/lib/customer_image_upload_popup.php b/public_html/lib/customer_image_upload_popup.php
index 9030521..0766288 100644
--- a/public_html/lib/customer_image_upload_popup.php
+++ b/public_html/lib/customer_image_upload_popup.php
@@ -67,6 +67,7 @@ while($rstDriver = fetch_array($sqDriver)){