Sebastian
Junior Member
Posts: 2
Registered: 9/15/2004
Member Is Offline
|
| posted on 9/27/2004 at 09:09 AM |
|
|
change icons dynamically
Hello
Accidentally I wrote this Thread in the false forum... now again ;-)
is it possible, to change icons dynamically without changing the tree_items.js?
(so that there is no refresh of the site required to display the changed icon on the tree)
is there a method or function?
friendly regards
Sebastian
|
|
|
rock
Moderator
Posts: 687
Registered: 4/15/2003
Member Is Offline
|
| posted on 9/27/2004 at 10:18 AM |
|
|
You could change icons/styles by dynamicaly modifing TREE_TPL var. E.g. to change root icons:
TREE_TPL['icon_48']='icons/base.gif'; // root icon normal
TREE_TPL['icon_52']='icons/base.gif'; // root icon selected
TREE_TPL['icon_56']='icons/base.gif'; // root icon opened
TREE_TPL['icon_60']='icons/base.gif'; // root icon selected opened
to apply changes don't forget to call state_lookup() function for the items which icons/styles had been changed.
|
|
|