Added ability to print individual service, repair, and upgrade records.
This commit is contained in:
@@ -102,6 +102,13 @@ html {
|
||||
border-width: 2px;
|
||||
page-break-after: always;
|
||||
}
|
||||
.recordSticker {
|
||||
height: 100%;
|
||||
page-break-after: always;
|
||||
}
|
||||
.stickerNote {
|
||||
height:100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #fff !important;
|
||||
|
||||
@@ -608,6 +608,16 @@ function toggleMarkDownOverlay(textAreaName) {
|
||||
textArea.parent().children(`label[for=${textAreaName}]`).append(overlayDiv);
|
||||
}
|
||||
}
|
||||
function setMarkDownStickerNotes() {
|
||||
var stickerContainers = $(".stickerNote");
|
||||
if (stickerContainers.length > 0) {
|
||||
stickerContainers.map((index, elem) => {
|
||||
let originalStickerNote = $(elem).html().trim();
|
||||
let markDownStickerNote = markdown(originalStickerNote);
|
||||
$(elem).html(markDownStickerNote);
|
||||
});
|
||||
}
|
||||
}
|
||||
function showLinks(e) {
|
||||
var textAreaName = $(e.parentElement).attr("for");
|
||||
toggleMarkDownOverlay(textAreaName);
|
||||
@@ -618,6 +628,7 @@ function printTab() {
|
||||
}, 500);
|
||||
}
|
||||
function printContainer(htmlData) {
|
||||
$(".vehicleDetailTabContainer").addClass("hideOnPrint");
|
||||
$(".stickerPrintContainer").addClass("showOnPrint");
|
||||
$(".stickerPrintContainer").removeClass("hideOnPrint");
|
||||
$(".stickerPrintContainer").html(htmlData);
|
||||
@@ -626,6 +637,7 @@ function printContainer(htmlData) {
|
||||
setTimeout(function () {
|
||||
$(".stickerPrintContainer").removeClass("showOnPrint");
|
||||
$(".stickerPrintContainer").addClass("hideOnPrint");
|
||||
$(".vehicleDetailTabContainer").removeClass("hideOnPrint");
|
||||
$(".stickerPrintContainer").html("");
|
||||
}, 1000);
|
||||
}, 500);
|
||||
|
||||
Reference in New Issue
Block a user