diff options
author | Callum Macrae <callum@macr.ae> | 2014-08-13 23:18:50 +0100 |
---|---|---|
committer | Callum Macrae <callum@macr.ae> | 2014-08-13 23:18:50 +0100 |
commit | 9578fdf7d7f94e7a19d8de9aff08d12ccc892e81 (patch) | |
tree | 8160522716d5936309e71c450888e275751997b6 /phpBB/styles/prosilver/template/ajax.js | |
parent | d79fec1c3fc57730807700610a69a9cf81df8c0c (diff) | |
download | forums-9578fdf7d7f94e7a19d8de9aff08d12ccc892e81.tar forums-9578fdf7d7f94e7a19d8de9aff08d12ccc892e81.tar.gz forums-9578fdf7d7f94e7a19d8de9aff08d12ccc892e81.tar.bz2 forums-9578fdf7d7f94e7a19d8de9aff08d12ccc892e81.tar.xz forums-9578fdf7d7f94e7a19d8de9aff08d12ccc892e81.zip |
[ticket/12982] Refactoring: Cleaned up phpbb.search
PHPBB3-12982
Diffstat (limited to 'phpBB/styles/prosilver/template/ajax.js')
-rw-r--r-- | phpBB/styles/prosilver/template/ajax.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js index 7bf1cfb7a9..123d5ce7f9 100644 --- a/phpBB/styles/prosilver/template/ajax.js +++ b/phpBB/styles/prosilver/template/ajax.js @@ -235,7 +235,7 @@ phpbb.addAjaxCallback('vote_poll', function(res) { var $this = $(this); var optionId = $this.attr('data-poll-option-id'); var voted = (typeof res.user_votes[optionId] !== 'undefined'); - var mostVoted = (res.vote_counts[optionId] == mostVotes); + var mostVoted = (res.vote_counts[optionId] === mostVotes); var percent = (!res.total_votes) ? 0 : Math.round((res.vote_counts[optionId] / res.total_votes) * 100); var percentRel = (mostVotes === 0) ? 0 : Math.round((res.vote_counts[optionId] / mostVotes) * 100); @@ -245,7 +245,7 @@ phpbb.addAjaxCallback('vote_poll', function(res) { // Update the bars var bar = $this.find('.resultbar div'); var barTimeLapse = (res.can_vote) ? 500 : 1500; - var newBarClass = (percent == 100) ? 'pollbar5' : 'pollbar' + (Math.floor(percent / 20) + 1); + var newBarClass = (percent === 100) ? 'pollbar5' : 'pollbar' + (Math.floor(percent / 20) + 1); setTimeout(function () { bar.animate({width: percentRel + '%'}, 500) |