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:
Diffstat (limited to 'app/assets/javascripts/protected_tags/protected_tag_edit_list.js')
-rw-r--r--app/assets/javascripts/protected_tags/protected_tag_edit_list.js29
1 files changed, 14 insertions, 15 deletions
diff --git a/app/assets/javascripts/protected_tags/protected_tag_edit_list.js b/app/assets/javascripts/protected_tags/protected_tag_edit_list.js
index ba40c227ef4..88c7accdec6 100644
--- a/app/assets/javascripts/protected_tags/protected_tag_edit_list.js
+++ b/app/assets/javascripts/protected_tags/protected_tag_edit_list.js
@@ -1,18 +1,17 @@
-/* eslint-disable arrow-parens, no-param-reassign, no-new, comma-dangle */
+import ProtectedTagEdit from './protected_tag_edit';
-(global => {
- global.gl = global.gl || {};
+export default class ProtectedTagEditList {
+ constructor() {
+ this.$wrap = $('.protected-tags-list');
+ this.protectedTagList = [];
+ this.initEditForm();
+ }
- gl.ProtectedTagEditList = class {
- constructor() {
- this.$wrap = $('.protected-tags-list');
-
- // Build edit forms
- this.$wrap.find('.js-protected-tag-edit-form').each((i, el) => {
- new gl.ProtectedTagEdit({
- $wrap: $(el)
- });
+ initEditForm() {
+ this.$wrap.find('.js-protected-tag-edit-form').each((i, el) => {
+ this.protectedTagList[i] = new ProtectedTagEdit({
+ $wrap: $(el),
});
- }
- };
-})(window);
+ });
+ }
+}