Browse Source

Sanity-check decaffeinate app.views.ListFocus

Simon Legner 1 year ago
parent
commit
b07fd01ab1
1 changed files with 12 additions and 24 deletions
  1. 12 24
      assets/javascripts/views/list/list_focus.js

+ 12 - 24
assets/javascripts/views/list/list_focus.js

@@ -1,27 +1,16 @@
-// TODO: This file was created by bulk-decaffeinate.
-// Sanity-check the conversion and remove this comment.
-/*
- * decaffeinate suggestions:
- * DS102: Remove unnecessary code created because of implicit returns
- * DS206: Consider reworking classes to avoid initClass
- * DS207: Consider shorter variations of null checks
- * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
- */
 app.views.ListFocus = class ListFocus extends app.View {
 app.views.ListFocus = class ListFocus extends app.View {
-  static initClass() {
-    this.activeClass = "focus";
-
-    this.events = { click: "onClick" };
-
-    this.shortcuts = {
-      up: "onUp",
-      down: "onDown",
-      left: "onLeft",
-      enter: "onEnter",
-      superEnter: "onSuperEnter",
-      escape: "blur",
-    };
-  }
+  static activeClass = "focus";
+
+  static events = { click: "onClick" };
+
+  static shortcuts = {
+    up: "onUp",
+    down: "onDown",
+    left: "onLeft",
+    enter: "onEnter",
+    superEnter: "onSuperEnter",
+    escape: "blur",
+  };
 
 
   constructor(el) {
   constructor(el) {
     super(el);
     super(el);
@@ -194,4 +183,3 @@ app.views.ListFocus = class ListFocus extends app.View {
     }
     }
   }
   }
 };
 };
-app.views.ListFocus.initClass();