Merge pull request #31848 from sokumon/rtl-in-widgets
fix: make arrows left in widgets in rtl languages
This commit is contained in:
commit
c2fdce01bb
2 changed files with 10 additions and 8 deletions
|
|
@ -158,10 +158,11 @@ export default class QuickListWidget extends Widget {
|
|||
</div>
|
||||
`).appendTo($quick_list_item);
|
||||
}
|
||||
|
||||
$(`<div class="right-arrow">${frappe.utils.icon("right", "xs")}</div>`).appendTo(
|
||||
$quick_list_item
|
||||
);
|
||||
let icon_to_append = `<div class="right-arrow">${frappe.utils.icon("right", "xs")}</div>`;
|
||||
if (frappe.utils.is_rtl(frappe.boot.lang)) {
|
||||
icon_to_append = `<div class="left-arrow">${frappe.utils.icon("left", "xs")}</div>`;
|
||||
}
|
||||
$(icon_to_append).appendTo($quick_list_item);
|
||||
|
||||
$quick_list_item.click((e) => {
|
||||
if (e.ctrlKey || e.metaKey) {
|
||||
|
|
|
|||
|
|
@ -59,10 +59,11 @@ export default class ShortcutWidget extends Widget {
|
|||
|
||||
set_actions() {
|
||||
if (this.in_customize_mode) return;
|
||||
|
||||
$(frappe.utils.icon("es-line-arrow-up-right", "xs", "", "", "ml-2")).appendTo(
|
||||
this.action_area
|
||||
);
|
||||
let icon_to_append = frappe.utils.icon("es-line-arrow-up-right", "xs", "", "", "ml-2");
|
||||
if (frappe.utils.is_rtl(frappe.boot.lang)) {
|
||||
icon_to_append = frappe.utils.icon("es-line-arrow-up-left", "xs", "", "", "ml-2");
|
||||
}
|
||||
$(icon_to_append).appendTo(this.action_area);
|
||||
|
||||
this.widget.addClass("shortcut-widget-box");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue