diff options
author | Derrell Lipman <derrell@samba.org> | 2007-02-06 04:35:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:44:39 -0500 |
commit | a45ea9069c51b6f90d55a2c40346c3ee9becc263 (patch) | |
tree | 8208442a0ab9d655f9dbb6953c8db60872c7b7ad /webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_1.html | |
parent | 0a5d888c24c925222dd94cdd80a29e09b235b795 (diff) | |
download | samba-a45ea9069c51b6f90d55a2c40346c3ee9becc263.tar.gz samba-a45ea9069c51b6f90d55a2c40346c3ee9becc263.tar.bz2 samba-a45ea9069c51b6f90d55a2c40346c3ee9becc263.zip |
r21169: - Step 3: Upgrade qooxdoo release code with latest qooxdoo svn's Table and
TreeVirtual. The TreeVirtual that was in the release was a very early
pre-release, and had a number of problems and missing features. This brings
it up-to-date and provides what seems to be a pretty well-working and highly
useful widget.
(This used to be commit 194880f1ffde7f01997c120136854acd145189e9)
Diffstat (limited to 'webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_1.html')
-rw-r--r-- | webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_1.html | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_1.html b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_1.html new file mode 100644 index 0000000000..b92df15d4f --- /dev/null +++ b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_1.html @@ -0,0 +1,84 @@ +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title>qooxdoo » Demo » Sample</title> + <link type="text/css" rel="stylesheet" href="../../css/layout.css"/> + <!--[if IE]> + <link type="text/css" rel="stylesheet" href="../../css/layout_ie.css"/> + <![endif]--> + <script type="text/javascript" src="../../script/sample.js"></script> +</head> +<body> + <script type="text/javascript" src="../../script/layout.js"></script> + + <div id="demoDescription"> + <p>Test large trees. This one adds a Spam branch with 3000 leaf nodes.</p> + </div> + + <script type="text/javascript"> + qx.core.Init.getInstance().defineMain(function() + { + var d = qx.ui.core.ClientDocument.getInstance(); + + // tree + var tree = new qx.ui.treevirtual.TreeVirtual("Tree"); + with (tree) + { + set({ + left : 10, + top : 30, + width : 400, + bottom : 30, + border : qx.renderer.border.BorderPresets.getInstance().thinInset + }); + setColumnWidth(0, 400); + setAlwaysShowOpenCloseSymbol(true); + }; + + d.add(tree); + + // tree data model + var dataModel = tree.getDataModel(); + + var te1 = dataModel.addBranch(null, "Desktop", true); + dataModel.setState(te1, + { + labelStyle : "background-color: red; color: white;" + }); + + var te; + + dataModel.addBranch(te1, "Files", true); + + te = dataModel.addBranch(te1, "Workspace", true); + dataModel.addLeaf(te, "Windows (C:)"); + dataModel.addLeaf(te, "Documents (D:)"); + + dataModel.addBranch(te1, "Network", true); + + te = dataModel.addBranch(te1, "Trash", true); + dataModel.setState(te, + { + cellStyle : "background-color: cyan;" + }); + + + var te2 = dataModel.addBranch(null, "Inbox", true); + + te = dataModel.addBranch(te2, "Spam", false); + + for (var i = 1; i < 3000; i++) + { + dataModel.addLeaf(te, "Spam Message #" + i); + } + + dataModel.addBranch(te2, "Sent", true); + dataModel.addBranch(te2, "Trash", true); + dataModel.addBranch(te2, "Data", true); + dataModel.addBranch(te2, "Edit", true); + + dataModel.setData(); + }); + </script> +</body> +</html> |