Debug.js
786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Loader.require('Parser.Statement.If');
(function() {
var priorities = {
error: 3,
warn: 2,
info: 1
};
var Debug = Parser.Statement.Debug = Ext.extend(Parser.Statement.If, {
constructor: function() {
var priority, name;
Debug.superclass.constructor.apply(this, arguments);
this.setProperty('debug', true);
for (name in priorities) {
if (priorities.hasOwnProperty(name)) {
if (this.getProperty(name)) {
priority = priorities[name];
this.removeProperty(name);
break;
}
}
}
if (!priority) {
priority = 1;
}
this.setProperty('debugLevel', '<=' + priority);
}
});
})();