Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: folders expand on single click
nidhi
Newbie

Posts: 1
Registered: 3/21/2005
Member Is Offline
posted on 3/21/2005 at 10:33 AM Reply With Quote
folders expand on single click


When persons click on the test name of a folder in the tree.aspx it should expand the contents of that folder.
Currently the user must click the + sign or doubleclick the folder name in order to make it expand.
Please make it so single click expands the folders in tree.aspx
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 3/21/2005 at 01:43 PM Reply With Quote

You could easily make this by yourself using open tree API and event handling functionality.
For more details please refer to the product documentation (Node open on single click)
View User's Profile View All Posts By User U2U Member
stevvi
Junior Member

Posts: 5
Registered: 7/27/2005
Member Is Offline
posted on 7/27/2005 at 09:52 AM Reply With Quote

First off, apologies for being a total newbie...

I have found:

/*
This function modifies tree behavior so nodes without link
assigned will open on single click
Function should be called AS onItemSelect handler of the tree
*/

function onItemSelectHandler (o_item) {
// if node with no link then toggle
if (o_item.a_config[3] && !o_item.a_config[1]) {
o_item.o_root.toggle(o_item.n_id);
// cancel default action
return false;
}
// proceed to default handler
return true;
}

but where do I include the code? I've tried it at the bottom of tree_tpl.js and it doesn't seem to have any effect at all.

Any help would be appraciated.

Thanx
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 7/27/2005 at 02:22 PM Reply With Quote

The function you've found in the documentation is a handler function so you should also associate it with tree event via template settings. To link the handler with select event you should add following pair to the TREE_TPL object:

'onItemSelect' : 'onItemSelectHandler'
//make sure there is no comma sign after last pair
View User's Profile View All Posts By User U2U Member
stevvi
Junior Member

Posts: 5
Registered: 7/27/2005
Member Is Offline
posted on 7/27/2005 at 04:47 PM Reply With Quote

Many thanx
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Multiple Trees
Frames Targeting
Icons and Styles Overloading
Event Handling
Performance Test
Version 1.2 features
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004