File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
// helper functions to make all input elements
2
2
import $ from "jquery" ;
3
3
import logging from "../core/logging" ;
4
+
4
5
const namespace = "input-change-events" ;
5
6
const log = logging . getLogger ( namespace ) ;
6
7
7
8
const _ = {
8
- setup : function ( $el , pat ) {
9
+ setup ( $el , pat ) {
9
10
if ( ! pat ) {
10
11
log . error ( "The name of the calling pattern has to be set." ) ;
11
12
return ;
@@ -28,7 +29,7 @@ const _ = {
28
29
}
29
30
} ,
30
31
31
- setupInputHandlers : function ( $el ) {
32
+ setupInputHandlers ( $el ) {
32
33
if ( ! $el . is ( ":input" ) ) {
33
34
// We've been given an element that is not a form input. We
34
35
// therefore assume that it's a container of form inputs and
@@ -41,7 +42,7 @@ const _ = {
41
42
}
42
43
} ,
43
44
44
- registerHandlersForElement : function ( ) {
45
+ registerHandlersForElement ( ) {
45
46
const $el = $ ( this ) ;
46
47
const isNumber = $el . is ( "input[type=number]" ) ;
47
48
const isText = $el . is ( "input:text, input[type=search], textarea" ) ;
@@ -73,7 +74,7 @@ const _ = {
73
74
} ) ;
74
75
} ,
75
76
76
- remove : function ( $el , pat ) {
77
+ remove ( $el , pat ) {
77
78
let patterns = $el . data ( namespace ) || [ ] ;
78
79
if ( patterns . indexOf ( pat ) === - 1 ) {
79
80
log . warn ( "input-change-events were never installed for " + pat ) ;
You can’t perform that action at this time.
0 commit comments