feat(inout,project): 남은 수량 채우기 되돌리기 · 업무 창/보드 카드에 파일 끌어 놓아 첨부

[입출고] [남은 수량 모두 채우기]를 한 번 더 누르면 채우기 전 값으로([채운 수량 되돌리기])
[프로젝트] 업무 창 아무 곳·보드 메인 업무 카드에 파일을 놓으면 첨부(여러 개), 받는 곳 밖에 놓쳐도 화면 이동 없음
[프로젝트] [파일 추가] 여러 개 선택, 도움말 갱신

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 14:41:26 +09:00
parent cc3e702204
commit a29854b2cb
21 changed files with 188 additions and 38 deletions
+25 -4
View File
@@ -242,11 +242,32 @@
if (total) total.textContent = t ? "(" + fmt(t) + "개)" : "";
};
recvForm.addEventListener("input", paintTotal);
// [남은 수량 모두 채우기] — 한 번 더 누르면 채우기 전 값으로 되돌린다(2026-10-19). 채운 뒤 손으로 고친 칸도 되돌림.
const fill = document.getElementById("io-fill-remaining");
if (fill) fill.addEventListener("click", function () {
inputs.forEach(function (i) { if (!i.value.trim() && num(i.dataset.remaining)) i.value = i.dataset.remaining; });
paintTotal();
});
if (fill) {
const fillLabel = fill.textContent;
let before = null; // 채우기 직전 칸 값들 — 있으면 다음 클릭은 되돌리기
const setMode = function (filled) {
before = filled ? before : null;
fill.textContent = filled ? "채운 수량 되돌리기" : fillLabel;
fill.setAttribute("aria-pressed", filled ? "true" : "false");
fill.classList.toggle("is-filled", filled);
};
fill.addEventListener("click", function () {
if (before) {
inputs.forEach(function (i, k) { i.value = before[k]; });
setMode(false);
} else {
const snap = inputs.map(function (i) { return i.value; });
let changed = false;
inputs.forEach(function (i) {
if (!i.value.trim() && num(i.dataset.remaining)) { i.value = i.dataset.remaining; changed = true; }
});
if (changed) { before = snap; setMode(true); }
}
paintTotal();
});
}
paintTotal();
}