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:
964 bytes
|
Line | |
---|
1 | define(["dojo/_base/lang","../_base", "dojo/ready", "dojo/_base/config", "dojo/aspect" |
---|
2 | ], function(lang, dxa, ready, config, aspect){ |
---|
3 | /*===== |
---|
4 | dxa = dojox.analytics; |
---|
5 | ready = dojo.ready; |
---|
6 | aspect = dojo.aspect; |
---|
7 | =====*/ |
---|
8 | |
---|
9 | // window startup data |
---|
10 | return (dxa.plugins.window = new (function(){ |
---|
11 | this.addData = lang.hitch(dxa, "addData", "window"); |
---|
12 | this.windowConnects = config["windowConnects"] || ["open", "onerror"]; |
---|
13 | |
---|
14 | for(var i=0; i<this.windowConnects.length;i++){ |
---|
15 | aspect.after(window, this.windowConnects[i], lang.hitch(this, "addData", this.windowConnects[i]),true); |
---|
16 | } |
---|
17 | |
---|
18 | ready(lang.hitch(this, function(){ |
---|
19 | var data = {}; |
---|
20 | for(var i in window){ |
---|
21 | if (typeof window[i] == "object" || typeof window[i] == "function"){ |
---|
22 | switch(i){ |
---|
23 | case "location": |
---|
24 | case "console": |
---|
25 | data[i]=window[i]; |
---|
26 | break; |
---|
27 | default: |
---|
28 | break; |
---|
29 | } |
---|
30 | }else{ |
---|
31 | data[i]=window[i]; |
---|
32 | } |
---|
33 | } |
---|
34 | this.addData(data); |
---|
35 | })); |
---|
36 | })()); |
---|
37 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.