diff options
author | dartcafe <github@dartcafe.de> | 2017-11-12 10:34:30 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2017-11-12 10:34:30 +0300 |
commit | 59cddd53dc03b0a4f63d7b00d2a29509de408bef (patch) | |
tree | b6c80f3ff2fde05c87ba436601e14cf3833f2d60 /js | |
parent | 0a81ef85c0972c332e4bba992f69595719c66104 (diff) |
changed comment form
Diffstat (limited to 'js')
-rw-r--r-- | js/vote.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -132,14 +132,14 @@ $(document).ready(function () { } } var comment = document.getElementById('commentBox'); - if(comment.value.trim().length <= 0) { + if(comment.textContent.trim().length <= 0) { alert(t('polls', 'Please add some text to your comment before submitting it.')); return; } var data = { pollId: form.elements.pollId.value, userId: form.elements.userId.value, - commentBox: comment.value.trim() + commentBox: comment.textContent.trim() }; $('.new-comment .icon-loading-small').show(); $.post(form.action, data, function(data) { @@ -159,7 +159,7 @@ $(document).ready(function () { $('#no-comments').addClass('hidden'); } - $('.new-comment textarea').val('').focus(); + $('.new-comment .message').text('').focus(); $('.new-comment .icon-loading-small').hide(); $('.avatar.missing').each(function (i, obj) { |