summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/issuable_context.js
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-10-23 15:45:09 +0300
committerFilipa Lacerda <filipa@gitlab.com>2017-10-23 15:47:50 +0300
commitd2848f9da6e0b06376ca2ed0297cdca551130aca (patch)
tree5545b5d3cf955580d0cbdad3f6839da82a450ed1 /app/assets/javascripts/issuable_context.js
parent3f9022cf78a6e8fce1781d53e86e4955bd88c3c6 (diff)
downloadgitlab-ce-d2848f9da6e0b06376ca2ed0297cdca551130aca.tar.gz
Fix CSS in load more participants
Diffstat (limited to 'app/assets/javascripts/issuable_context.js')
-rw-r--r--app/assets/javascripts/issuable_context.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/app/assets/javascripts/issuable_context.js b/app/assets/javascripts/issuable_context.js
index 1d305f1eb2f..73791edaebb 100644
--- a/app/assets/javascripts/issuable_context.js
+++ b/app/assets/javascripts/issuable_context.js
@@ -51,20 +51,19 @@ const PARTICIPANTS_ROW_COUNT = 7;
}
IssuableContext.prototype.initParticipants = function() {
- $(document).on("click", ".js-participants-more", this.toggleHiddenParticipants);
- return $(".js-participants-author").each(function(i) {
+ $(document).on('click', '.js-participants-more', this.toggleHiddenParticipants);
+ return $('.js-participants-author').each(function(i) {
if (i >= PARTICIPANTS_ROW_COUNT) {
- return $(this).addClass("js-participants-hidden").hide();
+ return $(this).addClass('js-participants-hidden').hide();
}
});
};
- IssuableContext.prototype.toggleHiddenParticipants = function(e) {
- var currentText, lessText, originalText;
- e.preventDefault();
- currentText = $(this).text().trim();
- lessText = $(this).data("less-text");
- originalText = $(this).data("original-text");
+ IssuableContext.prototype.toggleHiddenParticipants = function() {
+ const currentText = $(this).text().trim();
+ const lessText = $(this).data('less-text');
+ const originalText = $(this).data('original-text');
+
if (currentText === originalText) {
$(this).text(lessText);
@@ -73,7 +72,7 @@ const PARTICIPANTS_ROW_COUNT = 7;
$(this).text(originalText);
}
- $(".js-participants-hidden").toggle();
+ $('.js-participants-hidden').toggle();
};
return IssuableContext;