refactor: button inner text change without html manipulation
This commit is contained in:
parent
f1dd3da3f0
commit
bb23efd4e7
1 changed files with 5 additions and 3 deletions
|
|
@ -320,9 +320,11 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
|
|||
const btnRect = btn[0].getBoundingClientRect();
|
||||
if (btnRect.right > containerRect.right) {
|
||||
const short_label = __("Add");
|
||||
btn.attr("title", add_button_label)
|
||||
.tooltip({ delay: { show: 100, hide: 100 }, trigger: "hover" })
|
||||
.html(`<span class="hidden-xs"> ${short_label} </span>`);
|
||||
btn.attr("title", add_button_label).tooltip({
|
||||
delay: { show: 100, hide: 100 },
|
||||
trigger: "hover",
|
||||
});
|
||||
btn.find("span").text(short_label);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue