From 9578fdf7d7f94e7a19d8de9aff08d12ccc892e81 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Wed, 13 Aug 2014 23:18:50 +0100 Subject: [ticket/12982] Refactoring: Cleaned up phpbb.search PHPBB3-12982 --- phpBB/styles/prosilver/template/ajax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/styles/prosilver/template/ajax.js') 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) -- cgit v1.2.1