markdown in tooltips

This commit is contained in:
yuri
2019-09-13 15:38:23 +03:00
parent 0db2dbc0f3
commit d9cdcfa332
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -380,13 +380,14 @@ Espo.define('views/fields/base', 'view', function (Dep) {
tooltipText = this.translate(this.tooltip, 'tooltips', this.model.name);
}
tooltipText = tooltipText || this.translate(this.name, 'tooltips', this.model.name);
tooltipText = tooltipText || this.translate(this.name, 'tooltips', this.model.name) || '';
tooltipText = this.getHelper().transfromMarkdownText(tooltipText).toString();
$a.popover({
placement: 'bottom',
container: 'body',
html: true,
content: tooltipText.replace(/\n/g, "<br />"),
content: tooltipText,
}).on('shown.bs.popover', function () {
$('body').off('click.popover-' + this.id);
$('body').on('click.popover-' + this.id , function (e) {
+2 -1
View File
@@ -2463,7 +2463,8 @@ table.table td.cell .complex-text {
white-space: normal;
}
.complex-text {
.complex-text,
.popover-content {
h1:first-child,
h2:first-child,
h3:first-child,