Completed
Pull Request — master (#407)
by Michael
09:15 queued 04:45
created

www/src/DembeloMain/Resources/public/js/dembelo.js   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 22

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
nc 2
nop 0
dl 0
loc 22
rs 9.2
c 1
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A windowElements[i].addEventListener(ꞌclickꞌ) 0 15 1
1
(function () {
2
    "use strict";
3
    var windowElements = document.querySelectorAll('.window-opener');
4
5
    for (var i = 0; i < windowElements.length; i++) {
6
        windowElements[i].addEventListener('click', function (event) {
7
            var url = event.currentTarget.dataset.href,
8
                windowFeatures = [
9
                    'menubar=no',
10
                    'location=no',
11
                    'resizable=yes',
12
                    'scrollbars=no',
13
                    'status=no',
14
                    'height=328px',
15
                    'width=555px',
16
                    'top=200px',
17
                    'left=200px'
18
                ];
19
            window.open(url, '_blank', windowFeatures.join(','));
20
        });
21
    }
22
})();