프론트 이용안내 붙이기

This commit is contained in:
주수현
2025-07-17 14:22:10 +09:00
parent 2e53a12535
commit ec5a99af2a
62 changed files with 1481 additions and 15 deletions

View File

@@ -226,6 +226,53 @@ etUI.utils.ready(function () {
});
};
// [공통] select-group.type-tab 탭 스타일 셀렉트 처리
etUI.pages.initTabStyleSelect = function () {
const tabSelectGroups = document.querySelectorAll('.select-group.type-tab');
tabSelectGroups.forEach(group => {
const select = group.querySelector('.component-select');
const selectBox = select.querySelector('.select-box');
const options = select.querySelectorAll('.option');
const details = group.querySelectorAll('.select-detail');
// 모든 detail 숨기기
const updateDetailVisibility = (selectedText) => {
details.forEach(detail => {
const matchValue = detail.getAttribute('data-option');
if (matchValue === selectedText) {
detail.classList.add('show');
} else {
detail.classList.remove('show');
}
});
};
// 초기 설정: select-box에 현재 선택된 텍스트 확인
const defaultSelectedText = selectBox.querySelector('.select-txt')?.textContent.trim();
if (defaultSelectedText) {
updateDetailVisibility(defaultSelectedText);
}
// 옵션 클릭 이벤트
options.forEach(option => {
option.addEventListener('click', function () {
const selectedText = this.textContent.trim();
// 텍스트 변경
selectBox.querySelector('.select-txt').textContent = selectedText;
// current 클래스 업데이트
options.forEach(opt => opt.classList.remove('current'));
this.classList.add('current');
// detail 표시 갱신
updateDetailVisibility(selectedText);
});
});
});
};
// 2025.06.17 삭제
// [공통] appbar 아이콘 활성화
// etUI.pages.activeAppbarOnPath = function () {
@@ -323,5 +370,6 @@ etUI.utils.ready(function () {
etUI.pages.headerScroll();
etUI.pages.tabButtonToggle();
etUI.pages.scrollTop();
etUI.pages.initTabStyleSelect();
});
});