Last change
on this file since 256 was
256,
checked in by hendrikvanantwerpen, 13 years ago
|
Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).
|
File size:
775 bytes
|
Line | |
---|
1 | define(["dojo/_base/lang","../_base", "dojo/_base/config", "dojo/aspect" |
---|
2 | ], function(lang, dxa, config, aspect){ |
---|
3 | /*===== |
---|
4 | dxa = dojox.analytics; |
---|
5 | aspect = dojo.aspect; |
---|
6 | =====*/ |
---|
7 | consoleMessages = lang.getObject("dojox.analytics.plugins.consoleMessages", true); |
---|
8 | |
---|
9 | // summary: |
---|
10 | // plugin to have analyitcs return the base info dojo collects |
---|
11 | this.addData = lang.hitch(dxa, "addData", "consoleMessages"); |
---|
12 | |
---|
13 | var lvls = config["consoleLogFuncs"] || ["error", "warn", "info", "rlog"]; |
---|
14 | if(!console){ |
---|
15 | console = {}; |
---|
16 | } |
---|
17 | |
---|
18 | for(var i=0; i < lvls.length; i++){ |
---|
19 | if(console[lvls[i]]){ |
---|
20 | aspect.after(console, lvls[i], lang.hitch(this, "addData", lvls[i]),true); |
---|
21 | }else{ |
---|
22 | console[lvls[i]] = lang.hitch(this, "addData", lvls[i]); |
---|
23 | } |
---|
24 | } |
---|
25 | return consoleMessages; |
---|
26 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.