diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2016-08-09 15:54:58 -0500 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2016-08-10 16:29:11 -0500 |
commit | e3292f1ede67891feddfd896f16cfe42d3851558 (patch) | |
tree | 7e527eb92e230b421b9bffba0d2b9736b80c3adf | |
parent | b8130d42c212a45ad1e568f191337f0bed0a3d01 (diff) | |
download | gitlab-ce-e3292f1ede67891feddfd896f16cfe42d3851558.tar.gz |
Fix awardable button mutuality loading spinners
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/assets/javascripts/awards_handler.js | 14 |
2 files changed, 2 insertions, 13 deletions
diff --git a/CHANGELOG b/CHANGELOG index 7bfeff2a4ec..3b57a471932 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,6 +16,7 @@ v 8.11.0 (unreleased) - Expand commit message width in repo view (ClemMakesApps) - Cache highlighted diff lines for merge requests - Fix of 'Commits being passed to custom hooks are already reachable when using the UI' + - Fix awardable button mutuality loading spinners (ClemMakesApps) - Add support for using RequestStore within Sidekiq tasks via SIDEKIQ_REQUEST_STORE env variable - Optimize maximum user access level lookup in loading of notes - Add "No one can push" as an option for protected branches. !5081 diff --git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js index ea683b31f75..2c5b83e4f1e 100644 --- a/app/assets/javascripts/awards_handler.js +++ b/app/assets/javascripts/awards_handler.js @@ -161,23 +161,11 @@ $emojiButton = votesBlock.find("[data-emoji=" + mutualVote + "]").parent(); isAlreadyVoted = $emojiButton.hasClass('active'); if (isAlreadyVoted) { - this.showEmojiLoader($emojiButton); - return this.addAward(votesBlock, awardUrl, mutualVote, false, function() { - return $emojiButton.removeClass('is-loading'); - }); + this.addAward(votesBlock, awardUrl, mutualVote, false); } } }; - AwardsHandler.prototype.showEmojiLoader = function($emojiButton) { - var $loader; - $loader = $emojiButton.find('.fa-spinner'); - if (!$loader.length) { - $emojiButton.append('<i class="fa fa-spinner fa-spin award-control-icon award-control-icon-loading"></i>'); - } - return $emojiButton.addClass('is-loading'); - }; - AwardsHandler.prototype.isActive = function($emojiButton) { return $emojiButton.hasClass('active'); }; |