Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1661,7 +1661,7 @@ async function printVisibleRows () {
|
|||||||
const body = filteredRows.value.map((row) => `<tr>${cols.map((c) => {
|
const body = filteredRows.value.map((row) => `<tr>${cols.map((c) => {
|
||||||
if (c.name === 'image') {
|
if (c.name === 'image') {
|
||||||
return row.imageUrl
|
return row.imageUrl
|
||||||
? `<td class="img-cell"><img src="${escapeHtml(row.imageUrl)}" class="thumb"></td>`
|
? `<td class="img-cell"><img src="${escapeHtml(row.imageUrl)}" class="thumb" loading="eager" decoding="sync"></td>`
|
||||||
: '<td class="img-cell"></td>'
|
: '<td class="img-cell"></td>'
|
||||||
}
|
}
|
||||||
const cls = [
|
const cls = [
|
||||||
@@ -1688,7 +1688,8 @@ async function printVisibleRows () {
|
|||||||
.title-main { font-size: 14px; font-weight: 800; color: #957116; }
|
.title-main { font-size: 14px; font-weight: 800; color: #957116; }
|
||||||
.title-meta { font-size: 8px; color: #56616f; margin-top: 2px; }
|
.title-meta { font-size: 8px; color: #56616f; margin-top: 2px; }
|
||||||
td { background: #fff; line-height: 1.18; min-height: 24px; }
|
td { background: #fff; line-height: 1.18; min-height: 24px; }
|
||||||
.num, .price { text-align: right; font-weight: 700; white-space: nowrap; }
|
.num { text-align: right; font-weight: 700; white-space: nowrap; }
|
||||||
|
.price { text-align: center; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
|
||||||
.campaign-price { background: #eef7ee; color: #0f6b2f; font-weight: 800; }
|
.campaign-price { background: #eef7ee; color: #0f6b2f; font-weight: 800; }
|
||||||
.wrap { white-space: normal; font-size: 8px; line-height: 1.12; }
|
.wrap { white-space: normal; font-size: 8px; line-height: 1.12; }
|
||||||
.img-cell { text-align: center; padding: 2px; }
|
.img-cell { text-align: center; padding: 2px; }
|
||||||
@@ -1725,6 +1726,9 @@ async function printVisibleRows () {
|
|||||||
var imgs=Array.prototype.slice.call(document.images||[]);
|
var imgs=Array.prototype.slice.call(document.images||[]);
|
||||||
var waits=imgs.map(function(img){
|
var waits=imgs.map(function(img){
|
||||||
if(img.complete) return Promise.resolve();
|
if(img.complete) return Promise.resolve();
|
||||||
|
if(img.decode) {
|
||||||
|
return img.decode().catch(function(){});
|
||||||
|
}
|
||||||
return new Promise(function(resolve){
|
return new Promise(function(resolve){
|
||||||
img.onload=resolve;
|
img.onload=resolve;
|
||||||
img.onerror=resolve;
|
img.onerror=resolve;
|
||||||
@@ -1732,7 +1736,7 @@ async function printVisibleRows () {
|
|||||||
});
|
});
|
||||||
Promise.race([
|
Promise.race([
|
||||||
Promise.all(waits),
|
Promise.all(waits),
|
||||||
new Promise(function(resolve){ setTimeout(resolve,2500); })
|
new Promise(function(resolve){ setTimeout(resolve,8000); })
|
||||||
]).then(function(){ setTimeout(function(){ window.print(); },150); });
|
]).then(function(){ setTimeout(function(){ window.print(); },150); });
|
||||||
}
|
}
|
||||||
<\/script>
|
<\/script>
|
||||||
@@ -1760,7 +1764,7 @@ function printColumnWidthMm (col) {
|
|||||||
if (col.name === 'campaignRate') return 12
|
if (col.name === 'campaignRate') return 12
|
||||||
if (col.name === 'icerik') return 24
|
if (col.name === 'icerik') return 24
|
||||||
if (col.name === 'karisim') return 26
|
if (col.name === 'karisim') return 26
|
||||||
if (priceColumnNames.includes(col.name)) return col.name.endsWith('Campaign') ? 18 : 16
|
if (priceColumnNames.includes(col.name)) return 15
|
||||||
return Math.max(12, Math.min(22, Math.round(extractWidth(col.style) * 0.22)))
|
return Math.max(12, Math.min(22, Math.round(extractWidth(col.style) * 0.22)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user