2150 |
mathias |
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>Layout Demo</title>
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
<script type="text/javascript" src="../../../dojo/dojo.js"
|
|
|
9 |
djConfig="parseOnLoad: true, isDebug: true"></script>
|
|
|
10 |
<script type="text/javascript" src="../_testCommon.js"></script>
|
|
|
11 |
|
|
|
12 |
<script type="text/javascript">
|
|
|
13 |
dojo.require("dijit.layout.LayoutContainer");
|
|
|
14 |
dojo.require("dijit.layout.ContentPane");
|
|
|
15 |
dojo.require("dijit.layout.LinkPane");
|
|
|
16 |
dojo.require("dijit.layout.SplitContainer");
|
|
|
17 |
dojo.require("dijit.layout.TabContainer");
|
|
|
18 |
dojo.require("dojo.parser"); // scan page for widgets and instantiate them
|
|
|
19 |
</script>
|
|
|
20 |
<style type="text/css">
|
|
|
21 |
@import "../../../dojo/resources/dojo.css";
|
|
|
22 |
@import "../css/dijitTests.css";
|
|
|
23 |
|
|
|
24 |
html, body{
|
|
|
25 |
width: 100%; /* make the body expand to fill the visible window */
|
|
|
26 |
height: 100%;
|
|
|
27 |
padding: 0 0 0 0;
|
|
|
28 |
margin: 0 0 0 0;
|
|
|
29 |
}
|
|
|
30 |
.dijitSplitPane{
|
|
|
31 |
margin: 5px;
|
|
|
32 |
}
|
|
|
33 |
#rightPane {
|
|
|
34 |
margin: 0;
|
|
|
35 |
}
|
|
|
36 |
</style>
|
|
|
37 |
<script>
|
|
|
38 |
dojo.addOnLoad(function(){
|
|
|
39 |
// use "before advice" to print log message each time resize is called on a layout widget
|
|
|
40 |
var origResize = dijit.layout._LayoutWidget.prototype.resize;
|
|
|
41 |
dijit.layout._LayoutWidget.prototype.resize = function(mb){
|
|
|
42 |
console.log(this + ": resize(" + (mb ? "{w:"+ mb.w + ", h:" + mb.h + "}" : "null") +")" );
|
|
|
43 |
origResize.apply(this, arguments);
|
|
|
44 |
};
|
|
|
45 |
|
|
|
46 |
dojo.connect(dijit.layout.ContentPane.prototype, "resize", function(mb){
|
|
|
47 |
console.log(this + ": resize({w:"+ mb.w + ", h:" + mb.h + "})");
|
|
|
48 |
});
|
|
|
49 |
});
|
|
|
50 |
</script>
|
|
|
51 |
</head>
|
|
|
52 |
<body>
|
|
|
53 |
<div id="outer" dojoType="dijit.layout.LayoutContainer"
|
|
|
54 |
style="width: 100%; height: 100%;">
|
|
|
55 |
<div id="topBar" dojoType="dijit.layout.ContentPane" layoutAlign="top"
|
|
|
56 |
style="background-color: #274383; color: white;">
|
|
|
57 |
top bar
|
|
|
58 |
</div>
|
|
|
59 |
<div id="bottomBar" dojoType="dijit.layout.ContentPane" layoutAlign="bottom"
|
|
|
60 |
style="background-color: #274383; color: white;">
|
|
|
61 |
bottom bar
|
|
|
62 |
</div>
|
|
|
63 |
<div id="horizontalSplit" dojoType="dijit.layout.SplitContainer"
|
|
|
64 |
orientation="horizontal"
|
|
|
65 |
sizerWidth="5"
|
|
|
66 |
activeSizing="0"
|
|
|
67 |
layoutAlign="client"
|
|
|
68 |
>
|
|
|
69 |
<div id="leftPane" dojoType="dijit.layout.ContentPane"
|
|
|
70 |
sizeMin="20" sizeShare="20">
|
|
|
71 |
Left side
|
|
|
72 |
</div>
|
|
|
73 |
|
|
|
74 |
<div id="rightPane"
|
|
|
75 |
dojoType="dijit.layout.SplitContainer"
|
|
|
76 |
orientation="vertical"
|
|
|
77 |
sizerWidth="5"
|
|
|
78 |
activeSizing="0"
|
|
|
79 |
sizeMin="50" sizeShare="80"
|
|
|
80 |
>
|
|
|
81 |
<div id="mainTabContainer" dojoType="dijit.layout.TabContainer" sizeMin="20" sizeShare="70">
|
|
|
82 |
|
|
|
83 |
<a id="tab1" dojoType="dijit.layout.LinkPane" href="tab1.html">Tab 1</a>
|
|
|
84 |
|
|
|
85 |
<a id="tab2" dojoType="dijit.layout.LinkPane" href="tab2.html">Tab 2</a>
|
|
|
86 |
</div>
|
|
|
87 |
<div id="bottomRight" dojoType="dijit.layout.ContentPane" sizeMin="20" sizeShare="30">
|
|
|
88 |
Bottom right<br>
|
|
|
89 |
Bottom right<br>
|
|
|
90 |
Bottom right<br>
|
|
|
91 |
Bottom right<br>
|
|
|
92 |
Bottom right<br>
|
|
|
93 |
Bottom right<br>
|
|
|
94 |
Bottom right<br>
|
|
|
95 |
Bottom right<br>
|
|
|
96 |
Bottom right<br>
|
|
|
97 |
Bottom right<br>
|
|
|
98 |
Bottom right<br>
|
|
|
99 |
Bottom right<br>
|
|
|
100 |
Bottom right<br>
|
|
|
101 |
Bottom right<br>
|
|
|
102 |
Bottom right<br>
|
|
|
103 |
Bottom right<br>
|
|
|
104 |
Bottom right<br>
|
|
|
105 |
Bottom right<br>
|
|
|
106 |
Bottom right<br>
|
|
|
107 |
Bottom right<br>
|
|
|
108 |
</div>
|
|
|
109 |
</div>
|
|
|
110 |
</div>
|
|
|
111 |
</div>
|
|
|
112 |
</body>
|
|
|
113 |
</html>
|