Blame | Last modification | View Log | RSS feed
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Dijit List mini-browser | The Dojo Toolkit</title>
<style type="text/css">
@import "../../dojo/resources/dojo.css";
@import "css/dijitTests.css";
body, html { width:100%; height:100%; margin:0; padding:0; background:#fff !important; }
</style>
<script type="text/javascript" src="../../dojo/dojo.js"
djConfig="parseOnLoad: true, isDebug: true"></script>
<script type="text/javascript" src="_testCommon.js"></script>
<script language="JavaScript" type="text/javascript">
dojo.require("dojo.data.ItemFileReadStore");
dojo.require("dijit.Tree");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.SplitContainer");
dojo.require("dojo.parser"); // scan page for widgets and instantiate them
</script>
</head>
<body>
<div dojoType="dojo.data.ItemFileReadStore" jsId="theStore"
url="../tests/_data/dijits.json"></div>
<div dojoType="dijit.layout.SplitContainer" sizerWidth="7" style="width:100%; height:100%;">
<div dojoType="dijit.layout.ContentPane" layoutAlign="left">
<div dojoType="dijit.Tree" id="mytree" store="theStore" query="{namespace:'dijit'}"
labelAttr="className" label="Dijits">
<script type="dojo/method" event="onClick" args="item">
var str = "<h1>"+theStore.getLabel(item)+"</h1>";
var sum = theStore.getValue(item,'summary');
var des = theStore.getValue(item,'description')
var exp = theStore.getValue(item,'examples')
if(sum){ str += "<h2>summary:</h2><p><pre>" + sum + "</pre></p>"; }
if(des){ str += "<h2>details:</h2><p><pre>" + des + "</pre></code></p>"; }
if(exp){ str += "<h2>examples:</h2><p><pre>" + exp + "</pre></code></p>"; }
dojo.byId('detailPane').innerHTML = str;
</script>
<script type="dojo/method" event="getIconClass" args="item">
return "noteIcon";
</script>
</div>
</div>
<div dojoType="dijit.layout.ContentPane" id="detailPane" style="padding:10px; padding-top:0;">
</div>
</div>
</body>
</html>