Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-08-11 02:59:38 +0300
committerFatih Acet <acetfatih@gmail.com>2016-08-11 02:59:38 +0300
commit928edde2e6af7689b42453998bd2d129a352877d (patch)
treecc135fe951df4603c81deb1a1b6c7bb78b41e2e0
parent279c61f3cbe79f37578ff4366adfc55a63cc5b5b (diff)
parente3292f1ede67891feddfd896f16cfe42d3851558 (diff)
Merge branch 'fix-thumbs-award-loading-toggle' into 'master'
Fix awardable button mutuality loading spinners ## What does this MR do? Removes the showing and hiding of loading spinners when an awardable's opposite button is selected. ## Are there points in the code the reviewer needs to double check? Shouldn't be ## Why was this MR needed? Makes the UI more consistent. Reduces confusion of why another button is showing the loading spinner when it was not clicked on. ## What are the relevant issue numbers? Closes #18380 ## Screenshots (if relevant) Before: ![loading](/uploads/d4c4e565fa58fbbf3db6ed8e28f9abb0/loading.gif) After: ![CcwRYZcUVm](/uploads/b93fd04853f43a6c70de3cefb20d08a1/CcwRYZcUVm.gif) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5745
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/javascripts/awards_handler.js14
2 files changed, 2 insertions, 13 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 7126f390417..56ab89abaf9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -18,6 +18,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');
};