Ticket #5821: test_TabContainer_test.html

File test_TabContainer_test.html, 1.4 kB (added by guest, 11 months ago)

Test HTML page

Line 
1<html>
2<head>
3        <title>TabContainer Demo</title>
4
5        <script type="text/javascript" src="../../../dojo/dojo.js"
6                djConfig="isDebug: false, parseOnLoad: true"></script>
7        <script type="text/javascript" src="../_testCommon.js"></script>
8
9        <script type="text/javascript">
10                dojo.require("dijit.layout.ContentPane");
11                dojo.require("dijit.layout.TabContainer");
12                dojo.require("dojo.parser");    // scan page for widgets and instantiate them
13
14                startTime = new Date();
15                dojo.addOnLoad(function(){
16                        var elapsed = new Date().getTime() - startTime;
17                        var p = document.createElement("p");
18                        p.appendChild(document.createTextNode("Widgets loaded in " + elapsed + "ms"));
19                        document.body.appendChild(p);
20                        // dojo.parser.parse(dojo.body());
21                });
22
23                dojo.addOnLoad(function(){
24                        var tc = dijit.byId("mainTabContainer");
25                        var cp = new dijit.layout.ContentPane({ title: 'Programmatically created tab' });
26                        cp.domNode.innerHTML = "I was created programmatically!";
27                        tc.addChild(cp);
28                });
29        </script>
30
31        <style type="text/css">
32                @import "../../../dojo/resources/dojo.css";
33                @import "../css/dijitTests.css";
34
35                body {
36                        font-family : sans-serif;
37                        margin:20px;
38                }
39
40                /* add padding to each contentpane inside the tab container, and scrollbar if necessary */
41                .dojoTabPane {
42                        padding : 10px 10px 10px 10px;
43                        overflow: auto;
44                }
45        </style>
46</head>
47<body>
48        <div id="mainTabContainer" dojoType="dijit.layout.TabContainer" style="width: 100%; height: 20em;"></div>
49</body>
50</html>