summaryrefslogtreecommitdiff
path: root/webapps/qooxdoo-0.6.5-sdk/frontend/application
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2007-02-06 04:35:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:44:39 -0500
commita45ea9069c51b6f90d55a2c40346c3ee9becc263 (patch)
tree8208442a0ab9d655f9dbb6953c8db60872c7b7ad /webapps/qooxdoo-0.6.5-sdk/frontend/application
parent0a5d888c24c925222dd94cdd80a29e09b235b795 (diff)
downloadsamba-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')
-rw-r--r--webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_1.html (renamed from webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_3.html)0
-rw-r--r--webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_2.html (renamed from webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_4.html)7
-rw-r--r--webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_3.html (renamed from webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_5.html)60
-rw-r--r--webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_4.html (renamed from webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_6.html)0
-rw-r--r--webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_1.html66
-rw-r--r--webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_2.html9
6 files changed, 93 insertions, 49 deletions
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_3.html b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_1.html
index b92df15d4f..b92df15d4f 100644
--- a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_3.html
+++ b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_1.html
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_4.html b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_2.html
index 3b150f52ba..843de57477 100644
--- a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_4.html
+++ b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_2.html
@@ -83,9 +83,7 @@
{
alert('treeOpenWithContent ');
var node = e.getData();
- dataModel.addLeaf(node.nodeId,
- newItem.toString(),
- false);
+ dataModel.addLeaf(node.nodeId, newItem.toString());
newItem++;
});
@@ -107,7 +105,8 @@
{
alert('treeOpenWhileEmpty');
var node = e.getData();
- tree.setState(node.nodeId, { opened : null });
+ tree.setState(node.nodeId,
+ { bHideOpenClose : true });
});
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_5.html b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_3.html
index 08c73e12ea..70391adf89 100644
--- a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_5.html
+++ b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_3.html
@@ -12,14 +12,23 @@
<script type="text/javascript" src="../../script/layout.js"></script>
<div id="demoDescription">
- <p>Demonstrate use of multiple columns in a tree.</p>
+ <p>
+ Demonstrate use of multiple columns in a tree, and the use of the
+ getHierarchy() method to retrieve the entire tree path of a node.
+ Allows various options to be manipulated.
+ </p>
</div>
<script type="text/javascript">
qx.core.Init.getInstance().defineMain(function()
{
// tree
- var tree = new qx.ui.treevirtual.TreeVirtual([ "Tree", "Permissions" ]);
+ var tree = new qx.ui.treevirtual.TreeVirtual(
+ [
+ "Tree",
+ "Permissions",
+ "Last Accessed"
+ ]);
with (tree)
{
set({
@@ -30,8 +39,9 @@
border : qx.renderer.border.BorderPresets.getInstance().thinInset
});
setAlwaysShowOpenCloseSymbol(true);
- setColumnWidth(0, 400);
- setColumnWidth(1, 100);
+ setColumnWidth(0, 200);
+ setColumnWidth(1, 80);
+ setColumnWidth(2, 200);
};
tree.addToDocument();
@@ -55,8 +65,10 @@
te1_1 = dataModel.addBranch(te1, "Workspace", true);
te = dataModel.addLeaf(te1_1, "Windows (C:)");
dataModel.setColumnData(te, 1, "-rwxr-xr-x");
+ dataModel.setColumnData(te, 2, "2007-01-30 22:54:03");
te = dataModel.addLeaf(te1_1, "Documents (D:)");
dataModel.setColumnData(te, 1, "-rwxr-xr-x");
+ dataModel.setColumnData(te, 2, "2007-01-30 22:54:03");
dataModel.addBranch(te1, "Network", true);
@@ -130,13 +142,13 @@
tree.setUseTreeLines(e.getData());
});
- o = new qx.ui.form.CheckBox("Jens Lautenbacher mode?");
+ o = new qx.ui.form.CheckBox("Exclude first-level tree lines?");
o.set({ top: 100, left: 0, checked: false });
commandFrame.add(o);
o.addEventListener("changeChecked",
function(e)
{
- tree.setJensLautenbacherMode(e.getData());
+ tree.setExcludeFirstLevelTreeLines(e.getData());
});
o = new qx.ui.form.CheckBox("Always show open/close symbol?");
@@ -157,7 +169,8 @@
if (this.getChecked())
{
var node = e.getData();
- tree.setState(node.nodeId, { opened : null });
+ tree.setState(node.nodeId,
+ { bHideOpenClose : true });
}
},
o);
@@ -170,6 +183,39 @@
{
tree.setOpenCloseClickSelectsRow(e.getData());
});
+
+ o = new qx.ui.form.CheckBox("Disable the tree?");
+ o.set({ top: 180, left: 0, checked: false });
+ commandFrame.add(o);
+ o.addEventListener("changeChecked",
+ function(e)
+ {
+ tree.setEnabled(! e.getData());
+ });
+
+ o = new qx.ui.form.CheckBox("Display a cell focus indicator?");
+ o.set({ top: 200, left: 0, checked: true });
+ commandFrame.add(o);
+ o.addEventListener("changeChecked",
+ function(e)
+ {
+ if (e.getData())
+ {
+ tree.setCellFocusAttributes(
+ {
+ backgroundColor : "lightblue"
+ });
+ }
+ else
+ {
+ tree.setCellFocusAttributes(
+ {
+ backgroundColor : "transparent"
+ });
+ }
+ });
+
+
});
</script>
</body>
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_6.html b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_4.html
index 65b5b9d397..65b5b9d397 100644
--- a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_6.html
+++ b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/TreeVirtual_4.html
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_1.html b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_1.html
index e419453600..089aa0f582 100644
--- a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_1.html
+++ b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_1.html
@@ -22,47 +22,45 @@
{
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);
- };
-
- d.add(tree);
-
- // tree data model
- var dataModel = tree.getDataModel();
- var te;
+ var horiz = new qx.ui.layout.HorizontalBoxLayout;
+
+ horiz.setPadding(10);
+ horiz.set({
+ left:20, right:10, height:"100%", spacing:20
+ });
- var te1 = dataModel.addBranch(null, "Desktop", true);
-
- dataModel.addBranch(te1, "Files", true);
+ var tree = new qx.ui.treevirtual.TreeVirtual(["Objects", "Date", "ID"]);
+ with (tree){
+ setHeight ("100%");
+ setWidth(900);
+ setColumnWidth(0, 400)
+ setColumnWidth(1, 200);
+ setColumnWidth(2, 50);
+ };
- te = dataModel.addBranch(te1, "Workspace", true);
- dataModel.addLeaf(te, "Windows (C:)");
- dataModel.addLeaf(te, "Documents (D:)");
+ var data_model = tree.getDataModel ();
- dataModel.addBranch(te1, "Network", true);
- dataModel.addBranch(te1, "Trash", true);
+ var object_folder =
+ data_model.addBranch (null,
+ "Test",
+ false);
- var te2 = dataModel.addBranch(null, "Inbox", true);
+ data_model.addLeaf (object_folder,
+ "Test") ;
+
+ data_model.setData();
- dataModel.addBranch(te2, "Presets", true);
- dataModel.addBranch(te2, "Sent", true);
- dataModel.addBranch(te2, "Trash", true);
- dataModel.addBranch(te2, "Data", true);
- dataModel.addBranch(te2, "Edit", true);
+ if (false)
+ {
+ d.add (tree);
+ }
+ else
+ {
+ horiz.add (tree);
+ d.add (horiz);
+ }
- dataModel.setData();
});
</script>
</body>
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_2.html b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_2.html
index 8c965f93de..7c44daf98b 100644
--- a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_2.html
+++ b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/TreeVirtual_2.html
@@ -45,7 +45,7 @@
var node = // the root node (not displayed)
{
- opened : true,
+ bOpened : true,
children : [ 1 ]
};
treeData.push(node);
@@ -56,7 +56,7 @@
parentNodeId : 0,
label : "My Root",
bSelected : false,
- opened : true,
+ bOpened : true,
icon : "icon/16/places/folder.png",
iconSelected : "icon/16/folder_open.png",
labelStyle : "background-color:red;color:white",
@@ -70,7 +70,8 @@
parentNodeId : 1,
label : "A sub-folder",
bSelected : false,
- opened : true,
+ bOpened : true,
+ bHideOpenClose: true,
icon : "icon/16/places/folder.png",
iconSelected : "icon/16/folder_open.png",
cellStyle : "background-color:cyan",
@@ -84,7 +85,7 @@
parentNodeId : 2,
label : "Third-level leaf",
bSelected : false,
- opened : false,
+ bOpened : false,
icon : "icon/16/actions/document-new.png",
iconSelected : "icon/16/actions/document-open.png",
children : [ ]