diff options
Diffstat (limited to 'web/packs')
-rw-r--r-- | web/packs/glsa.js | 2 | ||||
-rw-r--r-- | web/packs/src/javascript/cvetool.js | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/web/packs/glsa.js b/web/packs/glsa.js index 0490db0..8677dd7 100644 --- a/web/packs/glsa.js +++ b/web/packs/glsa.js @@ -66,7 +66,7 @@ function commentGLSA(glsaid, comment, commentType){ '<div class="row">' + '<div class="col-sm-12">' + '<span style="color:#000!important;">' + - '<span class="vcard"><a class="email" href="mailto:' + comment.User + '"> <b class="text-dark">' + comment.User + '</b></a></span>' + + '<span class="vcard"><a class="email" href="mailto:' + comment.User.Email + '"> <b class="text-dark">' + comment.User.Name + '</b></a></span>' + '</span>' + '<span class="ml-2">' + '<span class="badge badge-secondary" title="' + comment.UserBadge.Description + '" style="background: none;border: 1px solid ' + comment.UserBadge.Color + ';">' + diff --git a/web/packs/src/javascript/cvetool.js b/web/packs/src/javascript/cvetool.js index 6158714..2a04c5b 100644 --- a/web/packs/src/javascript/cvetool.js +++ b/web/packs/src/javascript/cvetool.js @@ -218,7 +218,7 @@ function format ( d ) { comments = ''; commentsObjects.forEach(function (comment, index) { var commentDate = '<small class="text-muted">' + comment.Date.split("T")[0] + ' ' + comment.Date.split("T")[1].split(".")[0] + ' UTC</small>'; - comments = comments + '<div class="col-3 text-right mb-3"><b>' + comment.User + '</b><br/>' + commentDate + '</div><div class="col-9 mb-3"><div class="card" style="background: none;"><div class="card-body">' + comment.Message + '</div></div></div>'; + comments = comments + '<div class="col-3 text-right mb-3"><b>' + comment.User.Name + '</b><br/>' + commentDate + '</div><div class="col-9 mb-3"><div class="card" style="background: none;"><div class="card-body">' + comment.Message + '</div></div></div>'; }); } @@ -315,9 +315,6 @@ function registerCommentListener(){ $( ".save-new-comment" ).click(function() { var cveid = $(this).data( "cveid" ); var comment = $('textarea.new-comment[data-cveid="' + cveid + '"]').val(); - console.log('textarea:'); - console.log(); - $.post( '/cve/comment/add', @@ -332,7 +329,7 @@ function registerCommentListener(){ console.log(data); var comment = JSON.parse(data); var commentDate = '<small class="text-muted">' + comment.Date.split("T")[0] + ' ' + comment.Date.split("T")[1].split(".")[0] + ' UTC</small>'; - var newComment = '<div class="col-3 text-right mb-3"><b>' + comment.User + '</b><br/>' + commentDate + '</div><div class="col-9 mb-3"><div class="card" style="background: none;"><div class="card-body">' + comment.Message + '</div></div></div>'; + var newComment = '<div class="col-3 text-right mb-3"><b>' + comment.User.Name + '</b><br/>' + commentDate + '</div><div class="col-9 mb-3"><div class="card" style="background: none;"><div class="card-body">' + comment.Message + '</div></div></div>'; $('.comments-section[data-cveid="' + cveid + '"]').append(newComment); } return |