]> git.wh0rd.org - tt-rss.git/blob - lib/dojo/robotx.js
add dijit/dojo stuff; initial ui mockup
[tt-rss.git] / lib / dojo / robotx.js
1 /*
2 Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3 Available via Academic Free License >= 2.1 OR the modified BSD license.
4 see: http://dojotoolkit.org/license for details
5 */
6
7
8 if(!dojo._hasResource["dojo.robotx"]){
9 dojo._hasResource["dojo.robotx"]=true;
10 dojo.provide("dojo.robotx");
11 dojo.require("dojo.robot");
12 dojo.experimental("dojo.robotx");
13 (function(){
14 doh.robot._runsemaphore.lock.push("dojo.robotx.lock");
15 var _1=document.getElementById("robotapplication");
16 var _2=dojo.connect(doh,"_groupStarted",function(){
17 dojo.disconnect(_2);
18 _1.style.visibility="visible";
19 });
20 var _3=function(){
21 doh.robot._updateDocument();
22 _3=null;
23 var _4=(document.compatMode=="BackCompat")?document.body:document.documentElement;
24 var _5=document.getElementById("robotconsole").offsetHeight;
25 if(_5){
26 _1.style.height=(_4.clientHeight-_5)+"px";
27 }
28 doh.run();
29 };
30 var _6=function(){
31 if(_3){
32 _3();
33 }
34 var _7=dojo.connect(dojo.body(),"onunload",function(){
35 dojo.global=window;
36 dojo.doc=document;
37 dojo.disconnect(_7);
38 });
39 };
40 dojo.config.debugContainerId="robotconsole";
41 dojo.config.debugHeight=dojo.config.debugHeight||200;
42 document.write("<div id=\"robotconsole\" style=\"position:absolute;left:0px;bottom:0px;width:100%;\"></div>");
43 _1=document.createElement("iframe");
44 _1.setAttribute("ALLOWTRANSPARENCY","true");
45 _1.scrolling=dojo.isIE?"yes":"auto";
46 dojo.style(_1,{visibility:"hidden",border:"0px none",padding:"0px",margin:"0px",position:"absolute",left:"0px",top:"0px",width:"100%",height:"100%"});
47 if(_1["attachEvent"]!==undefined){
48 _1.attachEvent("onload",_6);
49 }else{
50 dojo.connect(_1,"onload",_6);
51 }
52 dojo.mixin(doh.robot,{_updateDocument:function(){
53 dojo.setContext(_1.contentWindow,_1.contentWindow.document);
54 var _8=dojo.global;
55 if(_8["dojo"]){
56 dojo._topics=_8.dojo._topics;
57 }
58 },initRobot:function(_9){
59 _1.src=_9;
60 dojo.addOnLoad(function(){
61 var _a={overflow:dojo.isWebKit?"hidden":"visible",margin:"0px",borderWidth:"0px",height:"100%",width:"100%"};
62 dojo.style(document.documentElement,_a);
63 dojo.style(document.body,_a);
64 document.body.appendChild(_1);
65 var _b=document.createElement("base");
66 _b.href=_9;
67 document.getElementsByTagName("head")[0].appendChild(_b);
68 });
69 },waitForPageToLoad:function(_c){
70 var d=new doh.Deferred();
71 _3=function(){
72 _3=null;
73 doh.robot._updateDocument();
74 d.callback(true);
75 };
76 _c();
77 return d;
78 }});
79 })();
80 }