Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2017-11-15 10:08:50 +0300
committerdartcafe <github@dartcafe.de>2017-11-15 10:08:50 +0300
commit6f4a511360be1197cd96f295cbd81473485512f0 (patch)
tree55bb36b4d462ecaf36352ea75fe07ec37d452a2b /js
parent2838b7388c6059e00e8872ca485cf130ad3c9f30 (diff)
Some tidy and enhancement
Diffstat (limited to 'js')
-rw-r--r--js/vote.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/js/vote.js b/js/vote.js
index 073ea805..9df959f0 100644
--- a/js/vote.js
+++ b/js/vote.js
@@ -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 = "";