Merge branch 'hotfix/5.8.3'

This commit is contained in:
Yuri Kuznetsov
2020-03-05 16:30:19 +02:00
4 changed files with 19 additions and 3 deletions
+4
View File
@@ -333,6 +333,10 @@ define('view-helper', ['lib!client/lib/purify.min.js'], function () {
text = DOMPurify.sanitize(text).toString();
if (options.linksInNewTab) {
text = text.replace(/<a href=/gm, '<a target="_blank" rel="noopener noreferrer" href=');
}
text = text.replace(/<a href="mailto:(.*)"/gm, '<a href="javascript:" data-email-address="$1" data-action="mailTo"');
return new Handlebars.SafeString(text);
+13 -1
View File
@@ -74,6 +74,8 @@ define('views/detail', 'views/main', function (Dep) {
this.setupHeader();
this.setupRecord();
this.setupPageTitle();
if (this.getMetadata().get('scopes.' + this.scope + '.stream')) {
if (this.model.has('isFollowed')) {
this.handleFollowButton();
@@ -85,6 +87,17 @@ define('views/detail', 'views/main', function (Dep) {
}
},
setupPageTitle: function () {
this.listenTo(this.model, 'after:save', function () {
this.updatePageTitle();
}, this);
this.listenTo(this.model, 'sync', function (model) {
if (model && model.hasChanged('name')) {
this.updatePageTitle();
}
}, this);
},
setupHeader: function () {
this.createView('header', this.headerView, {
model: this.model,
@@ -98,7 +111,6 @@ define('views/detail', 'views/main', function (Dep) {
if (this.getView('header')) {
this.getView('header').reRender();
}
this.updatePageTitle();
}
}, this);
},
+1 -1
View File
@@ -109,7 +109,7 @@ define('views/email/record/compose', ['views/record/edit', 'views/email/record/d
body = this.appendSignature(body || '', data.isHtml);
}
if (this.initialBody) {
if (this.initialBody && !this.isBodyChanged) {
var initialBody = this.initialBody;
if (data.isHtml !== this.initialIsHtml) {
if (data.isHtml) {
+1 -1
View File
@@ -381,7 +381,7 @@ Espo.define('views/fields/base', 'view', function (Dep) {
}
tooltipText = tooltipText || this.translate(this.name, 'tooltips', this.model.name) || '';
tooltipText = this.getHelper().transfromMarkdownText(tooltipText).toString();
tooltipText = this.getHelper().transfromMarkdownText(tooltipText, {linksInNewTab: true}).toString();
$a.popover({
placement: 'bottom',