isite 2021.12.1 → 2021.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.page-a4 {
|
|
6
|
-
width: 210mm !important;
|
|
7
6
|
height: 297mm !important;
|
|
8
7
|
padding: 2mm !important;
|
|
9
8
|
margin: 0mm !important;
|
|
@@ -15,7 +14,6 @@
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
.page-width-a4 {
|
|
18
|
-
width: 210mm;
|
|
19
17
|
padding: 2mm;
|
|
20
18
|
margin: 0mm;
|
|
21
19
|
}
|
|
@@ -27,6 +25,10 @@ body.a4 {
|
|
|
27
25
|
body.a4 {
|
|
28
26
|
height: 297mm;
|
|
29
27
|
}
|
|
28
|
+
body.print-mode{
|
|
29
|
+
padding: 0px !important;
|
|
30
|
+
margin: 2mm !important;
|
|
31
|
+
}
|
|
30
32
|
body.print-mode .hide {
|
|
31
33
|
visibility: visible;
|
|
32
34
|
}
|
|
@@ -39,7 +41,6 @@ body.print-mode .print-only {
|
|
|
39
41
|
}
|
|
40
42
|
body.print-mode .table {
|
|
41
43
|
table-layout: fixed;
|
|
42
|
-
max-width: 206mm !important;
|
|
43
44
|
border-collapse: collapse;
|
|
44
45
|
border: 1px solid black;
|
|
45
46
|
font-size: 8pt;
|
|
@@ -66,6 +67,12 @@ body.print-mode textarea {
|
|
|
66
67
|
body.print-mode .small {
|
|
67
68
|
font-size: 6pt;
|
|
68
69
|
}
|
|
70
|
+
|
|
71
|
+
.page {
|
|
72
|
+
page-break-before: always;
|
|
73
|
+
page-break-after: always;
|
|
74
|
+
page-break-inside: avoid !important;
|
|
75
|
+
}
|
|
69
76
|
@media print {
|
|
70
77
|
:root {
|
|
71
78
|
--legend-color: #000;
|
|
@@ -76,6 +83,7 @@ body.print-mode .small {
|
|
|
76
83
|
/* this section always occupies it's own page or pages. */
|
|
77
84
|
page-break-before: always;
|
|
78
85
|
page-break-after: always;
|
|
86
|
+
page-break-inside: avoid !important;
|
|
79
87
|
}
|
|
80
88
|
|
|
81
89
|
.print-break {
|
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
|
-
<html lang="en"
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
7
|
+
<title>Print</title>
|
|
8
|
+
</head>
|
|
3
9
|
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
8
|
-
<title> Print </title>
|
|
9
|
-
</head>
|
|
10
|
+
<body class="print-mode">
|
|
11
|
+
##data.content##
|
|
10
12
|
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})
|
|
21
|
-
window.addEventListener('load' , ()=>{
|
|
22
|
-
window.print({})
|
|
23
|
-
})
|
|
24
|
-
/*
|
|
13
|
+
<style></style>
|
|
14
|
+
<script>
|
|
15
|
+
document.querySelectorAll('.not-print').forEach((el) => {
|
|
16
|
+
el.remove();
|
|
17
|
+
});
|
|
18
|
+
window.addEventListener('load', () => {
|
|
19
|
+
window.print({});
|
|
20
|
+
});
|
|
21
|
+
/*
|
|
25
22
|
Repeat table headers in every page if table too large
|
|
26
23
|
use thead & tbody
|
|
27
24
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</
|
|
31
|
-
|
|
32
|
-
</html>
|
|
25
|
+
</script>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
@@ -12,7 +12,7 @@ site.print = site.printHTML = function (options) {
|
|
|
12
12
|
return false;
|
|
13
13
|
}
|
|
14
14
|
if (!options.ip) {
|
|
15
|
-
options.ip = '
|
|
15
|
+
options.ip = '127.0.0.1';
|
|
16
16
|
}
|
|
17
17
|
if (!options.port) {
|
|
18
18
|
options.port = '60080';
|
|
@@ -25,7 +25,9 @@ site.print = site.printHTML = function (options) {
|
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
window.document.querySelectorAll('style').forEach((s) => {
|
|
28
|
-
|
|
28
|
+
if (s.innerHTML.indexOf('ng-') === -1) {
|
|
29
|
+
content += s.outerHTML;
|
|
30
|
+
}
|
|
29
31
|
});
|
|
30
32
|
|
|
31
33
|
if (options.links) {
|
|
@@ -78,15 +80,12 @@ site.print = site.printHTML = function (options) {
|
|
|
78
80
|
})
|
|
79
81
|
.then((res) => res.text())
|
|
80
82
|
.then((html) => {
|
|
83
|
+
options.html = html;
|
|
84
|
+
options.type = 'html';
|
|
81
85
|
site.postData(
|
|
82
86
|
{
|
|
83
87
|
url: `http://${options.ip}:${options.port}/print`,
|
|
84
|
-
data:
|
|
85
|
-
html: html,
|
|
86
|
-
type: 'html',
|
|
87
|
-
printer: options.printer,
|
|
88
|
-
width: options.width ?? 320,
|
|
89
|
-
},
|
|
88
|
+
data: options,
|
|
90
89
|
},
|
|
91
90
|
(res) => {
|
|
92
91
|
console.log(res);
|