fix(malaysia): 인쇄 미리보기에서 빈 랙 제외
선택한 칸 중 비어 있는 칸은 미리보기/인쇄에서 제외. 선택한 칸이 모두 비어 있으면 '인쇄할 문서가 없습니다' 안내 후 미리보기를 열지 않음. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -154,5 +154,5 @@
|
|||||||
<div class="rvp-pages" id="rvp-pages"></div>
|
<div class="rvp-pages" id="rvp-pages"></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<script src="/static/malaysia_rack_view.js?v=20260615b"></script>
|
<script src="/static/malaysia_rack_view.js?v=20260615c"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -155,20 +155,22 @@
|
|||||||
alert(t("인쇄할 칸을 먼저 선택하세요.", "Select cells to print first."));
|
alert(t("인쇄할 칸을 먼저 선택하세요.", "Select cells to print first."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 빈 칸은 인쇄 대상에서 제외. 내용 있는 칸만 인쇄.
|
||||||
|
var withItems = picked.filter(function (c) { return getEntries(c).length > 0; });
|
||||||
|
if (!withItems.length) {
|
||||||
|
alert(t("인쇄할 문서가 없습니다. (선택한 칸이 모두 비어 있습니다)",
|
||||||
|
"Nothing to print. (All selected cells are empty.)"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
var pages = document.getElementById("rvp-pages");
|
var pages = document.getElementById("rvp-pages");
|
||||||
pages.innerHTML = "";
|
pages.innerHTML = "";
|
||||||
picked.forEach(function (cell) {
|
withItems.forEach(function (cell) {
|
||||||
var arr = getEntries(cell);
|
var arr = getEntries(cell);
|
||||||
var sheet = document.createElement("div");
|
var sheet = document.createElement("div");
|
||||||
sheet.className = "rvp-sheet";
|
sheet.className = "rvp-sheet";
|
||||||
var list = document.createElement("div");
|
var list = document.createElement("div");
|
||||||
list.className = "rvp-list";
|
list.className = "rvp-list";
|
||||||
if (!arr.length) {
|
{
|
||||||
var em = document.createElement("div");
|
|
||||||
em.className = "rvp-empty";
|
|
||||||
em.textContent = t("(비어 있음)", "(empty)");
|
|
||||||
list.appendChild(em);
|
|
||||||
} else {
|
|
||||||
arr.forEach(function (e) {
|
arr.forEach(function (e) {
|
||||||
var total = (Number(e.upb) || 0) * (Number(e.box) || 0);
|
var total = (Number(e.upb) || 0) * (Number(e.box) || 0);
|
||||||
var nm = splitName(nameOf(e));
|
var nm = splitName(nameOf(e));
|
||||||
|
|||||||
Reference in New Issue
Block a user