summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/header.js
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-10-30 18:59:16 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-10-30 18:59:16 +0000
commit430131f720187772f46e776a100273aba0d13aa6 (patch)
tree256067c6fe2e9dfbdbb97189f0b00a70c13e69a2 /app/assets/javascripts/header.js
parentbba020a56cbedd6403b637ec7f9eaee258eb7c67 (diff)
downloadgitlab-ce-430131f720187772f46e776a100273aba0d13aa6.tar.gz
Remove issue and issue status select from global namespace
Diffstat (limited to 'app/assets/javascripts/header.js')
-rw-r--r--app/assets/javascripts/header.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/app/assets/javascripts/header.js b/app/assets/javascripts/header.js
index ea2e2205077..33a352e158a 100644
--- a/app/assets/javascripts/header.js
+++ b/app/assets/javascripts/header.js
@@ -7,10 +7,12 @@ import { highCountTrim } from '~/lib/utils/text_utility';
* @param {jQuery.Event} e
* @param {String} count
*/
-$(document).on('todo:toggle', (e, count) => {
- const parsedCount = parseInt(count, 10);
- const $todoPendingCount = $('.todos-count');
+export default function initTodoToggle() {
+ $(document).on('todo:toggle', (e, count) => {
+ const parsedCount = parseInt(count, 10);
+ const $todoPendingCount = $('.todos-count');
- $todoPendingCount.text(highCountTrim(parsedCount));
- $todoPendingCount.toggleClass('hidden', parsedCount === 0);
-});
+ $todoPendingCount.text(highCountTrim(parsedCount));
+ $todoPendingCount.toggleClass('hidden', parsedCount === 0);
+ });
+}