[FIX] point_of_sale: Support RTL languages
The layout of the printed tickets was wrong when using an RTL language. We fix this and use an older version of html2canvas because the new one introduced layout issues.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,5 +1,7 @@
|
||||
.pos-receipt-print {
|
||||
width: 512px;
|
||||
text-align: left;
|
||||
direction: ltr;
|
||||
font-size: 28px;
|
||||
padding-bottom: 2em;
|
||||
color: #000000;
|
||||
|
||||
@@ -50,6 +50,7 @@ var PrinterMixin = {
|
||||
$('.pos-receipts>.pos-receipt').addClass('pos-receipt-print');
|
||||
var promise = new Promise(function (resolve, reject) {
|
||||
html2canvas($('.pos-receipt-print')[0], {
|
||||
background :'#FFFFFF',
|
||||
ignoreElements: function (node) {
|
||||
// By default, html2canvas copies the whole DOM even if we just capture a part
|
||||
// of it. When copying the list of products, it gets all of the product from the
|
||||
@@ -58,11 +59,12 @@ var PrinterMixin = {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}).then(function (canvas) {
|
||||
$('.pos-receipts').empty();
|
||||
resolve(self.process_canvas(canvas));
|
||||
});
|
||||
},
|
||||
onrendered: function (canvas) {
|
||||
$('.pos-receipts').empty();
|
||||
resolve(self.process_canvas(canvas));
|
||||
}
|
||||
})
|
||||
});
|
||||
return promise;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user