diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/main.js | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/main.js')
-rw-r--r-- | app/assets/javascripts/main.js | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index de7648c31b1..ef0fef6085b 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -53,7 +53,7 @@ window.$ = jQuery; jQuery.ajaxSetup({ converters: { // eslint-disable-next-line @gitlab/require-i18n-strings, func-names - 'text script': function(text) { + 'text script': function (text) { jQuery.globalEval(text, { nonce: getCspNonceValue() }); return text; }, @@ -137,9 +137,7 @@ function deferredInitialisation() { $('.remove-row').on('ajax:success', function removeRowAjaxSuccessCallback() { tooltips.dispose(this); - $(this) - .closest('li') - .addClass('gl-display-none!'); + $(this).closest('li').addClass('gl-display-none!'); }); $('.js-remove-tr').on('ajax:before', function removeTRAjaxBeforeCallback() { @@ -147,9 +145,7 @@ function deferredInitialisation() { }); $('.js-remove-tr').on('ajax:success', function removeTRAjaxSuccessCallback() { - $(this) - .closest('tr') - .addClass('gl-display-none!'); + $(this).closest('tr').addClass('gl-display-none!'); }); const glTooltipDelay = localStorage.getItem('gl-tooltip-delay'); @@ -278,15 +274,9 @@ document.addEventListener('DOMContentLoaded', () => { $this.toggleClass('active'); if ($this.hasClass('active')) { - notesHolders - .show() - .find('.hide, .content') - .show(); + notesHolders.show().find('.hide, .content').show(); } else { - notesHolders - .hide() - .find('.content') - .hide(); + notesHolders.hide().find('.content').hide(); } $(document).trigger('toggle.comments'); @@ -308,7 +298,7 @@ document.addEventListener('DOMContentLoaded', () => { if (flashContainer && flashContainer.children.length) { flashContainer .querySelectorAll('.flash-alert, .flash-notice, .flash-success') - .forEach(flashEl => { + .forEach((flashEl) => { removeFlashClickListener(flashEl); }); } |