feat(ux): 전체 시스템 모바일 UX 개선 — 햄버거메뉴·필터반응형·터치타겟·iOS줌방지
7개 시스템(tkpurchase/tksafety/tksupport/tkuser/system1/system2/system3)의 모바일 사용성 일괄 개선. system1(tkfb)의 모바일 메뉴 패턴을 3개 신규 시스템에 적용. 주요 변경: - 모바일 햄버거 메뉴: tkpurchase/tksafety/tksupport에 toggleMobileMenu+overlay 추가 - 필터 반응형: 768px 이하 2열 그리드 전환 (filter-bar/filter-actions 클래스) - 터치 타겟 44px: 테이블 액션 버튼 36px+gap, tksafety ±버튼 w-11 - iOS 줌 방지: input/select/textarea font-size 16px - tkuser: 탭 가로스크롤+fade힌트, 사이드바·grid·드롭다운 반응형 - system1: 대시보드 인라인 width 제거, 이동설비 그리드 1열 - system2: 사진그리드 4열, 유형버튼 2열 (480px 이하) - system3: 카드 내 액션 버튼 stopPropagation 추가 - 캐시 무효화: 전체 HTML ?v=2026031401 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -84,6 +84,25 @@ function doLogout() {
|
||||
location.href = getLoginUrl() + '&logout=1';
|
||||
}
|
||||
|
||||
/* ===== Mobile Menu ===== */
|
||||
function toggleMobileMenu() {
|
||||
const nav = document.getElementById('sideNav');
|
||||
const overlay = document.getElementById('mobileOverlay');
|
||||
if (!overlay) {
|
||||
const o = document.createElement('div');
|
||||
o.id = 'mobileOverlay';
|
||||
o.className = 'fixed inset-0 bg-black bg-opacity-30 hidden';
|
||||
o.style.zIndex = '30';
|
||||
o.onclick = toggleMobileMenu;
|
||||
document.body.appendChild(o);
|
||||
toggleMobileMenu();
|
||||
return;
|
||||
}
|
||||
const open = nav.classList.toggle('mobile-open');
|
||||
overlay.classList.toggle('hidden', !open);
|
||||
document.body.style.overflow = open ? 'hidden' : '';
|
||||
}
|
||||
|
||||
/* ===== Navbar ===== */
|
||||
function renderNavbar() {
|
||||
const currentPage = location.pathname.replace(/\//g, '') || 'index.html';
|
||||
@@ -102,6 +121,12 @@ function renderNavbar() {
|
||||
return `<a href="${l.href}" class="nav-link flex items-center gap-3 px-4 py-2.5 rounded-lg text-sm transition-colors ${active ? 'active' : 'text-gray-600 hover:bg-gray-100'}">
|
||||
<i class="fas ${l.icon} w-5 text-center"></i><span>${l.label}</span></a>`;
|
||||
}).join('');
|
||||
// 모바일: nav-link 클릭 시 메뉴 닫기
|
||||
nav.querySelectorAll('.nav-link').forEach(a => {
|
||||
a.addEventListener('click', () => {
|
||||
if (nav.classList.contains('mobile-open')) toggleMobileMenu();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/* ===== State ===== */
|
||||
|
||||
@@ -120,7 +120,7 @@ async function renderScheduleCards() {
|
||||
<input type="text" id="checkinNames_${s.id}" class="input-field w-full px-3 py-2 rounded-lg text-sm" placeholder="홍길동, 김철수">
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="doCheckIn(${s.id})" class="px-4 py-2 bg-emerald-600 text-white rounded-lg text-sm hover:bg-emerald-700">
|
||||
<button onclick="doCheckIn(${s.id})" class="w-full px-4 py-3 bg-emerald-600 text-white rounded-lg text-sm hover:bg-emerald-700">
|
||||
<i class="fas fa-play mr-1"></i>작업 시작
|
||||
</button>
|
||||
</div>
|
||||
@@ -295,7 +295,7 @@ function workerRowHtml(checkinId, idx, worker) {
|
||||
<input type="text" list="workerDatalist_${checkinId}" value="${escapeHtml(name)}" placeholder="작업자명" class="worker-name input-field flex-1 px-3 py-1.5 rounded-lg text-sm" data-pw-id="${pwId}">
|
||||
<input type="number" value="${hours}" step="0.5" min="0" max="24" class="worker-hours input-field w-20 px-2 py-1.5 rounded-lg text-sm text-center" placeholder="시간">
|
||||
<span class="text-xs text-gray-400">h</span>
|
||||
<button onclick="removeWorkerRow('${rowId}', ${checkinId})" class="text-gray-400 hover:text-red-500 text-sm"><i class="fas fa-times"></i></button>
|
||||
<button onclick="removeWorkerRow('${rowId}', ${checkinId})" class="text-gray-400 hover:text-red-500 text-sm p-2"><i class="fas fa-times"></i></button>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user