]> git.pond.sub.org Git - eow/blob - static/dojo-release-1.1.1/dojo/tests/_base/_loader/scope/scopeContainedXd.html
add Dojo 1.1.1
[eow] / static / dojo-release-1.1.1 / dojo / tests / _base / _loader / scope / scopeContainedXd.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2         "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4         <head>
5                 <title>Multiversion Dojo: 0.4.3 and 1.0</title>
6
7                 <link rel="stylesheet" type="text/css" href="../../../../resources/dojo.css" />
8                 <link rel="stylesheet" type="text/css" href="../../../../../dijit/css/dijitTests.css" />
9                 <link rel="stylesheet" type="text/css" href="../../../../../dijit/themes/tundra/tundra.css" />
10                 
11                 <script type="text/javascript">
12                         //djConfig for 0.4.3 setup.
13                         djConfig = {
14                                 isDebug: true
15                         };
16                 </script>
17                 <script type="text/javascript" src="http://o.aolcdn.com/dojo/0.4.3/dojo.js"></script>
18                 
19                 <script type="text/javascript">
20                         //Scope map for this page is "burned in" via a build command (see HTML notes below).
21                         //Also, just adding properties instead of redefining djConfig, since that
22                         //will wipe out djConfig values set up by the 0.4.3 dojo.
23                         djConfig.parseOnLoad = true;
24                         djConfig.baseUrl = "../../../../";
25                         djConfig.useXDomain = true; //Technically this was set already in the 0.4.3 xd dojo.js file.
26                 </script>
27                 <script type="text/javascript" src="../../../../dojo.xd.js"></script>
28                 <script type="text/javascript">
29                         dojo.require("dojo.widget.DropdownDatePicker");
30
31                         //Get base xd path
32                         var xdPath = location.href;
33                         var lastIndex = location.href.lastIndexOf("/");
34                         xdPath = xdPath.substring(0, lastIndex + 1);
35                         
36                         //Set up xdomain locations for dojo/dijit/dojox.
37                         jodo.registerModulePath("dojo", xdPath + "../../../../../dojo");
38                         jodo.registerModulePath("dijit", xdPath + "../../../../../dijit");
39                         jodo.registerModulePath("dojox", xdPath + "../../../../../dojox");
40                         
41                         //Notice that dijit._Calendar is required, not jidit._Calendar.
42                         //Same for the dojo resources (not jodo resources).
43                         jodo.require("dijit._Calendar");
44                         jodo.require("dojo.date.locale");
45                         jodo.require("dojo.parser"); // scan page for widgets
46
47                         dojo.addOnLoad(function(){
48                                 dojo.byId("output043").innerHTML = dojo.version.toString();
49                         });
50                         jodo.addOnLoad(function(){
51                                 dojo.byId("output10").innerHTML = jodo.version.toString();
52                         });
53
54                         function myHandler(id,newValue){
55                                 console.debug("onChange for id = " + id + ", value: " + newValue);
56                         }
57                 </script>
58         </head>
59         <body>
60                 <h1>XDomain Multiversion Dojo: 0.4.3 and 1.0</h1>
61         
62                 <p><b>NOTE: This test only works with a built, xdomain version of Dojo, and it must be built with the scopeMap parameter (the backslashes below are required):</b></p>
63
64                 <p style="color: blue; background-color: yellow">build.sh profile=standard action=release scopeMap=[[\"dojo\",\"jodo\"],[\"dijit\",\"jidit\"],[\"dojox\",\"jodox\"]] xdDojoScopeName=jodo loader=xdomain</p>
65                 
66                 <p><b>Only load this page from an http:// URL</b>. Otherwise, the xd loading will not happen.</p>
67
68                 <p>This page xdomain loads Dojo 0.4.3 and Dojo 1.0 (under the jodo scope)</p>
69                 
70                 <p>Dojo 0.4.3 version: <span id="output043"></span></p>
71                 
72                 <p>Jodo version: <span id="output10"></span></p>
73                 
74                 <p>
75                         <input dojoType="dropdowndatepicker" value="2006-10-31" containerToggle="wipe" containerToggleDuration="300" >
76                 </p>
77                 
78                 <p class="tundra">
79                         <input id="calendar1" jodoType="dijit._Calendar" onChange="myHandler(this.id,arguments[0])">
80                 </p>
81                 
82         </body>
83 </html>
84