fix: Set title attribute for page title
This commit is contained in:
parent
a30c1f8b43
commit
ecd9089c8e
1 changed files with 11 additions and 11 deletions
|
|
@ -646,19 +646,19 @@ frappe.ui.Page = Class.extend({
|
|||
return this.$title_area;
|
||||
},
|
||||
|
||||
set_title: function(txt, icon = '', stripHtml = true, tabTitle = '') {
|
||||
if(!txt) txt = "";
|
||||
|
||||
if(stripHtml) {
|
||||
txt = strip_html(txt);
|
||||
set_title: function(title, icon=null, strip=true, tab_title="") {
|
||||
if (!title) title = "";
|
||||
if (strip) {
|
||||
title = strip_html(title);
|
||||
}
|
||||
this.title = txt;
|
||||
|
||||
frappe.utils.set_title(tabTitle || txt);
|
||||
if(icon) {
|
||||
txt = '<span class="'+ icon +' text-muted" style="font-size: inherit;"></span> ' + txt;
|
||||
this.title = title;
|
||||
frappe.utils.set_title(tab_title || title);
|
||||
if (icon) {
|
||||
title = `${frappe.utils.icon(icon)} ${title}`;
|
||||
}
|
||||
this.$title_area.find(".title-text").html(txt);
|
||||
let title_wrapper = this.$title_area.find(".title-text");
|
||||
title_wrapper.html(title);
|
||||
title_wrapper.attr('title', this.title);
|
||||
},
|
||||
|
||||
set_title_sub: function(txt) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue