jstree

jsTree display flaw in IE8

断了今生、忘了曾经 提交于 2019-12-01 23:02:31
问题 I've been working with jsTree and encountered a problem in IE8. All the data is displayed correctly in the tree, but when I attempt to collapse a branch of the tree it does not display properly. That is, the smooth collapse animation happens, but then the data is again visible when it should not be. The same code works great on Firefox 3.6.27 and Chrome 18.0.1025.151. Any idea why IE8 would behave differently? Here is the code for the webpage: <html> <head> <script type="text/javascript" src=

Get checked nodes in a jsTree

时间秒杀一切 提交于 2019-12-01 20:31:46
I have a working JSTree based on JSON data, and the checkbox plugin displays boxes next to each item -- so far so good. Now I want to get which nodes the user has checked, so I can do something with the data. Unfortunately I haven't found a way to do it through the documentation or web searches. A few answers on SO say to use a get_checked method, but either I'm really missing something or my version of JSTree doesn't have that (i.e. that string doesn't appear anywhere in the project files). I'm on version 3.0.0, which is the latest right now. Could someone please point me either to a) how to

jsTree AJAX search with some node childs?

天涯浪子 提交于 2019-12-01 18:08:27
I try to implement ajax search in jsTree, but only inside one of root node. I read docs, and found some info about: $.jstree.defaults.search.ajax A str (which is the search string) parameter will be added with the request, an optional inside parameter will be added if the search is limited to a node id. My SEARCH AJAX config: "search": { // search config "show_only_matches": true, 'ajax': { 'url': "/ajax/root-nodes" } }, jsSearch call: $tree.jstree(true).search(searchText); I also use lazy-loading of subnodes. Is anybody do something like this? In your call you are not limiting the search to a

jsTree search with Ajax/JSON not calling URL

▼魔方 西西 提交于 2019-12-01 17:53:42
I would really appreciate some help with the following: I have a jsTree loaded with JSON data via a URL. All the data is preloaded. What I need to do is change the search functionality to reload the entire tree with new JSON data via AJAX based on the user input (because I need to do more complex node searching in the backend). As a start all I am trying to do is to get the jsTree code to call my URL. I started with the same URL as I use to originally load the tree. However - and this is the problem for which I cannot find a solution - although the URL is called successfully to first load the

软件工程2019结对编程作业

瘦欲@ 提交于 2019-12-01 16:17:37
博客链接 余泓: https://www.cnblogs.com/fishred/ 杨文燕: https://www.cnblogs.com/address2019/ 作业博客: https://edu.cnblogs.com/campus/fzu/2019FZUSEZ/homework/8736 GitHub项目地址 https://github.com/fishred2941214/031702409-031702411 具体分工 余泓:代码编写、ui设计 杨文燕:jstee使用、测试 PSP表格 PSP2.1 Personal Software Process Stages 预计耗时(分钟) 实际耗时(分钟) Planning 计划(估计这个任务需要多少时间) 60 60 Development 开发 1505 1295 Analysis 需求分析(包括学习新技术) 240 360 Design Spec 生成设计文档 60 30 Design Review 设计复审 30 10 Coding Standard 代码规范(为目前的开发制定合适的规范) 5 5 Designt 具体设计 60 40 Coding 具体编码 1080 960 Code Review 代码复审 30 10 Test 测试(自我测试、修改代码,提交修改) 200 260 Reporting 报告

Programatically expanding nodes in jstree with ajax load

风流意气都作罢 提交于 2019-12-01 14:05:57
I have a tree made with jstree which loads partially and loads on via json_data plugin as you expand nodes. Here's the crux of the code: $("#TreeViewDiv") .jstree( { json_data: { ajax: { url: "/Website/GetNodes", data: function (node) { //do some stuff to compile data for backend here return { //insert data for backend here }; }, error: function () { $("#TreeViewDiv").html("Error initializing tree"); } } }, plugins: ["json_data", "ui"] }); I then want to expand some of the nodes and select a leaf node, depending on which user is accessing the site. I do this in a loop as follows: var

Programatically expanding nodes in jstree with ajax load

你离开我真会死。 提交于 2019-12-01 12:34:45
问题 I have a tree made with jstree which loads partially and loads on via json_data plugin as you expand nodes. Here's the crux of the code: $("#TreeViewDiv") .jstree( { json_data: { ajax: { url: "/Website/GetNodes", data: function (node) { //do some stuff to compile data for backend here return { //insert data for backend here }; }, error: function () { $("#TreeViewDiv").html("Error initializing tree"); } } }, plugins: ["json_data", "ui"] }); I then want to expand some of the nodes and select a

PHP: Convert <ul> <li> Tree HTML tag to an array

偶尔善良 提交于 2019-12-01 11:57:01
问题 I'm using jsTree and I need to convert this HTML tag tree code <ul> <li> to a PHP array. The jsTree HTML tag will be passed to PHP to be parsed and store in a structured tree PHP array(see below for the PHP array structure). Additional question : Is my desired PHP array structure good or you can suggest a good structure? I'm open for suggestions. Thanks in advance :) Cheers, Mark jsTree Screenshot : HTML Tree String : <ul class="ltr"> <li id="phtml_1" class=" open"> <a style="" class=" " href

Get the immediate parent of child node in jstree

感情迁移 提交于 2019-12-01 10:46:39
I want to retrieve the parent of the child node without clicking on the tree .. data.inst._get_parent(data.rslt.obj).attr("id"); Above command give me the immediate parent when we click on the child nodes . Is there a way to get the parent node without clicking on the child node . Regards, Praque M It seems the "data.inst" was renamed in newer versions to "data.instance". This made tracking down the solution difficult data.instance.get_parent(data.node) returns the string ID of the parent (much unexpected for me). To get the parent I had to call data.instance.get_node() on the string ID. data

How to drag a node from a div and drop it on to a JStree? (jstree version: 3.0.4)

被刻印的时光 ゝ 提交于 2019-12-01 10:46:05
Using the following code, I could drag a JSTree node and drop it on to a div, and after that, the node would be deleted from the jstree. I am storing all the removed jstree nodes in mapOfRemovedNodes object, where node id is KEY and the node object itself is VALUE. Now, I want to move the node back to the JSTree. This is my complete code: <!doctype html> <head> <title>JSTree</title> <link rel="stylesheet" href="css/style.css" /> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="js/jquery.js"></script> <script src="js/jstree.js"><