diff options
author | dartcafe <github@dartcafe.de> | 2017-11-11 17:47:10 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2017-11-11 17:47:10 +0300 |
commit | 8eb9f37d69936168585b57cf656b07d5593692b7 (patch) | |
tree | 3b1e7b16ff1de51859f038d642fb5fcfee2929e8 /js | |
parent | f7e85f29aefaef8270de7ac4cf51e61c4c77ed4d (diff) |
add avatar to new comment
A quick fix.
Diffstat (limited to 'js')
-rw-r--r-- | js/vote.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -145,7 +145,7 @@ $(document).ready(function () { $.post(form.action, data, function(data) { var newCommentElement = '<li class="comment column"> ' + '<div class="authorRow user-cell row"> ' + - '<div class="avatar avatardiv" title="' + data.userId + '"></div> ' + + '<div class="avatar missing" title="' + data.userId + '"></div> ' + '<div class="author">' + data.userName + '</div>' + '<div class="date has-tooltip live-relative-timestamp datespan" data-timestamp="' + Date.now() + '" title="' + data.date + '">' + t('now') + '</div>' + '</div>' + @@ -156,6 +156,12 @@ $(document).ready(function () { $('.comments .comment:first').before(newCommentElement); $('.new-comment textarea').val('').focus(); $('.new-comment .icon-loading-small').hide(); + + $('.avatar.missing').each(function (i, obj) { + $(obj).avatar(obj.title, 32); + $(obj).removeClass('missing'); + }); + updateCommentsCount(); }).error(function () { alert(t('polls', 'An error occurred, your comment was not posted.')); |