| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 |
"http://www.w3.org/TR/html4/strict.dtd"> |
| 3 |
<html lang="en"> |
| 4 |
<head> |
| 5 |
<title>dojox.layout.ExpandoPane</title> |
| 6 |
|
| 7 |
|
| 8 |
<link rel="stylesheet" id="themeStyles" href="../../../dijit/themes/tundra/tundra.css" /> |
| 9 |
|
| 10 |
<link rel="stylesheet" href="../resources/ExpandoPane.css" /> |
| 11 |
|
| 12 |
|
| 13 |
<link rel="stylesheet" href="../../../dijit/tests/css/dijitTests.css" /> |
| 14 |
|
| 15 |
|
| 16 |
<script type="text/javascript" src="../../../dojo/dojo.js" data-dojo-config="isDebug:true, parseOnLoad: true"></script> |
| 17 |
|
| 18 |
|
| 19 |
<script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script> |
| 20 |
|
| 21 |
<style type="text/css"> |
| 22 |
body, html { |
| 23 |
height:100%; |
| 24 |
} |
| 25 |
</style> |
| 26 |
|
| 27 |
|
| 28 |
<script type="text/javascript"> |
| 29 |
dojo.require("dojox.layout.ExpandoPane"); |
| 30 |
dojo.require("dijit.layout.TabContainer"); |
| 31 |
dojo.require("dijit.Tree"); |
| 32 |
dojo.require("dijit.layout.ContentPane"); |
| 33 |
dojo.require("dijit.layout.BorderContainer"); |
| 34 |
dojo.require("dojo.fx.easing"); |
| 35 |
|
| 36 |
var constructTabContainerTest = function(){ |
| 37 |
|
| 38 |
var parent = dojo.byId("container0"); |
| 39 |
console.log("Parent id is: ", parent.id); |
| 40 |
|
| 41 |
var tabContainer = new dijit.layout.TabContainer({ |
| 42 |
id: "0", |
| 43 |
tabPosition: "top", |
| 44 |
style:"height:400px; width: 100%;" |
| 45 |
}).placeAt(parent); |
| 46 |
|
| 47 |
var cp2 = new dijit.layout.ContentPane({ |
| 48 |
id: "0.2", |
| 49 |
title: "Tab 1" |
| 50 |
}).placeAt(tabContainer); |
| 51 |
|
| 52 |
tabContainer.startup(); |
| 53 |
constructBorderContainerExpandoPaneTest(tabContainer, "0.1"); |
| 54 |
// FIXME: if cp2 isn't visible, Expando's collapse to 0px? TitleHeight calc'd at 0?! |
| 55 |
//constructBorderContainerExpandoPaneTest(cp2, "0.2"); |
| 56 |
|
| 57 |
} |
| 58 |
|
| 59 |
var constructBorderContainerExpandoPaneTest = function(parent, cid){ |
| 60 |
console.log ("Parent id is: " + parent.id); |
| 61 |
|
| 62 |
var borderContainer = new dijit.layout.BorderContainer({ |
| 63 |
id: cid + "." + 0, |
| 64 |
title:"Tab 2", |
| 65 |
design: "horizontal", |
| 66 |
style: "height:350px;", |
| 67 |
selected:true |
| 68 |
}).placeAt(parent); |
| 69 |
parent.selectChild(borderContainer); |
| 70 |
|
| 71 |
// add a center region: |
| 72 |
var cr = new dijit.layout.ContentPane({ |
| 73 |
id: cid + "center", |
| 74 |
region: "center" |
| 75 |
}).placeAt(borderContainer); |
| 76 |
|
| 77 |
var ep = new dojox.layout.ExpandoPane({ |
| 78 |
id: cid + "." + 1, |
| 79 |
title: "Left Section Test", |
| 80 |
region: "left", |
| 81 |
style: "width: 33%; height: 98%; background-color:#FFDEAD" |
| 82 |
}).placeAt(borderContainer); |
| 83 |
|
| 84 |
var ep1 = new dojox.layout.ExpandoPane({ |
| 85 |
id: cid + "." + 2, |
| 86 |
title: "Right Section Test", |
| 87 |
region: "right", |
| 88 |
style: "width: 33%; height: 98%; background-color:#FFDEAD" |
| 89 |
}).placeAt(borderContainer); |
| 90 |
|
| 91 |
borderContainer.startup(); |
| 92 |
|
| 93 |
} |
| 94 |
|
| 95 |
// build the UI immediately onload: |
| 96 |
dojo.addOnLoad(constructTabContainerTest); |
| 97 |
|
| 98 |
</script> |
| 99 |
</head> |
| 100 |
<body class="tundra" role="main"> |
| 101 |
<h1 class="testTitle">Programatic ExpandoPane Test</h1> |
| 102 |
<div id="container0"></div> |
| 103 |
</body> |
| 104 |
</html> |