source: Dev/trunk/src/client/dojo/tests/_base/loader/scope04.html

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 2.5 KB
Line 
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/tests/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                        //Need scope map defined in a script block. It will not work as part of the
21                        //djConfig attribute on the script that loads Dojo.
22                        //Also, just adding properties instead of redefining djConfig, since that
23                        //will wipe out djConfig values set up by the 0.4.3 dojo.
24                        djConfig.parseOnLoad = true;
25                        djConfig.baseUrl = "../../../";
26                        djConfig.scopeMap = [
27                                ["dojo", "dojo10"],
28                                ["dijit", "dijit10"],
29                                ["dojox", "dojox10"]                                   
30                        ];
31                </script>
32                <script type="text/javascript" src="../../../dojo.js"></script>
33                <script type="text/javascript">
34                        dojo.require("dojo.widget.DropdownDatePicker");
35                        dojo10.require("dijit.Calendar");
36                        dojo10.require("dojo.date.locale");
37                        dojo10.require("dojo.parser"); // scan page for widgets
38
39                        dojo.addOnLoad(function(){
40                                dojo.byId("output043").innerHTML = dojo.version.toString();
41                        });
42                        dojo10.addOnLoad(function(){
43                                dojo.byId("output10").innerHTML = dojo10.version.toString();
44                        });
45
46                        function myHandler(id,newValue){
47                                console.debug("onChange for id = " + id + ", value: " + newValue);
48                        }
49                       
50                        function foobar(){
51                                dojo.byId("typeOut").innerHTML = (typeof dojo.addClass);
52                        }
53                        setTimeout(foobar, 2000);
54
55                </script>
56        </head>
57        <body>
58                <h1>Multiversion Dojo: 0.4.3 and 1.0</h1>
59       
60                <p><b>NOTE: This test only works with a built version of Dojo</b></p>
61
62                <p>This page loads Dojo 0.4.3 and Dojo 1.0.</p>
63               
64                <p>Dojo 0.4.3 version: <span id="output043"></span></p>
65               
66                <p>Dojo 1.0 version: <span id="output10"></span></p>
67               
68                <p><b>dojo.addClass should be undefined:</b> <span id="typeOut"></span></p>
69               
70                <p>
71                        <input dojoType="dropdowndatepicker" value="2006-10-31" containerToggle="wipe" containerToggleDuration="300" >
72                </p>
73               
74                <p class="tundra">
75                        <input id="calendar1" dojo10Type="dijit.Calendar" onChange="myHandler(this.id,arguments[0])">
76                </p>
77               
78        </body>
79</html>
80
Note: See TracBrowser for help on using the repository browser.