Passed
Push — bugfix/462-backend-errors ( 851204 )
by Michael
07:39
created

window.onload   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
1
/** global: webix,require */
2
(function () {
3
    "use strict";
4
5
    var getUiJson = require(__dirname + '/admin.js').getUiJson,
0 ignored issues
show
Compatibility introduced by
Consider using the path module for constructing paths since they are otherwise not cross-OS compatible.
Loading history...
6
        init = require(__dirname + '/admin.js').init;
0 ignored issues
show
Compatibility introduced by
Consider using the path module for constructing paths since they are otherwise not cross-OS compatible.
Loading history...
7
8
    require('Webix');
9
10
    window.onload = function () {
11
        webix.attachEvent("onBeforeAjax",
12
            function (mode, url, data, request, headers) {
13
                headers["X-Requested-With"] = "XMLHttpRequest";
14
            }
15
        );
16
        webix.ui(getUiJson());
17
18
        init();
19
    }
20
})();