Completed
Push — master ( cee9b7...cbcfad )
by Roberts
73:14 queued 69:30
created

File.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 5
rs 10
c 3
b 0
f 0
1
export default class File {
2
    /**
3
     * @param element
4
     */
5
    constructor(element) {
6
        this.element = element;
7
8
        this.registerEventHandlers();
9
    }
10
11
    /**
12
     * @return {void}
13
     */
14
    registerEventHandlers() {
15
        let field = this.getField();
16
17
        field.find('button.remove').on('click', function () {
18
            field.find('input.remove').val(1);
19
            field.find('.thumbnail').hide();
20
            field.find('.file-details').hide();
21
        });
22
    }
23
24
    getField() {
25
        return jQuery(this.element);
26
    }
27
}
28