diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
commit | aee0a117a889461ce8ced6fcf73207fe017f1d99 (patch) | |
tree | 891d9ef189227a8445d83f35c1b0fc99573f4380 /app/assets/javascripts/pages/admin/labels/index/index.js | |
parent | 8d46af3258650d305f53b819eabf7ab18d22f59e (diff) |
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'app/assets/javascripts/pages/admin/labels/index/index.js')
-rw-r--r-- | app/assets/javascripts/pages/admin/labels/index/index.js | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/app/assets/javascripts/pages/admin/labels/index/index.js b/app/assets/javascripts/pages/admin/labels/index/index.js index 0ceab3b922f..132fe5ce8fc 100644 --- a/app/assets/javascripts/pages/admin/labels/index/index.js +++ b/app/assets/javascripts/pages/admin/labels/index/index.js @@ -1,23 +1,3 @@ -function initLabels() { - const pagination = document.querySelector('.labels .gl-pagination'); - const emptyState = document.querySelector('.labels .nothing-here-block.hidden'); +import { initAdminLabels } from '~/labels'; - function removeLabelSuccessCallback() { - this.closest('li').classList.add('gl-display-none!'); - - const labelsCount = document.querySelectorAll( - 'ul.manage-labels-list li:not(.gl-display-none\\!)', - ).length; - - // display the empty state if there are no more labels - if (labelsCount < 1 && !pagination && emptyState) { - emptyState.classList.remove('hidden'); - } - } - - document.querySelectorAll('.js-remove-label').forEach((row) => { - row.addEventListener('ajax:success', removeLabelSuccessCallback); - }); -} - -initLabels(); +initAdminLabels(); |