Comments: Put comment content inside a span
So when editing we do not override the author's name.
This commit is contained in:
parent
8ef89d0b53
commit
cb0272fe60
@ -235,7 +235,7 @@ function commentEditCancel(clicked_item, reload_comment) {
|
||||
return loadComment(comment_id, {'properties.content': 1})
|
||||
.done(function(data) {
|
||||
var comment_html = data['properties']['content_html'];
|
||||
comment_container.find('.comment-body').html(comment_html);
|
||||
comment_container.find('.comment-body span').html(comment_html);
|
||||
})
|
||||
.fail(function(xhr) {
|
||||
if (console) console.log('Error fetching comment: ', xhr);
|
||||
|
@ -11,7 +11,7 @@
|
||||
.comment-body
|
||||
p.comment-author {{ comment._user.full_name }}
|
||||
|
||||
| {{comment.properties.content_html | safe }}
|
||||
span {{comment.properties.content_html | safe }}
|
||||
|
||||
// TODO: Markdown preview when editing
|
||||
|
||||
|
@ -154,7 +154,7 @@ script.
|
||||
var $parent_div = $(this).closest('.comment-container');
|
||||
var comment_id = $parent_div.data('node-id');
|
||||
|
||||
var comment_content = $parent_div.find('.comment-body');
|
||||
var comment_content = $parent_div.find('.comment-body span');
|
||||
var height = comment_content.height();
|
||||
|
||||
loadComment(comment_id, {'properties.content': 1})
|
||||
@ -207,7 +207,7 @@ script.
|
||||
.done(function(comment_id, comment_html) {
|
||||
commentEditCancel($button, false)
|
||||
|
||||
$container.find('.comment-body')
|
||||
$container.find('.comment-body span')
|
||||
.html(comment_html)
|
||||
.flashOnce();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user