Merge pull request #12329 from shariquerik/RTL-print-preview-fix
This commit is contained in:
commit
474f6468bc
2 changed files with 8 additions and 2 deletions
|
|
@ -412,6 +412,12 @@ frappe.ui.form.PrintView = class {
|
|||
<link href="${frappe.urllib.get_base_url()}/assets/css/printview.css" rel="stylesheet">`
|
||||
);
|
||||
|
||||
if (frappe.utils.is_rtl(this.lang_code)) {
|
||||
this.$print_format_body.find('head').append(
|
||||
`<link type="text/css" rel="stylesheet" href="${frappe.urllib.get_base_url()}/assets/css/frappe-rtl.css"></link>`
|
||||
);
|
||||
}
|
||||
|
||||
this.$print_format_body.find('body').html(
|
||||
`<div class="print-format print-format-preview">${out.html}</div>`
|
||||
);
|
||||
|
|
|
|||
|
|
@ -922,8 +922,8 @@ Object.assign(frappe.utils, {
|
|||
message: __('Copied to clipboard.')
|
||||
});
|
||||
},
|
||||
is_rtl() {
|
||||
return ["ar", "he", "fa"].includes(frappe.boot.lang);
|
||||
is_rtl(lang=null) {
|
||||
return ["ar", "he", "fa"].includes(lang || frappe.boot.lang);
|
||||
},
|
||||
bind_actions_with_object($el, object) {
|
||||
// remove previously bound event
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue