simplify code.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2025-01-12 12:04:59 -07:00
parent 8c557ced85
commit fdbb325611
7 changed files with 136 additions and 20 deletions

View File

@@ -81,6 +81,20 @@ html {
color: #000 !important;
overflow: visible;
}
.stickerPrintContainer {
background-color: #fff !important;
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
margin: 0;
font-size: 14px;
line-height: 18px;
color: #000 !important;
overflow: visible;
z-index: 1030;
}
body {
background-color: #fff !important;
@@ -486,8 +500,4 @@ html[data-bs-theme="light"] .api-method:hover {
.lubelogger-report-banner {
border-top: thin solid black;
text-align: center;
}
.stickerPrintDiv {
z-index: 1030;
}

View File

@@ -114,13 +114,7 @@ function generateVehicleHistoryReport() {
reportParameter: result.value.selectedColumnsData
}, function (data) {
if (data) {
$("#vehicleHistoryReport").html(data);
setTimeout(function () {
window.print();
setTimeout(function () {
$("#vehicleHistoryReport").html(""); //clear out the div.
}, 1000)
}, 500);
printContainer(data);
}
})
}

View File

@@ -617,17 +617,22 @@ function printTab() {
window.print();
}, 500);
}
function printTabStickers(ids, source) {
$(".stickerPrintDiv").addClass("showOnPrint");
$(".stickerPrintDiv").removeClass("hideOnPrint");
function printContainer(htmlData) {
$(".stickerPrintContainer").addClass("showOnPrint");
$(".stickerPrintContainer").removeClass("hideOnPrint");
$(".stickerPrintContainer").html(htmlData);
setTimeout(function () {
window.print();
setTimeout(function () {
$(".stickerPrintDiv").removeClass("showOnPrint");
$(".stickerPrintDiv").addClass("hideOnPrint");
$(".stickerPrintContainer").removeClass("showOnPrint");
$(".stickerPrintContainer").addClass("hideOnPrint");
$(".stickerPrintContainer").html("");
}, 1000);
}, 500);
}
function printTabStickers(ids, source) {
printContainer("");
}
function exportVehicleData(mode) {
var vehicleId = GetVehicleId().vehicleId;
$.get('/Vehicle/ExportFromVehicleToCsv', { vehicleId: vehicleId, mode: mode }, function (data) {