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: Easier expanding and collapsing?
Bender
Member

Posts: 19
Registered: 1/11/2005
Member Is Offline
posted on 1/11/2005 at 02:09 PM Reply With Quote
Easier expanding and collapsing?


My first database driven tree menu works more or less fine.

But I'd like to expand and collaps the tree by clicking on the selected "line" instead of the plus/minus buttons. Is that possible?
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 1/12/2005 at 09:15 AM Reply With Quote

Please visit the product documentation page section API usage examples sample: Node open on single click.
View User's Profile View All Posts By User U2U Member
Bender
Member

Posts: 19
Registered: 1/11/2005
Member Is Offline
posted on 1/12/2005 at 11:38 AM Reply With Quote

I saw it. And how do I implement and call these functions? Are there any samples around?
View User's Profile View All Posts By User U2U Member
rock
Moderator

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

There is an event handler definition in the demo4 of your download package.
View User's Profile View All Posts By User U2U Member
Bender
Member

Posts: 19
Registered: 1/11/2005
Member Is Offline
posted on 1/13/2005 at 07:33 AM Reply With Quote

Thx.

I'm gonna have a look inside.
View User's Profile View All Posts By User U2U Member
Bender
Member

Posts: 19
Registered: 1/11/2005
Member Is Offline
posted on 1/13/2005 at 10:22 AM Reply With Quote

Isn't it demo5? There I can doubleclick right to the link and the tree expands/collapses.

But I can't find the function in order to implement it into tree_tpl.js.

Where is it?
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 1/13/2005 at 10:32 AM Reply With Quote

Find within demo4/tree_tpl.js var TREE2_TPL and function onItemOpenHandler
View User's Profile View All Posts By User U2U Member
Bender
Member

Posts: 19
Registered: 1/11/2005
Member Is Offline
posted on 1/13/2005 at 11:22 AM Reply With Quote

the function you mentioned is doing something else than I want it to: I allows only one subtree to be open.

But I'd like to be able to have all subtree opened. AND I'd like to expand/collapse the trees by clicking into the selected area of the menu entry. As in demo5.
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 1/13/2005 at 11:27 AM Reply With Quote

As you can see you've define onItemOpen handler function (which fires when open the node), and you need onItemSelect handler function, mentioned in the documentation.

Node open on single click:
/*
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
*/
View User's Profile View All Posts By User U2U Member
Bender
Member

Posts: 19
Registered: 1/11/2005
Member Is Offline
posted on 1/13/2005 at 12:07 PM Reply With Quote

O.k. I changed to:

// event handlers - item
'onItemSelect':'onItemSelectHandler' // on item open event handler
// make sure there is no comma after the last key-value pair
};

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;
}


And I do not have any links in the database link field. But it still doesn't work. Has this anything to do with the link check function?
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 1/13/2005 at 12:28 PM Reply With Quote

this functionality should work.
try to call alert inside the handler function to find the breakpoint.
View User's Profile View All Posts By User U2U Member
Bender
Member

Posts: 19
Registered: 1/11/2005
Member Is Offline
posted on 1/13/2005 at 12:42 PM Reply With Quote

How do I get rid of this function linkCheck(s_user) ?

I think this is causing the problem.

If I call the tree simply with

<script language="JavaScript">
new tree (TREE_ITEMS, TREE_TPL);
</script>

I get an error "object expected" in the status bar of the browser.
View User's Profile View All Posts By User U2U Member
Bender
Member

Posts: 19
Registered: 1/11/2005
Member Is Offline
posted on 1/13/2005 at 12:49 PM Reply With Quote

I found it.

O.k. now the subtree collapses/expands whe I click on the text link (instead of going to the link)

That's almost that what I wanted. I want to collaps/expand the trees by clicking next to the text (inside the selected row). Is that not possible?
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 1/13/2005 at 12:50 PM Reply With Quote

items.asp:
"<%=clink%>"
instead of
"javascript:linkCheck('<%=clink%>')"
View User's Profile View All Posts By User U2U Member
Bender
Member

Posts: 19
Registered: 1/11/2005
Member Is Offline
posted on 1/13/2005 at 12:59 PM Reply With Quote

Quote:
Originally posted by rock
items.asp:
"<%=clink%>"
instead of
"javascript:linkCheck('<%=clink%>')"


Thx I got that :)

By the way thx for your great support.
View User's Profile View All Posts By User U2U Member
rock
Moderator

Posts: 687
Registered: 4/15/2003
Member Is Offline
posted on 1/13/2005 at 01:22 PM Reply With Quote

Try to define apropriate style in tree.css:
/*style for mouseovered item link*/
.mover{
....
}

.mover a{
width: 100%;
}

Assume 'mover' is class you've assigned to the items at mouseovered states.
View User's Profile View All Posts By User U2U Member
Bender
Member

Posts: 19
Registered: 1/11/2005
Member Is Offline
posted on 1/13/2005 at 02:32 PM Reply With Quote

It works with

.mover a {
width: 100%;
display:block;
}


;)
View User's Profile View All Posts By User U2U Member
uthi
Newbie

Posts: 1
Registered: 3/2/2005
Member Is Offline
posted on 3/2/2005 at 03:59 PM Reply With Quote

Hi,

I am using Mindmanager/Mindjet to create websites for a customer. The application uses obviously a license by SoftComplex to establish the navigation tree. Example:
(URL is extracted by admin, please don't publish script files of commercial products, border rule #5)

There is the problem, that customers complain about the expanding and collapseing the tree by clicking on the selected "line" instead of the plus/minus buttons, as described in this topic.

However I am not an expert in Java and would like to ask somebody here or at SoftComplex to do the modifying of the scripts for us; of course we would pay for this service.

I appreciate your help.

Regards,

Ulrich Thiele, Alzenau, Germany
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/2/2005 at 04:14 PM Reply With Quote

Please refer to our Customer Care System
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