You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2019/06/20 13:28:48 UTC

[myfaces-tobago] 04/05: TOBAGO-1633: TS refactoring: ts-lint

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git

commit b8dff7cefd6b82307208ea3556eedc162e03083b
Author: Udo Schnurpfeil <lo...@apache.org>
AuthorDate: Thu Jun 13 16:55:38 2019 +0200

    TOBAGO-1633: TS refactoring: ts-lint
---
 .../tobago-theme-standard/src/main/npm/ts/tobago-in.ts   | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-in.ts b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-in.ts
index bade8dc..8b2e46e 100644
--- a/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-in.ts
+++ b/tobago-theme/tobago-theme-standard/src/main/npm/ts/tobago-in.ts
@@ -24,6 +24,12 @@ class RegExpTest {
   private readonly element: HTMLInputElement;
   private readonly regexp: RegExp;
 
+  static init(element: HTMLElement): void {
+    for (const input of DomUtils.selfOrElementsByClassName(element, "tobago-in")) { // todo only for data-regexp
+      new RegExpTest(<HTMLInputElement>input);
+    }
+  }
+
   constructor(element: HTMLInputElement) {
 
     this.element = element;
@@ -32,7 +38,7 @@ class RegExpTest {
     console.debug("constructor: '%s'", element.id);
 
     this.element.addEventListener("change", this.checkValue.bind(this));
-  };
+  }
 
   checkValue(event: TextEvent) {
     console.debug("changed: check if '%s' is okay!", this.regexp.toString());
@@ -41,13 +47,7 @@ class RegExpTest {
     } else {
       this.element.classList.remove("border-danger");
     }
-  };
-
-  static init = function (element: HTMLElement): void {
-    for (const input of DomUtils.selfOrElementsByClassName(element, "tobago-in")) { // todo only for data-regexp
-      new RegExpTest(<HTMLInputElement>input);
-    }
-  };
+  }
 }
 
 Listener.register(RegExpTest.init, Phase.DOCUMENT_READY);