diff options
author | dartcafe <github@dartcafe.de> | 2017-11-15 10:08:50 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2017-11-15 10:08:50 +0300 |
commit | 6f4a511360be1197cd96f295cbd81473485512f0 (patch) | |
tree | 55bb36b4d462ecaf36352ea75fe07ec37d452a2b /js | |
parent | 2838b7388c6059e00e8872ca485cf130ad3c9f30 (diff) |
Some tidy and enhancement
Diffstat (limited to 'js')
-rw-r--r-- | js/vote.js | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -147,8 +147,8 @@ $(document).ready(function () { '<div class="authorRow user-cell row"> ' + '<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>' + + '<div class="date has-tooltip live-relative-timestamp datespan" data-timestamp="' + Date.now() + '" title="' + data.date + '">' + t('now') + '</div>' + + '</div>' + '<div class="message wordwrap comment-content">' + data.comment + '</div>' + '</li>'; @@ -161,7 +161,7 @@ $(document).ready(function () { $('.new-comment .message').text('').focus(); $('.new-comment .icon-loading-small').hide(); - + $('.avatar.missing').each(function (i, obj) { $(obj).avatar(obj.title, 32); $(obj).removeClass('missing'); @@ -178,14 +178,18 @@ $(document).ready(function () { $(this).select(); }); - $('.toggle-cell').tooltip(); - $('.time-slot').tooltip(); - $('.avatardiv').tooltip(); $('.has-tooltip').tooltip(); updateCounters(); }); +$('#commentBox').keyup(function() { + var $message = $('#commentBox'); + if(!$message.text().trim().length) { + $message.empty(); + } +}); + $(document).on('click', '.toggle-cell, .poll-cell.active', function () { valuesChanged = true; var $nextClass = ""; |