diff options
-rw-r--r-- | app/assets/javascripts/awards_handler.js | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js index 6cde99127b5..aee1c29eee3 100644 --- a/app/assets/javascripts/awards_handler.js +++ b/app/assets/javascripts/awards_handler.js @@ -220,13 +220,13 @@ originalTitle = this.getAwardTooltip(awardBlock); authors = originalTitle.split(FROM_SENTENCE_REGEX); authors.splice(authors.indexOf('You'), 1); - awardBlock + return awardBlock .closest('.js-emoji-btn') .removeData('title') .removeAttr('data-title') .removeAttr('data-original-title') - .attr('title', this.toSentence(authors)); - return this.resetTooltip(awardBlock); + .attr('title', this.toSentence(authors)) + .tooltip('fixTitle'); }; AwardsHandler.prototype.addYouToUserList = function(votesBlock, emoji) { @@ -238,17 +238,9 @@ users = origTitle.trim().split(FROM_SENTENCE_REGEX); } users.unshift('You'); - awardBlock.attr('title', this.toSentence(users)); - return this.resetTooltip(awardBlock); - }; - - AwardsHandler.prototype.resetTooltip = function(award) { - var cb; - award.tooltip('destroy'); - cb = function() { - return award.tooltip(); - }; - return setTimeout(cb, 200); + return awardBlock + .attr('title', this.toSentence(users)) + .tooltip('fixTitle'); }; AwardsHandler.prototype.createEmoji_ = function(votesBlock, emoji) { |