牌位列印調整,活動刪除提示訊息調整
This commit is contained in:
@@ -126,7 +126,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
deleteItem(item) {
|
deleteItem(item) {
|
||||||
if (confirm('是否確定刪除此筆資料?')) {
|
if (confirm('是否確定刪除此筆資料,如有報名資料將一併刪除?')) {
|
||||||
const index = this.data_table.list.indexOf(item)
|
const index = this.data_table.list.indexOf(item)
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
axios
|
axios
|
||||||
|
|||||||
@@ -645,9 +645,11 @@
|
|||||||
<asp:TextBox ID="subject" MaxLength="100" runat="server" CssClass="form-control" placeholder="請輸入品項名稱"></asp:TextBox>
|
<asp:TextBox ID="subject" MaxLength="100" runat="server" CssClass="form-control" placeholder="請輸入品項名稱"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="subject" runat="server" ErrorMessage="必填!" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="subject" runat="server" ErrorMessage="必填!" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-sm-2 col-form-label">牌位編號開頭</label>
|
<label class="col-sm-2 col-form-label">牌位編號開頭 *</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<asp:TextBox ID="print_init" MaxLength="20" runat="server" CssClass="form-control" placeholder="請輸入牌位編號開頭"></asp:TextBox>
|
<asp:TextBox ID="print_init" MaxLength="20" runat="server" CssClass="form-control" placeholder="請輸入牌位編號開頭"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" ControlToValidate="print_init" runat="server" ErrorMessage="必填!" Display="Dynamic" SetFocusOnError="true"></asp:RequiredFieldValidator>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 label-sm-right">
|
<div class="row mb-1 label-sm-right">
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
<label class="small" for="textHeight">物件高度</label>
|
<label class="small" for="textHeight">物件高度</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<%-- <div class="col-6">
|
||||||
<div class="form-floating mb-3">
|
<div class="form-floating mb-3">
|
||||||
<input type="text" id="textBreakCount" class="form-control form-control-sm mb-2" onchange="Printer.changeWidth()" />
|
<input type="text" id="textBreakCount" class="form-control form-control-sm mb-2" onchange="Printer.changeWidth()" />
|
||||||
<label class="small" for="textBreakCount">文字斷行(依字數)</label>
|
<label class="small" for="textBreakCount">文字斷行(依字數)</label>
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
<input type="text" id="textBreakWord" class="form-control form-control-sm mb-2" onchange="Printer.changeWidth()" />
|
<input type="text" id="textBreakWord" class="form-control form-control-sm mb-2" onchange="Printer.changeWidth()" />
|
||||||
<label class="small" for="textBreakWord">文字斷行(依文字)</label>
|
<label class="small" for="textBreakWord">文字斷行(依文字)</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>--%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -435,7 +435,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
let content = $(`<div class="tablet-element "></div>`)
|
||||||
|
.css({
|
||||||
|
position: "absolute", left: "4mm", top: "2mm", fontSize: '12px',
|
||||||
|
"z-index": 9999,
|
||||||
|
"align-items": "center"
|
||||||
|
|
||||||
|
})
|
||||||
|
.html(x.print_id);
|
||||||
|
tabletpaper.append(content);
|
||||||
//console.log("xCount:", Math.floor( xCount));
|
//console.log("xCount:", Math.floor( xCount));
|
||||||
let xFloor = Math.floor(xCount);
|
let xFloor = Math.floor(xCount);
|
||||||
|
|
||||||
@@ -688,13 +696,16 @@
|
|||||||
|
|
||||||
$(".tablet-element span").on("click", function (e) {
|
$(".tablet-element span").on("click", function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
console.log(self);
|
||||||
self.selected = $(this);
|
self.selected = $(this);
|
||||||
let fontSize = $(this).css("font-size");
|
let fontSize = $(this).css("font-size");
|
||||||
let fontFamily = $(this).css("font-family");
|
let fontFamily = $(this).css("font-family");
|
||||||
let textWidth = $(this).css("max-width");
|
let textWidth = $(this).css("max-width");
|
||||||
let textHeight = $(this).css("min-height");
|
let textHeight = $(this).css("min-height");
|
||||||
if ($(this).hasClass("liveSpan")) {
|
if ($(this).hasClass("liveSpan") || $(this).hasClass("nameSpan") || $(this).hasClass("rosterSpan")) {
|
||||||
textWidth = $(this).css("width");
|
textWidth = $(this).css("width");
|
||||||
|
textHeight = $(this).css("height");
|
||||||
|
fontSize = $(this).css("font-size");
|
||||||
} else if ($(this).hasClass("main-name") || $(this).hasClass("sub-text")) {
|
} else if ($(this).hasClass("main-name") || $(this).hasClass("sub-text")) {
|
||||||
textWidth = "";
|
textWidth = "";
|
||||||
textHeight = "";
|
textHeight = "";
|
||||||
@@ -710,24 +721,31 @@
|
|||||||
$("#textWidth").val(textWidth);
|
$("#textWidth").val(textWidth);
|
||||||
$("#textHeight").val(textHeight);
|
$("#textHeight").val(textHeight);
|
||||||
let parentElement = this.parentElement;
|
let parentElement = this.parentElement;
|
||||||
if ($(parentElement).hasClass("nameList") || $(parentElement).hasClass("liveList") || $(parentElement).hasClass("rosterList")) {
|
if ($(parentElement).hasClass("nameList") || $(parentElement).hasClass("liveList") ||
|
||||||
|
$(parentElement).hasClass("rosterList")) {
|
||||||
$("#textX").prop("readonly", true);
|
$("#textX").prop("readonly", true);
|
||||||
$("#textY").prop("readonly", true);
|
$("#textY").prop("readonly", true);
|
||||||
$("#fontSize").prop("readonly", true);
|
$("#fontSize").prop("readonly", true);
|
||||||
$("#textBreakCount").prop("readonly", false);
|
//$("#textBreakCount").prop("readonly", false);
|
||||||
$("#textBreakWord").prop("readonly", false);
|
//$("#textBreakWord").prop("readonly", false);
|
||||||
} else if ($(this).hasClass("main-name") || $(this).hasClass("sub-text")) {
|
} else if ($(this).hasClass("main-name") || $(this).hasClass("sub-text")) {
|
||||||
$("#textX").prop("readonly", true);
|
$("#textX").prop("readonly", true);
|
||||||
$("#textY").prop("readonly", true);
|
$("#textY").prop("readonly", true);
|
||||||
$("#fontSize").prop("readonly", true);
|
$("#fontSize").prop("readonly", true);
|
||||||
$("#textBreakCount").prop("readonly", true);
|
//$("#textBreakCount").prop("readonly", true);
|
||||||
$("#textBreakWord").prop("readonly", true);
|
//$("#textBreakWord").prop("readonly", true);
|
||||||
$("#textWidth").prop("readonly", true);
|
$("#textWidth").prop("readonly", true);
|
||||||
$("#textHeight").prop("readonly", true);
|
$("#textHeight").prop("readonly", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".tablet-element .rosterspan").on("click", function (e) {
|
||||||
|
$("#toast_body").html("此格式不提供單項物件修改");
|
||||||
|
self.toast.show();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
fix2(val) {
|
fix2(val) {
|
||||||
@@ -904,8 +922,28 @@
|
|||||||
if ($("#indivualSetup").prop("checked")) {
|
if ($("#indivualSetup").prop("checked")) {
|
||||||
$(this.selected).css("font-size", $("#fontSize").val())
|
$(this.selected).css("font-size", $("#fontSize").val())
|
||||||
} else if ($("#allSetup").prop("checked")) {
|
} else if ($("#allSetup").prop("checked")) {
|
||||||
$("#toast_body").html("字體大小不可在全域中修改");
|
if (this.selected.find(".liveList").length >= 1 || this.selected.find(".nameList").length >= 1 ||
|
||||||
this.toast.show();
|
this.selected.find(".rosterList").length >= 1) {
|
||||||
|
classList.forEach(w => {
|
||||||
|
if ($(this.selected.children()).first().hasClass(w)) {
|
||||||
|
$(`.${w}`).parent().each((index, y) => {
|
||||||
|
$(y).css("font-size", $("#fontSize").val())
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (this.selected.hasClass("nameSpan")) {
|
||||||
|
$(".nameSpan").css("font-size", $("#fontSize").val())
|
||||||
|
|
||||||
|
} else if (this.selected.hasClass("liveSpan")) {
|
||||||
|
$(".liveSpan").css("font-size", $("#fontSize").val())
|
||||||
|
} else if (this.selected.hasClass("rosterSpan")) {
|
||||||
|
$(".rosterSpan").css("font-size", $("#fontSize").val())
|
||||||
|
} else {
|
||||||
|
$("#toast_body").html("字體大小不可在全域中修改");
|
||||||
|
this.toast.show();
|
||||||
|
}
|
||||||
|
//$("#toast_body").html("字體大小不可在全域中修改");
|
||||||
|
//this.toast.show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "width":
|
case "width":
|
||||||
@@ -920,7 +958,7 @@
|
|||||||
} else if (this.selected.hasClass("nameSpan")) {
|
} else if (this.selected.hasClass("nameSpan")) {
|
||||||
let spans = $(this.selected.parent().first()).find(".nameSpan");
|
let spans = $(this.selected.parent().first()).find(".nameSpan");
|
||||||
spans.each(function (index, x) {
|
spans.each(function (index, x) {
|
||||||
$(x).css("max-width", $("#textWidth").val());
|
$(x).css("width", $("#textWidth").val());
|
||||||
});
|
});
|
||||||
} else if (this.selected.hasClass("liveSpan")) {
|
} else if (this.selected.hasClass("liveSpan")) {
|
||||||
let spans = $(this.selected.parent().first()).find(".liveSpan");
|
let spans = $(this.selected.parent().first()).find(".liveSpan");
|
||||||
@@ -930,13 +968,31 @@
|
|||||||
} else if (this.selected.hasClass("rosterSpan")) {
|
} else if (this.selected.hasClass("rosterSpan")) {
|
||||||
let spans = $(this.selected.parent().first()).find(".rosterSpan");
|
let spans = $(this.selected.parent().first()).find(".rosterSpan");
|
||||||
spans.each(function (index, x) {
|
spans.each(function (index, x) {
|
||||||
$(x).css("max-width", $("#textWidth").val());
|
$(x).css("width", $("#textWidth").val());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ($("#allSetup").prop("checked")) {
|
} else if ($("#allSetup").prop("checked")) {
|
||||||
$("#toast_body").html("寬度不可在全域中修改");
|
if (this.selected.find(".liveList").length >= 1 || this.selected.find(".nameList").length >= 1 ||
|
||||||
this.toast.show();
|
this.selected.find(".rosterList").length >= 1) {
|
||||||
|
classList.forEach(w => {
|
||||||
|
if ($(this.selected.children()).first().hasClass(w)) {
|
||||||
|
$(`.${w}`).parent().each((index, y) => {
|
||||||
|
$(y).css("width", $("#textWidth").val())
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (this.selected.hasClass("nameSpan")) {
|
||||||
|
$(".nameSpan").css("width", $("#textWidth").val());
|
||||||
|
|
||||||
|
} else if (this.selected.hasClass("liveSpan")) {
|
||||||
|
$(".liveSpan").css("width", $("#textWidth").val());
|
||||||
|
} else if (this.selected.hasClass("rosterSpan")) {
|
||||||
|
$(".rosterSpan").css("width", $("#textWidth").val());
|
||||||
|
} else {
|
||||||
|
$("#toast_body").html("寬度不可在全域中修改");
|
||||||
|
this.toast.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "height":
|
case "height":
|
||||||
@@ -950,7 +1006,7 @@
|
|||||||
} else if (this.selected.hasClass("nameSpan")) {
|
} else if (this.selected.hasClass("nameSpan")) {
|
||||||
let spans = $(this.selected.parent().first()).find(".nameSpan");
|
let spans = $(this.selected.parent().first()).find(".nameSpan");
|
||||||
spans.each(function (index, x) {
|
spans.each(function (index, x) {
|
||||||
$(x).css("min-height", $("#textHeight").val());
|
$(x).css("height", $("#textHeight").val());
|
||||||
});
|
});
|
||||||
} else if (this.selected.hasClass("liveSpan")) {
|
} else if (this.selected.hasClass("liveSpan")) {
|
||||||
let spans = $(this.selected.parent().first()).find(".liveSpan");
|
let spans = $(this.selected.parent().first()).find(".liveSpan");
|
||||||
@@ -961,13 +1017,31 @@
|
|||||||
} else if (this.selected.hasClass("rosterSpan")) {
|
} else if (this.selected.hasClass("rosterSpan")) {
|
||||||
let spans = $(this.selected.parent().first()).find(".rosterSpan");
|
let spans = $(this.selected.parent().first()).find(".rosterSpan");
|
||||||
spans.each(function (index, x) {
|
spans.each(function (index, x) {
|
||||||
$(x).css("min-height", $("#textHeight").val());
|
$(x).css("height", $("#textHeight").val());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ($("#allSetup").prop("checked")) {
|
} else if ($("#allSetup").prop("checked")) {
|
||||||
$("#toast_body").html("高度不可在全域中修改");
|
if (this.selected.find(".liveList").length >= 1 || this.selected.find(".nameList").length >= 1 ||
|
||||||
this.toast.show();
|
this.selected.find(".rosterList").length >= 1) {
|
||||||
|
classList.forEach(w => {
|
||||||
|
if ($(this.selected.children()).first().hasClass(w)) {
|
||||||
|
$(`.${w}`).parent().each((index, y) => {
|
||||||
|
$(y).css("height", $("#textHeight").val())
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (this.selected.hasClass("nameSpan")) {
|
||||||
|
$(".nameSpan").css("min-height", $("#textHeight").val());
|
||||||
|
|
||||||
|
} else if (this.selected.hasClass("liveSpan")) {
|
||||||
|
$(".liveSpan").css("height", $("#textHeight").val());
|
||||||
|
} else if (this.selected.hasClass("rosterSpan")) {
|
||||||
|
$(".rosterSpan").css("min-height", $("#textHeight").val());
|
||||||
|
} else {
|
||||||
|
$("#toast_body").html("高度不可在全域中修改");
|
||||||
|
this.toast.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "breakCount":
|
case "breakCount":
|
||||||
|
|||||||
Reference in New Issue
Block a user