revert(dispatch): 송장 클립보드 복사 기능 제거

J&T 가 path 방식으로 자동 조회되어 클립보드 복사가 불필요해짐.
복사 JS·토스트·CSS·data-copy 속성 삭제. 송장 링크/스타일은 유지.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 19:25:44 +09:00
parent 8523a620ad
commit 5426889f91
@@ -20,11 +20,6 @@
text-decoration:underline !important;text-decoration-line:underline !important;
text-decoration-thickness:2px;text-underline-offset:3px;cursor:pointer; }
.dsp-track-link:hover { color:#1d4ed8 !important; }
.dsp-toast { position:fixed;left:50%;bottom:24px;transform:translateX(-50%);
background:#0f172a;color:#fff;padding:10px 18px;border-radius:9px;
font-size:14px;font-weight:600;opacity:0;pointer-events:none;
transition:opacity .18s;z-index:9999;box-shadow:0 4px 16px rgba(0,0,0,.25); }
.dsp-toast.show { opacity:.96; }
.dsp-items { list-style:none;margin:0;padding:8px 0;border-top:1px dashed #e2e8f0;border-bottom:1px dashed #e2e8f0; }
.dsp-items li { font-size:16px;font-weight:600;color:#0f172a;padding:2px 0; }
.dsp-items .qty { color:#2563eb; }
@@ -82,7 +77,7 @@
<div><b>Package</b> {{ p.package_id or '—' }}</div>
<div><b>Tracking</b>
{% set turl = p.tracking_id | courier_track(p.shipping_provider) %}
{% if turl %}<a class="dsp-track-link" href="{{ turl }}" target="_blank" rel="noopener noreferrer" data-copy="{{ p.tracking_id }}">{{ p.tracking_id }}</a>
{% if turl %}<a class="dsp-track-link" href="{{ turl }}" target="_blank" rel="noopener noreferrer">{{ p.tracking_id }}</a>
{% else %}{{ p.tracking_id or '—' }}{% endif %}
</div>
</div>
@@ -111,7 +106,6 @@
{% endif %}
</div>
</div>
<div class="dsp-toast" id="dsp-toast" role="status" aria-live="polite"></div>
</section>
{% endblock %}
@@ -193,29 +187,6 @@
});
document.getElementById('dsp-search').addEventListener('input', applyFilter);
// ── 송장번호 클릭 시 클립보드 복사(공식 페이지에 붙여넣기용) ──
var toast = document.getElementById('dsp-toast');
var toastTimer = null;
function showToast(msg) {
if (!toast) return;
toast.textContent = msg;
toast.classList.add('show');
clearTimeout(toastTimer);
toastTimer = setTimeout(function () { toast.classList.remove('show'); }, 1600);
}
document.addEventListener('click', function (e) {
var a = e.target.closest('.dsp-track-link');
if (!a) return;
var num = (a.getAttribute('data-copy') || a.textContent || '').trim();
if (!num) return;
// 링크는 그대로 새 탭으로 열리고(preventDefault 안 함), 송장번호만 복사한다.
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(num)
.then(function () { showToast('송장번호 복사됨: ' + num); })
.catch(function () {});
}
});
})();
</script>
{% endblock %}