jstree

I am using jsTree and jsTree Grid and data in my second column disppears

心已入冬 提交于 2019-12-14 03:49:04
问题 I have one column in jsTree Grid representing my tree. The second column is used for displaying "tags" associated with each node. It is displaying great until I click another level. So the second column will create a div and my tags (similar to stack overflow tags) are appended to that html element. Here is the issue, when the page first loads. I see the root node just fine and the "tags" associated with the root node that I defined in the second column. Looks great! When I click to expand

loop through jstree to search for all occurences of a node id and then change the class of those nodes

二次信任 提交于 2019-12-14 00:37:56
问题 I have the following javascript code which changes the class (of the <ins> tag) for each selected node in the jstree: $j("#actionButton1").click(function() { $j.each($j("#demo2").jstree("get_selected"), function(index, element) { alert($j(element).attr('id')); var sub_id = $j(element).attr('id'); //node id is stored in the varialble sub_id $j("#"+sub_id+" ins:eq(1)").attr("class","jstree-icon2"); // set class to display new icon });//end of selected nodes loop }); The code above works fine

Change AJAX options in jstree AND reload the tree from server

不羁的心 提交于 2019-12-13 15:26:38
问题 I am loading XML flat tree in my jsTree using ajax, so the declaration looks like this (it works fine): $("#jstree").jstree({ "xml_data": { // "data": $xmlFlatData, "ajax": { type: "POST", async: true, "url": loc + "/AjaxReturnTree", data: '{"longnames":"'+flag+'"}', contentType: "application/json; charset=utf-8", dataType: "json", cache: false, success: function (msg) { var mm = eval('(' + msg + ')'); ; // create object to get rid of json return mm.d; }, error: function () { // TODO process

XSLT tree structure based on item numbers

一世执手 提交于 2019-12-13 07:11:50
问题 I have a problem with my XSLT-Stylesheet. I have a XML document with multiple assemblys. Each assembly has a unique item number. An assembly can contain other assemblys as positions, but the XML document has a flat structure like this: <?xml version="1.0" encoding="ISO-8859-1"?> <PartsCatalog Version="1.0"> <Description><![CDATA[asdsadasdadad ]]></Description> <Assembly Item="0000 " Plate=" " Class=" "> <Description Lang=" DE"><![CDATA[Main assembly]]></Description> <Description Lang=" EN"><!

jsTree JSON with MVC

蹲街弑〆低调 提交于 2019-12-13 05:41:54
问题 I have done a lot of research and cannot find an answer. I want to integrate JSTREE with MVC3.0. Here is my Javascript setup: setupTree: function (treeDivId) { $('#' + treeDivId).jstree({ "json_data": { "ajax": { url: CustomTree.SectorLoadUrl, type: "POST", contentType: "application/json;charset=utf-8", dataType: "json", data: function (n) { return { id: n.attr ? n.attr("id") : "0" }; }, success: function (data, textstatus, xhr) { alert(data); }, error: function (xhr, textstatus, errorThrown)

Refreshing jstree after successful rename event (maybe WCF and or caching problem?)

自作多情 提交于 2019-12-13 03:36:54
问题 I have a jstree that loads it's data from a DB through a WCF service using JSON. I managed to get jstree's rename context menu item to "work", meaning: I bound an ajax call to the jstree rename event, so when the user renames a node, it tells a WCF method to update the database (to "save" the new name). Problem: If I go to another page and then come back later, the node has reverted to the old name! It looks like there is some kind of caching going on, either in jstree or the browser, or WCF,

Get list of checked node IDs of jstree [duplicate]

这一生的挚爱 提交于 2019-12-12 19:17:09
问题 This question already has answers here : How do I get the id of the selected node in jsTree? (14 answers) Closed 6 years ago . I'm new to jstree and jQuery and have a little problem with node checking in my test tree. The user should first check the nodes he needs, then click on the "Summary" button to get a list of the IDs of the checked nodes in an alert window. I also want to export a list of the IDs for further use in a cgi file . This is my code: <!doctype html> <html> <head> <title

Is it possible to drag and drop external data into a jstree?

人盡茶涼 提交于 2019-12-12 16:36:07
问题 I'm working on a project which requires a hierarchical navigation menu to be built. jstree looks good for this. The tree will be saved to a database - I am planning on using CakePHP's Tree Behaviour (the project has to work in Cake 2.x rather than 3.x due to the existing codebase). One of the things I need to do is have the ability to add "Tags" to my tree from an external data source. The way I have things configured is as follows: The data to populate my jstree is coming from a database

Drag from JQGrid to jsTree v.0.9.9a

丶灬走出姿态 提交于 2019-12-12 14:24:29
问题 I am looking to drag a row from the jqGrid I have created and fire a drop event on a node in the jsTree (v.0.9.9a). Is there anyway to do this - using v.0.9.9a of the jsTree only. Regards. 回答1: This is a really narrow question. It sounds like both controls use the jQuery UI draggable and droppable widgets, and that you have a preliminary approach. Why not try implementing your idea and see how well it works? I would encourage you to post your code when you are done, or if you get stuck along

how to show loading image when a child node is loading data dynamically using JSTREE?

岁酱吖の 提交于 2019-12-12 14:02:12
问题 In my project, iam populating the child nodes data dynamically through ajax call.As data is more, it is taking time to load the data.So i want to show a loading image in the tree(in child node position). how to achieve this? 回答1: When a node is loading in JSTREE, it will be having jstree-loading class. Therefore, just add the following to your CSS: .jstree-default a.jstree-loading .jstree-icon { background:url(image name) center center no-repeat !important; } Note: Image name is a variable.Do