Merge branch 'fetch_friday' into 'dev'
Fetch friday See merge request korea-research/korea-research!158
This commit is contained in:
@@ -347,4 +347,13 @@ kri.form.setSelectBoxUiCode = function({
|
||||
getParentValue: () => parentSelectUI.getValue(),
|
||||
getChildValue: () => childSelectUI?.getValue() ?? ''
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
$(window).off('hashchange.modalClose').on('hashchange.modalClose', function() {
|
||||
if (window.location.hash !== '#modal-open') {
|
||||
const modal01 = document.querySelector(ENV.modal.selector)?.ui;
|
||||
if (modal01) {
|
||||
modal01.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -127,8 +127,11 @@ krip.daily.createModal = function(id) {
|
||||
|
||||
const modal01 = document.querySelector(ENV.modal.selector).ui;
|
||||
modal01.open();
|
||||
// URL 해시 추가
|
||||
window.location.hash = 'modal-open';
|
||||
|
||||
modalControl._bindModelUI();
|
||||
|
||||
},
|
||||
function(code, rstData) {
|
||||
kri.logger.error('Do nothing. code: '+ code, rstData);
|
||||
|
||||
@@ -69,39 +69,59 @@
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<!-- 모달 팝업 -->
|
||||
<div th:replace="guide/modal/modal-mobile-guide:: modalFragment"></div>
|
||||
<div th:replace="guide/modal/modal-industry-type:: modalFragment"></div>
|
||||
<div th:replace="guide/modal/modal-forest-diff:: modalFragment"></div>
|
||||
<div th:replace="guide/modal/modal-usage-type:: modalFragment"></div>
|
||||
<div th:replace="guide/modal/modal-contact:: modalFragment"></div>
|
||||
<!-- //모달 팝업 -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 모달 팝업 -->
|
||||
|
||||
<!-- //모달 팝업 -->
|
||||
<section layout:fragment="script">
|
||||
<script th:inline="javascript">
|
||||
let currentModal = null;
|
||||
|
||||
function goMobileGuide(){
|
||||
const modal = document.querySelector(".mobileGuide");
|
||||
modal.ui.open();
|
||||
openModal(modal, "mobileGuide");
|
||||
}
|
||||
function goIndustryType(){
|
||||
const modal = document.querySelector(".industryType");
|
||||
modal.ui.open();
|
||||
const modal = document.querySelector(".industryType");
|
||||
openModal(modal, "industryType");
|
||||
}
|
||||
function goForestDiff(){
|
||||
const modal = document.querySelector(".forestDiff");
|
||||
modal.ui.open();
|
||||
openModal(modal, "forestDiff");
|
||||
}
|
||||
function goUsageType(){
|
||||
const modal = document.querySelector(".usageType");
|
||||
modal.ui.open();
|
||||
openModal(modal, "usageType");
|
||||
}
|
||||
function goContact(){
|
||||
const modal = document.querySelector(".contact");
|
||||
modal.ui.open();
|
||||
openModal(modal, "contact");
|
||||
}
|
||||
function openModal(modal, modalId) {
|
||||
if (currentModal && currentModal !== modal) {
|
||||
currentModal.ui.close(); // 기존 모달 닫기
|
||||
}
|
||||
modal.ui.open();
|
||||
modal.dataset.state = "open";
|
||||
currentModal = modal;
|
||||
window.history.pushState({ modal: modalId }, null, "");
|
||||
}
|
||||
// 뒤로 가기 이벤트 처리
|
||||
window.addEventListener("popstate", function () {
|
||||
if (currentModal && currentModal.dataset.state === "open") {
|
||||
currentModal.ui.close();
|
||||
currentModal.dataset.state = "close";
|
||||
currentModal = null;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</section>
|
||||
</html>
|
||||
|
||||
@@ -104,6 +104,10 @@
|
||||
module: {
|
||||
modalPopup: null
|
||||
},
|
||||
modal: {
|
||||
// 등록 영역
|
||||
selector: '.addPopup',
|
||||
},
|
||||
data: {
|
||||
transferCategoryCodeList: /*[[${transferCategoryList}]]*/ [],
|
||||
codeRecordCropList: /*[[${codeRecordCropList}]]*/ [],
|
||||
@@ -317,6 +321,7 @@
|
||||
});
|
||||
|
||||
ENV.module.modalPopup.open();
|
||||
window.location.hash = 'modal-open';
|
||||
|
||||
document.querySelector('.modal-content').scrollTop = 0;
|
||||
|
||||
|
||||
@@ -103,6 +103,10 @@
|
||||
module: {
|
||||
modalPopup: null
|
||||
},
|
||||
modal: {
|
||||
// 등록 영역
|
||||
selector: '.addPopup',
|
||||
},
|
||||
data: {
|
||||
transferCategoryCodeList: /*[[${transferCategoryList}]]*/ [],
|
||||
codeRecordCropList: /*[[${codeRecordCropList}]]*/ [],
|
||||
@@ -307,6 +311,7 @@
|
||||
});
|
||||
|
||||
ENV.module.modalPopup.open();
|
||||
window.location.hash = 'modal-open';
|
||||
document.querySelector('.modal-content').scrollTop = 0;
|
||||
|
||||
// 모두 로드된 후 콜백 실행
|
||||
|
||||
@@ -108,7 +108,10 @@
|
||||
module: {
|
||||
modalPopup: null
|
||||
},
|
||||
|
||||
modal: {
|
||||
// 등록 영역
|
||||
selector: '.addPopup',
|
||||
},
|
||||
data: {
|
||||
purposeList: /*[[${purposeList}]]*/ [],
|
||||
unitList: /*[[${unitList}]]*/ [],
|
||||
@@ -341,6 +344,7 @@
|
||||
|
||||
|
||||
ENV.module.modalPopup.open();
|
||||
window.location.hash = 'modal-open';
|
||||
|
||||
document.querySelector('.modal-content').scrollTop = 0;
|
||||
|
||||
|
||||
@@ -152,6 +152,7 @@
|
||||
|
||||
const modal01 = document.querySelector(ENV.modal.selector).ui;
|
||||
modal01.open();
|
||||
window.location.hash = 'modal-open';
|
||||
},
|
||||
function(code, rstData) {
|
||||
kri.logger.error('Do nothing. code: '+ code, rstData);
|
||||
|
||||
Reference in New Issue
Block a user