3 <title>The source code</title>
\r
4 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
\r
5 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
\r
7 <body onload="prettyPrint();">
\r
8 <pre class="prettyprint lang-js">
9 Ext.onReady(function(){
10 var tree = new Ext.tree.TreePanel({
12 title: 'My Task List',
19 containerScroll: true,
26 // auto create TreeLoader
27 dataUrl: 'check-nodes.json',
30 'checkchange': function(node, checked){
32 node.getUI().addClass('complete');
34 node.getUI().removeClass('complete');
40 text: 'Get Completed Tasks',
42 var msg = '', selNodes = tree.getChecked();
43 Ext.each(selNodes, function(node){
50 title: 'Completed Tasks',
51 msg: msg.length > 0 ? msg : 'None',
60 tree.getRootNode().expand(true);