- Screen name: shakio
shakio's Profile
2 Posts
1 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
- Hi, I am using jstree (jstree.com) and it comes with default themes located directly under where the jstree script is located.For me this is in the Scripts folder. So I have /Scripts/themes/classic. I wish to move this folder to /Content/themes/jstree/classic
I read up on the jstree docs, which states to simply add the “url” attribute under the themes section in the config file. The docs state:
url:
A string (or false if not used). Default is false.
The location of the theme's CSS file, if set to false jstree will look for the file in < theme folder >/themes/< theme name >/style.css. You can set the theme folder using $.jstree._themes = "PATH/TO/FOLDER/";, otherwise it is autodetected as <jquery.tree.js location>/themes/.
So, I did this:
"themes": {
"theme": "classic",
“url”:”/content/themes/jstree/classic/style.css”
}
This did not work, nor did many attempts at setting the “url”.
Researching this led me to another direction where you set this value outside of the config file, but that method did not work either.
Has anyone successfully moved or renamed the default theme folder?
Has anyone successfully renamed the theme name?
Any help (or suggestions) on this would be much appreciated!
Thanks
- 29-Jan-2013 11:55 AM
- Forum: Using jQuery Plugins
Hey everyone!
I am really stuck on a jstree issue; I have 2 trees a “source” tree and a “destination” tree. The “source” tree is a flat tree that contains nodes that I wish to drag over to the “destination” tree to build it out. But, after the drag I need those nodes to stay so I can reuse them. Now, if I press the control key down before and during the drag it will perform a copy function and leave the source node. But, I don’t want to have the user do this; I would like the tree to always copy. Which is why I used this setting, but it’s not working on my tree. Can anyone help? Here is the code for both of the trees.
Thanks!!<script type="text/javascript"> $(function () { $("#SourceTree").jstree({ "json_data": { "ajax": { "url": "Home/GetTree", "type": "POST", "contentType": "application/json; charset=utf-8", "dataType": "json", "data": function (n) { var result = "{'id':'" + (n.attr ? n.attr("id").replace("node_", "") : "0") + "'}"; return (result); } } }, "crrm": { "move": { "always_copy": "multitree", "check_move": function () { return false; }, } }, "dnd": { "open_timeout": 3000 }, "plugins": ["themes", "json_data", "ui", "types", "crrm", "dnd"] }) $("#DestinationTree").jstree({ "json_data": { "ajax": { "url": "Home/GetTree", "type": "POST", "contentType": "application/json; charset=utf-8", "dataType": "json", "data": function (n) { var result = "{'id':'" + (n.attr ? n.attr("id").replace("node_", "") : "0") + "'}"; return (result); } } }, "plugins": ["themes", "json_data", "ui", "types", "dnd", "crrm"] }) }); </script>
- «Prev
- Next »
Moderate user : shakio