Topic: node icons + json on the fly ?
Hello,
How can I handle custom icons on the fly with JSON ?
I know that can use style property but I must setup all styles before on tree init.
What I want to do is affect an icon to a node on the fly ...
You are not logged in. Please login or register.
Pages 1
Hello,
How can I handle custom icons on the fly with JSON ?
I know that can use style property but I must setup all styles before on tree init.
What I want to do is affect an icon to a node on the fly ...
you can create classes reflects icons, and add their:
[
{
"property": {
"name": "root",
"openIcon": "open_icon_class",
"closeIcon": "close_icon_class"
},
"children": [
{
"property": {
"name": "node1",
"openIcon": "another_open_icon_class",
"closeIcon": "another_close_icon_class"
}
}
]
}
]or create types with openIcon and closeIcon properties and use their
Does it exists a way to just specify the image file ?
Beacause with this method I must have defined CSS styles before ...
Last edited by scramatte (2008-12-15 00:14:22)
Does it exists a way to just specify the image file ?
no
what happens is that without this feature is complicate to handle icons on the fly with JSON.
Because is not easy to create CSS style with javascript ...
I've found these snippets to create CSS using javascript
http://webdevel.blogspot.com/2006/06/cr
cript.html
http://www.webscriptexpert.com/Javascri
avascript/
Last edited by scramatte (2008-12-15 10:40:51)
Posts [ 6 ]
Pages 1
Powered by PunBB