jstree

jsTree - loading subnodes via ajax on demand

孤街浪徒 提交于 2019-11-27 01:02:11
I'm trying to get a jsTree working with on demand loading of subnodes. My code is this: jQuery('#introspection_tree').jstree({ "json_data" : { "ajax" : { url : "http://localhost/introspection/introspection/product" } }, "plugins" : [ "themes", "json_data", "ui" ] }); The json returned from the call is [ { "data": "Kit 1", "attr": { "id": "1" }, "children": [ [ { "data": "Hardware", "attr": { "id": "2" }, "children": [ ] } ], [ { "data": "Software", "attr": { "id": "3" }, "children": [ ] } ] ] } ..... ] Each element could have a lot of children, the tree is going to be big. Currently this is

How to get checked nodes in jquery jstree

橙三吉。 提交于 2019-11-26 21:58:39
问题 I have created one jquery jstree and it's working fine. Now the problem is how to get the the checked nodes details. For Creating JStree The code is: $(function () { $("#tree").jstree({ "json_data" : { "data" : [ {"data":"pe_opensourcescanning","id":0,"pId":-1,"children": [{"data":"tags","id":30,"pid":0},{"data":"branches","id":29,"pid":0},{"data":"trunk","id":1,"pid":0,"children":[{"data":"import-export","id":28,"pid":1},{"data":"custom_development","id":12,"pid":1},{"data":"Connectors","id"

Configuring jstree right-click contextmenu for different node types

最后都变了- 提交于 2019-11-26 18:49:31
问题 I've seen an example somewhere online showing how to customise the appearance of jstree's right-click context menu (using contextmenu plugin). For example, allow my users to delete "documents" but not "folders" (by hiding the "delete" option from the context menu for folders). Now I can't find that example. Can anyone point me in the right direction? The official documentation didn't really help. Edit: Since I want the default context menu with only one or two minor changes, I'd prefer to not

jsTree - loading subnodes via ajax on demand

↘锁芯ラ 提交于 2019-11-26 12:25:54
问题 I\'m trying to get a jsTree working with on demand loading of subnodes. My code is this: jQuery(\'#introspection_tree\').jstree({ \"json_data\" : { \"ajax\" : { url : \"http://localhost/introspection/introspection/product\" } }, \"plugins\" : [ \"themes\", \"json_data\", \"ui\" ] }); The json returned from the call is [ { \"data\": \"Kit 1\", \"attr\": { \"id\": \"1\" }, \"children\": [ [ { \"data\": \"Hardware\", \"attr\": { \"id\": \"2\" }, \"children\": [ ] } ], [ { \"data\": \"Software\",

jstree异步加载

爱⌒轻易说出口 提交于 2019-11-26 03:37:16
html: <div class="white-box"> <div> <div style="width: calc(100% - 65px); float: left"> <span class="jp-input-search jp-input-affix-wrapper " style="margin-bottom: 5px;"> <input id="search_q" placeholder="${i18n('common.search')}..." class="jp-input" type="text"> <span class="jp-input-suffix"> <i class="jp-icon jp-icon-search jp-input-search-icon"></i> </span> </span> </div> <div style="width: 50px; float: right"> <button class="jp-btn jp-btn-primary" οnclick="jp.openSaveDialog('${i18n('material.AddMaterialType')}', '${ctx}/warehouse/basic/materialtype/materialType/form/add','800px', '500px')"