Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/dTree/api.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/dTree/api.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/dTree/api.html 25 Feb 2007 19:06:27 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/dTree/api.html 24 Nov 2007 15:35:43 -0000 1.3 @@ -1,252 +1,252 @@ - - - - - - Destroydrop » Javascripts » Tree » Api - - - - - - - - -
- -
- - - - -
- -
- - -

Overview

-
-
- - - -
- - -

Functions

-
-
- - -

add()

-

Adds a node to the tree.
Can only be called before the tree is drawn.

-

id, pid and name are required.

- -

Parameters

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
idNumberUnique identity number.
pidNumberNumber refering to the parent node. The value for the root node has to be -1.
nameStringText label for the node.
urlStringUrl for the node.
titleStringTitle for the node.
targetStringTarget for the node.
iconStringImage file to use as the icon. Uses default if not specified.
iconOpenStringImage file to use as the open icon. Uses default if not specified.
openBooleanIs the node open.
-
- - -

Example

-

mytree.add(1, 0, 'My node', 'node.html', 'node title', 'mainframe', 'img/musicfolder.gif');

-
- - -

openAll()

-

Opens all the nodes.
Can be called before and after the tree is drawn.

-

Example

-

mytree.openAll();

-
- - - -

closeAll()

-

Closes all the nodes.
Can be called before and after the tree is drawn.

-

Example

-

mytree.closeAll();

-
- - - -

openTo()

-

Opens the tree to a certain node and can also select the node.
- Can only be called after the tree is drawn.

- -

Parameters

- - - - - - - - - - - - - - - - -
NameTypeDescription
idNumberIdentity number for the node.
selectBooleanShould the node be selected.
- -

Example

-

mytree.openTo(4, true);

- -
- - -

Configuration

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VariableTypeDefaultDescription
targetStringtrueTarget for all the nodes.
folderLinksBooleantrueShould folders be links.
useSelectionBooleantrueNodes can be selected(highlighted).
useCookiesBooleantrueThe tree uses cookies to rember it's state.
useLinesBooleantrueTree is drawn with lines.
useIconsBooleantrueTree is drawn with icons.
useStatusTextBooleanfalseDisplays node names in the statusbar instead of the url.
closeSameLevelBooleanfalseOnly one node within a parent can be expanded at the same time. openAll() and closeAll() functions do not work when this is enabled.
inOrderBooleanfalseIf parent nodes are always added before children, setting this to true speeds up the tree.
- -

Example

-

mytree.config.target = "mytarget";

- -
- -
- -
- - - - -
- -
- - - - + + + + + + Destroydrop » Javascripts » Tree » Api + + + + + + + + +
+ +
+ + + + +
+ +
+ + +

Overview

+
+
+ + + +
+ + +

Functions

+
+
+ + +

add()

+

Adds a node to the tree.
Can only be called before the tree is drawn.

+

id, pid and name are required.

+ +

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
idNumberUnique identity number.
pidNumberNumber refering to the parent node. The value for the root node has to be -1.
nameStringText label for the node.
urlStringUrl for the node.
titleStringTitle for the node.
targetStringTarget for the node.
iconStringImage file to use as the icon. Uses default if not specified.
iconOpenStringImage file to use as the open icon. Uses default if not specified.
openBooleanIs the node open.
+
+ + +

Example

+

mytree.add(1, 0, 'My node', 'node.html', 'node title', 'mainframe', 'img/musicfolder.gif');

+
+ + +

openAll()

+

Opens all the nodes.
Can be called before and after the tree is drawn.

+

Example

+

mytree.openAll();

+
+ + + +

closeAll()

+

Closes all the nodes.
Can be called before and after the tree is drawn.

+

Example

+

mytree.closeAll();

+
+ + + +

openTo()

+

Opens the tree to a certain node and can also select the node.
+ Can only be called after the tree is drawn.

+ +

Parameters

+ + + + + + + + + + + + + + + + +
NameTypeDescription
idNumberIdentity number for the node.
selectBooleanShould the node be selected.
+ +

Example

+

mytree.openTo(4, true);

+ +
+ + +

Configuration

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableTypeDefaultDescription
targetStringtrueTarget for all the nodes.
folderLinksBooleantrueShould folders be links.
useSelectionBooleantrueNodes can be selected(highlighted).
useCookiesBooleantrueThe tree uses cookies to rember it's state.
useLinesBooleantrueTree is drawn with lines.
useIconsBooleantrueTree is drawn with icons.
useStatusTextBooleanfalseDisplays node names in the statusbar instead of the url.
closeSameLevelBooleanfalseOnly one node within a parent can be expanded at the same time. openAll() and closeAll() functions do not work when this is enabled.
inOrderBooleanfalseIf parent nodes are always added before children, setting this to true speeds up the tree.
+ +

Example

+

mytree.config.target = "mytarget";

+ +
+ +
+ +
+ + + + +
+ +
+ + + + \ No newline at end of file