<div class="pollContainer{if POLL_FULL_WIDTH} pollContainerFullWidth{/if}" data-poll-id="{@$poll->pollID}" data-can-vote="{if $poll->canVote()}1{else}0{/if}" data-can-view-result="{if $poll->canSeeResult()}1{else}0{/if}" data-can-view-participants="{if $poll->canViewParticipants()}true{else}false{/if}" data-in-vote="{if $poll->canVote() && !$poll->isParticipant()}1{else}0{/if}" data-question="{$poll->question}" data-max-votes="{@$poll->maxVotes}" data-is-public="{if $poll->isPublic}true{else}false{/if}">
<section>
- <h2>{$poll->question} <span class="badge jsTooltip" title="{lang}wcf.poll.totalVotes{/lang}">{#$poll->votes}</span></h2>
+ <h2>{$poll->question} <span class="badge jsTooltip jsPollTotalVotes" title="{lang}wcf.poll.totalVotes{/lang}">{#$poll->votes}</span></h2>
<div class="pollInnerContainer">
{if !$__wcf->getUser()->userID}
this._canViewParticipants[$pollID] = true;
}
+ var totalVotes = elBySel('.jsPollTotalVotes', this._polls[$pollID][0]);
+ totalVotes.textContent = WCF.String.formatNumeric(data.totalVotes);
+ elData(totalVotes, 'tooltip', data.totalVotesTooltip);
+
this._showResult(null, $pollID);
break;
}
}
$returnValues['canVote'] = $this->poll->isChangeable ? 1 : 0;
+ $returnValues['totalVotes'] = $this->poll->votes;
+ $returnValues['totalVotesTooltip'] = WCF::getLanguage()->getDynamicVariable('wcf.poll.totalVotes', ['poll' => $this->poll]);
}
}