simplify code.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user