summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/subscription_select.js
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-06-30 16:27:31 -0500
committerMike Greiling <mike@pixelcog.com>2017-07-06 10:10:00 -0500
commit007d2f7076cd1c1fafc7535168af6c8dc15cb0db (patch)
tree880b265f2079e0c695454efb3a2deca3975d0de5 /app/assets/javascripts/subscription_select.js
parentc92bcb822c460b5d775d95234106508cb9ca2cc2 (diff)
downloadgitlab-ce-007d2f7076cd1c1fafc7535168af6c8dc15cb0db.tar.gz
refactor subscription_select.js to use ES class syntax
Diffstat (limited to 'app/assets/javascripts/subscription_select.js')
-rw-r--r--app/assets/javascripts/subscription_select.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/subscription_select.js b/app/assets/javascripts/subscription_select.js
index a48434181b6..37e39ce5477 100644
--- a/app/assets/javascripts/subscription_select.js
+++ b/app/assets/javascripts/subscription_select.js
@@ -1,7 +1,7 @@
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, quotes, object-shorthand, no-unused-vars, no-shadow, one-var, one-var-declaration-per-line, comma-dangle, max-len */
-window.SubscriptionSelect = (function() {
- function SubscriptionSelect() {
+class SubscriptionSelect {
+ constructor() {
$('.js-subscription-event').each(function(i, el) {
var fieldName;
fieldName = $(el).data("field-name");
@@ -28,6 +28,6 @@ window.SubscriptionSelect = (function() {
});
});
}
+}
- return SubscriptionSelect;
-})();
+window.SubscriptionSelect = SubscriptionSelect;