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>Dijit List mini-browser | The Dojo Toolkit</title>
|
|
|
6 |
|
|
|
7 |
<style type="text/css">
|
|
|
8 |
@import "../../dojo/resources/dojo.css";
|
|
|
9 |
@import "css/dijitTests.css";
|
|
|
10 |
body, html { width:100%; height:100%; margin:0; padding:0; background:#fff !important; }
|
|
|
11 |
</style>
|
|
|
12 |
|
|
|
13 |
<script type="text/javascript" src="../../dojo/dojo.js"
|
|
|
14 |
djConfig="parseOnLoad: true, isDebug: true"></script>
|
|
|
15 |
<script type="text/javascript" src="_testCommon.js"></script>
|
|
|
16 |
|
|
|
17 |
<script language="JavaScript" type="text/javascript">
|
|
|
18 |
dojo.require("dojo.data.ItemFileReadStore");
|
|
|
19 |
dojo.require("dijit.Tree");
|
|
|
20 |
dojo.require("dijit.layout.ContentPane");
|
|
|
21 |
dojo.require("dijit.layout.SplitContainer");
|
|
|
22 |
dojo.require("dojo.parser"); // scan page for widgets and instantiate them
|
|
|
23 |
</script>
|
|
|
24 |
|
|
|
25 |
</head>
|
|
|
26 |
<body>
|
|
|
27 |
<div dojoType="dojo.data.ItemFileReadStore" jsId="theStore"
|
|
|
28 |
url="../tests/_data/dijits.json"></div>
|
|
|
29 |
|
|
|
30 |
<div dojoType="dijit.layout.SplitContainer" sizerWidth="7" style="width:100%; height:100%;">
|
|
|
31 |
<div dojoType="dijit.layout.ContentPane" layoutAlign="left">
|
|
|
32 |
<div dojoType="dijit.Tree" id="mytree" store="theStore" query="{namespace:'dijit'}"
|
|
|
33 |
labelAttr="className" label="Dijits">
|
|
|
34 |
<script type="dojo/method" event="onClick" args="item">
|
|
|
35 |
|
|
|
36 |
var str = "<h1>"+theStore.getLabel(item)+"</h1>";
|
|
|
37 |
|
|
|
38 |
var sum = theStore.getValue(item,'summary');
|
|
|
39 |
var des = theStore.getValue(item,'description')
|
|
|
40 |
var exp = theStore.getValue(item,'examples')
|
|
|
41 |
|
|
|
42 |
if(sum){ str += "<h2>summary:</h2><p><pre>" + sum + "</pre></p>"; }
|
|
|
43 |
if(des){ str += "<h2>details:</h2><p><pre>" + des + "</pre></code></p>"; }
|
|
|
44 |
if(exp){ str += "<h2>examples:</h2><p><pre>" + exp + "</pre></code></p>"; }
|
|
|
45 |
|
|
|
46 |
dojo.byId('detailPane').innerHTML = str;
|
|
|
47 |
|
|
|
48 |
</script>
|
|
|
49 |
<script type="dojo/method" event="getIconClass" args="item">
|
|
|
50 |
return "noteIcon";
|
|
|
51 |
</script>
|
|
|
52 |
</div>
|
|
|
53 |
</div>
|
|
|
54 |
<div dojoType="dijit.layout.ContentPane" id="detailPane" style="padding:10px; padding-top:0;">
|
|
|
55 |
|
|
|
56 |
</div>
|
|
|
57 |
</div>
|
|
|
58 |
|
|
|
59 |
</body>
|
|
|
60 |
</html>
|