Completed
Pull Request — development (#705)
by Nick
05:03
created

htdocs/theme/frontend/js/jquery.responsive.js   A

Complexity

Total Complexity 2
Complexity/F 1

Size

Lines of Code 41
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
c 1
b 0
f 0
nc 1
dl 0
loc 41
rs 10
wmc 2
mnd 0
bc 2
fnc 2
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A window.StateManager.registerListener.enter 0 3 1
1
(function($, window) {
2
    var baseFontSize = 16;
3
4
    window.StateManager.init([
5
        {
6
            state: 'xs',
7
            enter: 0,
8
            exit: 575 / baseFontSize   // 575px
9
        },
10
        {
11
            state: 'sm',
12
            enter: 576 / baseFontSize,
13
            exit: 767 / baseFontSize   // 767px
14
        },
15
        {
16
            state: 'md',
17
            enter: 768 / baseFontSize,      // 768px
18
            exit: 991 / baseFontSize   // 991px
19
        },
20
        {
21
            state: 'lg',
22
            enter: 992 / baseFontSize,      // 992px
23
            exit: 1199 / baseFontSize   // 1199px
24
        },
25
        {
26
            state: 'xl',
27
            enter: 1200 / baseFontSize,   // 1200px
28
            exit: 5160 / baseFontSize     // 5160px
29
        }
30
    ]);
31
32
    window.StateManager.addPlugin('body', 'ocHelloWorld');
33
34
    window.StateManager.registerListener([{
35
        state: '*',
36
        enter: function(event) {
37
            console.debug(event.exiting + ' => ' + event.entering);
38
        }
39
    }]);
40
41
})(jQuery, window);
42