Merge branch 'staging' into mute

This commit is contained in:
yflory
2019-12-16 14:43:14 +01:00
35 changed files with 1014 additions and 143 deletions

View File

@@ -440,6 +440,17 @@ define([
var refreshDescription = function (data) {
var val = Marked(data.description || "");
APP.$description.html(val);
APP.$description.off('click');
APP.$description.click(function (e) {
if (!e.target) { return; }
var $t = $(e.target);
if ($t.is('a') || $t.parents('a').length) {
e.preventDefault();
var $a = $t.is('a') ? $t : $t.parents('a').first();
var href = $a.attr('href');
common.openUnsafeURL(href);
}
});
APP.$descriptionEdit.find('span').text(val === "" ? Messages.profile_addDescription : Messages.profile_editDescription);
if (!APP.editor) { return; }
APP.editor.setValue(data.description || "");