Passed
Push — feature/add-2fa-support ( 23e818...85b1f3 )
by Chris
24:19 queued 11:16
created

reliability.js ➔ dialogSizing   B

Complexity

Conditions 6

Size

Total Lines 28
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 6
eloc 18
dl 0
loc 28
rs 8.5666
c 0
b 0
f 0
1
// Clone Playground: JavaScript
2
3
// Age of Consent ==============================================================
4
$("[data-gc-parent-guardian-consent-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
5
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
6
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
7
    } else {
8
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
9
        $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
10
        $("[data-gc-parent-guardian-consent]").removeClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
11
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
12
        $("[data-gc-personal-consent-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
13
        $("[data-gc-personal-consent]").addClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
14
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
15
});
16
17
$("[data-gc-personal-consent-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
18
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Replace ···· with ··
Loading history...
introduced by
Empty block statement.
Loading history...
19
0 ignored issues
show
introduced by
Replace ⏎···· with ··
Loading history...
20
    } else {
21
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
22
        $(this).addClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
23
        $("[data-gc-personal-consent]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
24
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
25
        $("[data-gc-parent-guardian-consent-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
26
        $("[data-gc-parent-guardian-consent]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
27
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
28
});
29
30
// Birth Name ==================================================================
31
$("[data-gc-birth-name-same-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
32
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
33
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
34
    } else {
35
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
36
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
37
        $("[data-gc-birth-name-different-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
38
        $("[data-gc-birth-name-different]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
39
    }
0 ignored issues
show
introduced by
Replace ···· with ··
Loading history...
40
});
41
42
$("[data-gc-birth-name-different-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
43
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
44
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
45
    } else {
46
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
47
        $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
48
        $("[data-gc-birth-name-different]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
49
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
50
        $("[data-gc-birth-name-same-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
51
        $("[data-gc-birth-name-same]").addClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
52
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
53
});
54
55
// Legal Names =================================================================
56
$("[data-gc-legal-name-same-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
57
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
58
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
59
    } else {
60
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
61
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
62
        $("[data-gc-legal-name-different-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
63
        $("[data-gc-legal-name-different]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
64
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
65
});
66
67
$("[data-gc-legal-name-different-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
68
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Replace ···· with ··
Loading history...
introduced by
Empty block statement.
Loading history...
69
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
70
    } else {
71
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
72
        $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
73
        $("[data-gc-legal-name-different]").removeClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
74
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
75
        $("[data-gc-legal-name-same-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
76
        $("[data-gc-legal-name-same]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
77
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
78
});
79
80
    // Repeater ----------------------------------------------------------------
0 ignored issues
show
introduced by
Delete ····
Loading history...
81
82
// Citizenship =================================================================
83
$("[data-gc-citizen-true-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
84
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
85
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
86
    } else {
87
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
88
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
89
        $("[data-gc-citizen-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
90
        $("[data-gc-citizen-false]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
91
    }
0 ignored issues
show
introduced by
Replace ···· with ··
Loading history...
92
});
93
94
$("[data-gc-citizen-false-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
95
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
96
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
97
    } else {
98
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
99
        $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
100
        $("[data-gc-citizen-false]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
101
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
102
        $("[data-gc-citizen-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
103
        $("[data-gc-citizen-true]").addClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
104
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
105
});
106
107
// Multiple Citizenship ========================================================
108
$("[data-gc-multiple-citizen-true-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
109
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
110
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
111
    } else {
112
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
113
        $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
114
        $("[data-gc-multiple-citizen-true]").removeClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
115
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
116
        $("[data-gc-multiple-citizen-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
117
        $("[data-gc-multiple-citizen-false]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
118
    }
0 ignored issues
show
introduced by
Replace ···· with ··
Loading history...
119
});
120
121
$("[data-gc-multiple-citizen-false-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
122
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
123
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
124
    } else {
125
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
126
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
127
        $("[data-gc-multiple-citizen-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
128
        $("[data-gc-multiple-citizen-true]").addClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
129
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
130
});
131
132
// Born Outside the Country ====================================================
133
$("[data-gc-home-select]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
134
    if ($(this).val() === "Canada") {
0 ignored issues
show
introduced by
Delete ··
Loading history...
135
        $("[data-gc-foreign-born]").addClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
136
    } else {
0 ignored issues
show
introduced by
Delete ··
Loading history...
137
        $("[data-gc-foreign-born]").removeClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
138
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
139
});
140
141
// Naturalization ==============================================================
142
$("[data-gc-naturalization-true-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
143
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
144
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
145
    } else {
146
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
147
        $(this).addClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
148
        $("[data-gc-naturalization-true]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
149
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
150
        $("[data-gc-naturalization-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
151
        $("[data-gc-naturalization-false]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
152
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
153
});
154
155
$("[data-gc-naturalization-false-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
156
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Replace ···· with ··
Loading history...
introduced by
Empty block statement.
Loading history...
157
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
158
    } else {
159
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
160
        $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
161
        $("[data-gc-naturalization-false]").removeClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
162
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
163
        $("[data-gc-naturalization-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
164
        $("[data-gc-naturalization-true]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
165
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
166
});
167
168
// Naturalization w/ Citizenship ===============================================
169
$("[data-gc-naturalization-application-true-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
170
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
171
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
172
    } else {
173
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
174
        $(this).addClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
175
        $("[data-gc-naturalization-application-true]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
176
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
177
        $("[data-gc-naturalization-application-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ········$("[data....removeClass("active"); with ····$("[data-gc-natu...
Loading history...
178
        $("[data-gc-naturalization-application-false]").addClass("hidden");
0 ignored issues
show
introduced by
Insert );⏎
Loading history...
179
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
180
});
181
182
$("[data-gc-naturalization-application-false-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
183
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
184
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
185
    } else {
186
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
187
        $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
188
        $("[data-gc-naturalization-application-false]").removeClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
189
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
190
        $("[data-gc-naturalization-application-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ····$("[data-gc-natu....removeClass("active"); with $("[data-gc-naturalizati...
Loading history...
191
        $("[data-gc-naturalization-application-true]").addClass("hidden");
0 ignored issues
show
introduced by
Insert );⏎
Loading history...
192
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
193
});
194
195
// Previous Screening ==========================================================
196
197
    // Applications
0 ignored issues
show
introduced by
Delete ····
Loading history...
198
    $("[data-gc-screen-apply-true-trigger]").on("click", function() {
0 ignored issues
show
introduced by
Delete ····
Loading history...
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
199
        if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ······
Loading history...
introduced by
Empty block statement.
Loading history...
200
0 ignored issues
show
introduced by
Delete ⏎······
Loading history...
201
        } else {
202
            // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
203
            $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
204
            $("[data-gc-screen-apply-true]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
205
            // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
206
            $("[data-gc-screen-apply-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
207
            $("[data-gc-screen-apply-false]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
208
        }
0 ignored issues
show
introduced by
Delete ······
Loading history...
209
    });
0 ignored issues
show
introduced by
Delete ····
Loading history...
210
211
    $("[data-gc-screen-apply-false-trigger]").on("click", function() {
0 ignored issues
show
introduced by
Delete ····
Loading history...
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
212
        if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ······
Loading history...
introduced by
Empty block statement.
Loading history...
213
0 ignored issues
show
introduced by
Delete ⏎······
Loading history...
214
        } else {
215
            // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
216
            $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
217
            $("[data-gc-screen-apply-false]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
218
            // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
219
            $("[data-gc-screen-apply-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
220
            $("[data-gc-screen-apply-true]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
221
        }
0 ignored issues
show
introduced by
Delete ······
Loading history...
222
    });
0 ignored issues
show
introduced by
Delete ····
Loading history...
223
224
    // Granted
0 ignored issues
show
introduced by
Delete ····
Loading history...
225
    $("[data-gc-screen-granted-true-trigger]").on("click", function() {
0 ignored issues
show
introduced by
Delete ····
Loading history...
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
226
        if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ······
Loading history...
introduced by
Empty block statement.
Loading history...
227
0 ignored issues
show
introduced by
Delete ⏎······
Loading history...
228
        } else {
229
            // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
230
            $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
231
            $("[data-gc-screen-granted-true]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
232
            // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
233
            $("[data-gc-screen-granted-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
234
            $("[data-gc-screen-granted-false]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
235
        }
0 ignored issues
show
introduced by
Delete ······
Loading history...
236
    });
0 ignored issues
show
introduced by
Delete ····
Loading history...
237
238
    $("[data-gc-screen-granted-false-trigger]").on("click", function() {
0 ignored issues
show
introduced by
Delete ····
Loading history...
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
239
        if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ······
Loading history...
introduced by
Empty block statement.
Loading history...
240
0 ignored issues
show
introduced by
Delete ⏎······
Loading history...
241
        } else {
242
            // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
243
            $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
244
            $("[data-gc-screen-granted-false]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
245
            // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
246
            $("[data-gc-screen-granted-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
247
            $("[data-gc-screen-granted-true]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
248
        }
0 ignored issues
show
introduced by
Delete ······
Loading history...
249
    });
0 ignored issues
show
introduced by
Delete ····
Loading history...
250
251
    // Revoked
0 ignored issues
show
introduced by
Delete ····
Loading history...
252
    $("[data-gc-screen-revoked-true-trigger]").on("click", function() {
0 ignored issues
show
introduced by
Delete ····
Loading history...
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
253
        if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ······
Loading history...
introduced by
Empty block statement.
Loading history...
254
0 ignored issues
show
introduced by
Delete ⏎······
Loading history...
255
        } else {
256
            // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
257
            $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
258
            $("[data-gc-screen-revoked-true]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
259
            // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
260
            $("[data-gc-screen-revoked-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
261
            $("[data-gc-screen-revoked-false]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
262
        }
0 ignored issues
show
introduced by
Delete ······
Loading history...
263
    });
0 ignored issues
show
introduced by
Delete ····
Loading history...
264
265
    $("[data-gc-screen-revoked-false-trigger]").on("click", function() {
0 ignored issues
show
introduced by
Delete ····
Loading history...
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
266
        if ($(this).hasClass("active")) {
0 ignored issues
show
introduced by
Replace ······if·($(this)...sClass("active"))·{⏎ with if·($(this).hasClass("active"))·{
Loading history...
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Empty block statement.
Loading history...
267
268
        } else {
0 ignored issues
show
introduced by
Delete ······
Loading history...
269
            // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
270
            $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
271
            $("[data-gc-screen-revoked-false]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
272
            // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
273
            $("[data-gc-screen-revoked-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
274
            $("[data-gc-screen-revoked-true]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
275
        }
0 ignored issues
show
introduced by
Delete ······
Loading history...
276
    });
0 ignored issues
show
introduced by
Delete ····
Loading history...
277
278
    // Denied
0 ignored issues
show
introduced by
Delete ····
Loading history...
279
    $("[data-gc-screen-denied-true-trigger]").on("click", function() {
0 ignored issues
show
introduced by
Delete ····
Loading history...
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
280
        if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ······
Loading history...
introduced by
Empty block statement.
Loading history...
281
0 ignored issues
show
introduced by
Delete ⏎······
Loading history...
282
        } else {
283
            // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
284
            $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
285
            $("[data-gc-screen-denied-true]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
286
            // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
287
            $("[data-gc-screen-denied-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
288
            $("[data-gc-screen-denied-false]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
289
        }
0 ignored issues
show
introduced by
Delete ······
Loading history...
290
    });
0 ignored issues
show
introduced by
Delete ····
Loading history...
291
292
    $("[data-gc-screen-denied-false-trigger]").on("click", function() {
0 ignored issues
show
introduced by
Delete ····
Loading history...
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
293
        if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ······
Loading history...
introduced by
Empty block statement.
Loading history...
294
0 ignored issues
show
introduced by
Delete ⏎······
Loading history...
295
        } else {
296
            // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
297
            $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
298
            $("[data-gc-screen-denied-false]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
299
            // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ········
Loading history...
300
            $("[data-gc-screen-denied-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ········
Loading history...
301
            $("[data-gc-screen-denied-true]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ········
Loading history...
302
        }
0 ignored issues
show
introduced by
Delete ······
Loading history...
303
    });
0 ignored issues
show
introduced by
Delete ····
Loading history...
304
305
// Current Address =============================================================
306
$("[data-gc-current-address-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
307
    if ($(this).hasClass("active")) {
0 ignored issues
show
introduced by
Delete ··
Loading history...
308
        $(this).removeClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
309
        $("[data-gc-current-address]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
310
    } else {
0 ignored issues
show
introduced by
Delete ··
Loading history...
311
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
312
        $(this).addClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
313
        $("[data-gc-current-address]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
314
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
315
});
316
317
// Current Experience ==========================================================
318
$("[data-gc-current-experience-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
319
    if ($(this).hasClass("active")) {
0 ignored issues
show
introduced by
Delete ··
Loading history...
320
        $(this).removeClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
321
        $("[data-gc-current-experience]").removeClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
322
    } else {
0 ignored issues
show
introduced by
Delete ··
Loading history...
323
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
324
        $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
325
        $("[data-gc-current-experience]").addClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
326
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
327
});
328
329
// Experience Unemployment
330
$("[data-gc-experience-unemployed-true-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
331
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
332
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
333
    } else {
334
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
335
        $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
336
        $("[data-gc-experience-unemployed-true]").removeClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
337
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
338
        $("[data-gc-experience-unemployed-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
339
        $("[data-gc-experience-unemployed-false]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
340
        dialogSizing($("[data-c-dialog][data-c-dialog-id=\"experience-dialog\"]"));
0 ignored issues
show
introduced by
Replace ····dialogSizing($("...\"experience-dialog\"]" with dialogSizing($('[data-c-...d="experience-dialog"]'
Loading history...
introduced by
'dialogSizing' was used before it was defined.
Loading history...
341
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
342
});
343
344
$("[data-gc-experience-unemployed-false-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
345
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
346
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
347
    } else {
348
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
349
        $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
350
        $("[data-gc-experience-unemployed-false]").removeClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
351
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
352
        $("[data-gc-experience-unemployed-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
353
        $("[data-gc-experience-unemployed-true]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
354
        dialogSizing($("[data-c-dialog][data-c-dialog-id=\"experience-dialog\"]"));
0 ignored issues
show
introduced by
Replace ········dialogSi...\"experience-dialog\"]" with ····dialogSizing($('...d="experience-dialog"]'
Loading history...
introduced by
'dialogSizing' was used before it was defined.
Loading history...
355
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
356
});
357
358
// Experience Dismissal
359
$("[data-gc-experience-dismissal-true-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
360
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
361
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
362
    } else {
363
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
364
        $(this).addClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
365
        $("[data-gc-experience-dismissal-true]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
366
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
367
        $("[data-gc-experience-dismissal-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
368
        $("[data-gc-experience-dismissal-false]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
369
        dialogSizing($("[data-c-dialog][data-c-dialog-id=\"experience-dialog\"]"));
0 ignored issues
show
introduced by
Replace ········dialogSi...\"experience-dialog\"]" with ····dialogSizing($('...d="experience-dialog"]'
Loading history...
introduced by
'dialogSizing' was used before it was defined.
Loading history...
370
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
371
});
372
373
$("[data-gc-experience-dismissal-false-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
374
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Replace ··if·($(this).hasClass("active"))·{⏎ with if·($(this).hasClass("active"))·{
Loading history...
introduced by
Empty block statement.
Loading history...
375
376
    } else {
0 ignored issues
show
introduced by
Delete ··
Loading history...
377
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
378
        $(this).addClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
379
        $("[data-gc-experience-dismissal-false]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
380
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
381
        $("[data-gc-experience-dismissal-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
382
        $("[data-gc-experience-dismissal-true]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
383
        dialogSizing($("[data-c-dialog][data-c-dialog-id=\"experience-dialog\"]"));
0 ignored issues
show
introduced by
Replace ········dialogSi...\"experience-dialog\"]" with ····dialogSizing($('...d="experience-dialog"]'
Loading history...
introduced by
'dialogSizing' was used before it was defined.
Loading history...
384
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
385
});
386
387
// Experience Supervisor
388
$("[data-gc-experience-supervisor-true-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
389
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
390
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
391
    } else {
392
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
393
        $(this).addClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
394
        $("[data-gc-experience-supervisor-true]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
395
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
396
        $("[data-gc-experience-supervisor-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
397
        $("[data-gc-experience-supervisor-false]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
398
        dialogSizing($("[data-c-dialog][data-c-dialog-id=\"experience-dialog\"]"));
0 ignored issues
show
introduced by
Replace ········dialogSi...\"experience-dialog\"]" with ····dialogSizing($('...d="experience-dialog"]'
Loading history...
introduced by
'dialogSizing' was used before it was defined.
Loading history...
399
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
400
});
401
402
$("[data-gc-experience-supervisor-false-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
403
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
404
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
405
    } else {
406
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
407
        $(this).addClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
408
        $("[data-gc-experience-supervisor-false]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
409
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
410
        $("[data-gc-experience-supervisor-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
411
        $("[data-gc-experience-supervisor-true]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
412
        dialogSizing($("[data-c-dialog][data-c-dialog-id=\"experience-dialog\"]"));
0 ignored issues
show
introduced by
Replace ········dialogSi...\"experience-dialog\"]" with ····dialogSizing($('...d="experience-dialog"]'
Loading history...
introduced by
'dialogSizing' was used before it was defined.
Loading history...
413
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
414
});
415
416
// Reference Work/Education
417
$("[data-gc-reference-work-true-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
418
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
419
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
420
    } else {
421
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
422
        $(this).addClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
423
        $("[data-gc-reference-work-true]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
424
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
425
        $("[data-gc-reference-work-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
426
        $("[data-gc-reference-work-false]").addClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
427
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
428
});
429
430
$("[data-gc-reference-work-false-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
431
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
432
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
433
    } else {
434
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
435
        $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
436
        $("[data-gc-reference-work-false]").removeClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
437
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
438
        $("[data-gc-reference-work-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
439
        $("[data-gc-reference-work-true]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
440
    }
0 ignored issues
show
introduced by
Replace ···· with ··
Loading history...
441
});
442
443
// Record
444
$("[data-gc-record-true-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
445
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Delete ··
Loading history...
introduced by
Empty block statement.
Loading history...
446
0 ignored issues
show
introduced by
Delete ⏎··
Loading history...
447
    } else {
448
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
449
        $(this).addClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
450
        $("[data-gc-record-true]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
451
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
452
        $("[data-gc-record-false-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Delete ····
Loading history...
453
        $("[data-gc-record-false]").addClass("hidden");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
454
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
455
});
456
457
$("[data-gc-record-false-trigger]").on("click", function() {
0 ignored issues
show
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
458
    if ($(this).hasClass("active")) {
0 ignored issues
show
Comprehensibility Documentation Best Practice introduced by
This code block is empty. Consider removing it or adding a comment to explain.
Loading history...
introduced by
Replace ··if·($(this).hasClass("active"))·{⏎ with if·($(this).hasClass("active"))·{
Loading history...
introduced by
Empty block statement.
Loading history...
459
460
    } else {
0 ignored issues
show
introduced by
Delete ··
Loading history...
461
        // Triger this elements stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
462
        $(this).addClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
463
        $("[data-gc-record-false]").removeClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
464
        // Remove alternative option's stuff.
0 ignored issues
show
introduced by
Delete ····
Loading history...
465
        $("[data-gc-record-true-trigger]").removeClass("active");
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
466
        $("[data-gc-record-true]").addClass("hidden");
0 ignored issues
show
introduced by
Delete ····
Loading history...
467
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
468
});
469
470
// Clone Stuff
471
// Clone Shorthand =============================================================
472
function clone(attr, option, selector) {
0 ignored issues
show
introduced by
Missing return type on function.
Loading history...
473
    if (option != null) {
0 ignored issues
show
Best Practice introduced by
Comparing option to null using the != operator is not safe. Consider using !== instead.
Loading history...
introduced by
Delete ··
Loading history...
474
        if (selector != null) {
0 ignored issues
show
Best Practice introduced by
Comparing selector to null using the != operator is not safe. Consider using !== instead.
Loading history...
introduced by
Replace ········ with ····
Loading history...
475
            return '[data-c-' + attr + selector + '=\'' + option + '\']';
0 ignored issues
show
introduced by
Replace ············...''·+·option·+·'\']' with ······return·"[da...='"·+·option·+·"']"
Loading history...
introduced by
Unexpected string concatenation.
Loading history...
476
        }
0 ignored issues
show
introduced by
Replace ········}⏎······· with ····}
Loading history...
477
        else {
0 ignored issues
show
Comprehensibility introduced by
else is not necessary here since all if branches return, consider removing it to reduce nesting and make code more readable.
Loading history...
introduced by
Unnecessary 'else' after 'return'.
Loading history...
478
            return '[data-c-' + attr + '=\'' + option + '\']';
0 ignored issues
show
introduced by
Replace ············...''·+·option·+·'\']' with ······return·"[da...='"·+·option·+·"']"
Loading history...
introduced by
Unexpected string concatenation.
Loading history...
479
        }
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
480
    }
0 ignored issues
show
introduced by
Replace ····}⏎··· with ··}
Loading history...
481
    else {
0 ignored issues
show
Comprehensibility introduced by
else is not necessary here since all if branches return, consider removing it to reduce nesting and make code more readable.
Loading history...
introduced by
Unnecessary 'else' after 'return'.
Loading history...
482
        return '[data-c-' + attr + ']';
0 ignored issues
show
introduced by
Replace ········return·...ta-c-'·+·attr·+·']' with ····return·"[data-c-"·+·attr·+·"]"
Loading history...
introduced by
Unexpected string concatenation.
Loading history...
483
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
484
}
485
// Dialog Sizing -------------------------------------------------------
486
function dialogSizing(dialog) {
0 ignored issues
show
introduced by
Missing return type on function.
Loading history...
487
    var viewportHeight = $(window).height();
0 ignored issues
show
introduced by
Replace ···· with ··
Loading history...
Compatibility Best Practice introduced by
Instead of var consider using ECMAScript 6's const or let which have stricter semantics.
Loading history...
488
    if (dialog != null) {
0 ignored issues
show
Best Practice introduced by
Comparing dialog to null using the != operator is not safe. Consider using !== instead.
Loading history...
introduced by
Delete ··
Loading history...
489
        var dialogHeight = $(dialog).children("div").height() + 50;
0 ignored issues
show
introduced by
Replace ········var·dia...dialog).children("div") with ····var·dialogHeigh...iv")⏎········
Loading history...
Coding Style introduced by
All 'var' declarations must be at the top of the function scope.
Loading history...
Compatibility Best Practice introduced by
Instead of var consider using ECMAScript 6's const or let which have stricter semantics.
Loading history...
490
        if (dialogHeight > viewportHeight) {
0 ignored issues
show
introduced by
Delete ····
Loading history...
491
            $(dialog).attr("data-c-dialog", "active--overflowing");
0 ignored issues
show
introduced by
Delete ······
Loading history...
492
        }
0 ignored issues
show
introduced by
Replace ········}⏎······· with ····}
Loading history...
493
        else {
494
            $(dialog).attr("data-c-dialog", "active--contained");
0 ignored issues
show
introduced by
Replace ············ with ······
Loading history...
495
        }
0 ignored issues
show
introduced by
Delete ····
Loading history...
496
    }
0 ignored issues
show
introduced by
Replace ····}⏎··· with ··}
Loading history...
497
    else {
498
        $(clone("dialog")).each(function() {
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
Best Practice introduced by
Unexpected unnamed function.

It is becoming a best practice to add a name even to function expressions to aid in debugging as it produces better stack traces:

MyClass.prototype.someFunction = function someFunction() {
}

As you can see, someFunction is repeated twice above. Instead of having stack traces referencing anonymous function, you will now see the actual function name that was called.

Loading history...
introduced by
Expected to return a value at the end of function.
Loading history...
499
            if ($(this).attr("data-c-dialog") == false){
0 ignored issues
show
Best Practice introduced by
Comparing $(this).attr("data-c-dialog") to false using the == operator is not safe. Consider using === instead.
Loading history...
introduced by
Replace ············...-c-dialog")·==·false) with ······if·($(this)...-dialog")·==·false)·
Loading history...
Bug Best Practice introduced by
Apart from some edge-cases, it is generally advisable to use the strict comparison === instead of ==.

The loose comparison such as == or != might produce some weird results for some values, unless you explicitly want to have this behavior here, better use the strict alternative.

Learn more about loose comparison in Javascript.

Loading history...
500
                return false;
0 ignored issues
show
introduced by
Replace ················ with ········
Loading history...
501
            }
0 ignored issues
show
introduced by
Replace ······}⏎··········· with }
Loading history...
502
            else {
0 ignored issues
show
Comprehensibility introduced by
else is not necessary here since all if branches return, consider removing it to reduce nesting and make code more readable.
Loading history...
introduced by
Unnecessary 'else' after 'return'.
Loading history...
503
                var dialogHeight = $(this).children("div").height() + 50;
0 ignored issues
show
introduced by
Replace ············...$(this).children("div") with ········var·dia...
Loading history...
Coding Style introduced by
All 'var' declarations must be at the top of the function scope.
Loading history...
Compatibility Best Practice introduced by
Instead of var consider using ECMAScript 6's const or let which have stricter semantics.
Loading history...
introduced by
'dialogHeight' is already declared in the upper scope.
Loading history...
504
                if (dialogHeight > viewportHeight) {
0 ignored issues
show
introduced by
Delete ········
Loading history...
505
                    $(this).attr("data-c-dialog", "active--overflowing");
0 ignored issues
show
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
introduced by
Replace ···················· with ··········
Loading history...
506
                }
0 ignored issues
show
introduced by
Replace ········}⏎··············· with }
Loading history...
507
                else {
508
                    $(this).attr("data-c-dialog", "active--contained");
0 ignored issues
show
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
introduced by
Replace ···················· with ··········
Loading history...
509
                }
0 ignored issues
show
introduced by
Delete ········
Loading history...
510
            }
0 ignored issues
show
introduced by
Replace ············ with ······
Loading history...
511
        });
0 ignored issues
show
introduced by
Replace ········ with ····
Loading history...
512
    }
0 ignored issues
show
introduced by
Delete ··
Loading history...
513
}
514