bootstrap-treeview

How to disable parent node checkbox of Bootstrap Treeview

爷,独闯天下 提交于 2020-06-24 16:48:13
问题 I want to keep my parent folder names uncheckable. but i can not pass the option with individual node here. I wrote code like this. $("#treeview-checkable").treeview({ data: root.attributeTopicList, showIcon: true, showCheckbox: true, showBorder: false, showTags: true, }); }; 回答1: I had to Add some lines in bootstrapp-treeview.js file Process-->> Go inside bootstrapp_treeview.js See how its render function works You will find that after treeview fire any event or make any changes on DOM it

How to disable parent node checkbox of Bootstrap Treeview

我是研究僧i 提交于 2020-06-24 16:48:07
问题 I want to keep my parent folder names uncheckable. but i can not pass the option with individual node here. I wrote code like this. $("#treeview-checkable").treeview({ data: root.attributeTopicList, showIcon: true, showCheckbox: true, showBorder: false, showTags: true, }); }; 回答1: I had to Add some lines in bootstrapp-treeview.js file Process-->> Go inside bootstrapp_treeview.js See how its render function works You will find that after treeview fire any event or make any changes on DOM it

Add data-bind property to a boostrap-treeview node for Knockout

守給你的承諾、 提交于 2019-12-13 16:32:43
问题 Is there a way to have "data-bind" properties added to a node when using the bootstrap-treeview ? https://github.com/jonmiles/bootstrap-treeview I have rendered a treeview, but I need to bind a click event to interact with my knockout ViewModel. For a node, I need to add data-bind="click: ViewNodeData" to each node. A node, once rendered, looks like this: <li class="list-group-item node-tree" data-nodeid="13" style="color:undefined;background-color:undefined;"> <span class="indent"></span>

save state bootstrap-treeview

不问归期 提交于 2019-12-11 14:05:42
问题 I need to save the state with this component https://github.com/jonmiles/bootstrap-treeview So I have modify the source code here: https://github.com/jonmiles/bootstrap-treeview/blob/master/src/js/bootstrap-treeview.js and I have added in the line 104 the code: getNodes: $.proxy(this.getNodes, this), and in the line 1209 the code: Tree.prototype.getNodes= function (options) { console.log("--- getNodes ---"); return this.nodes }; So when I execute the code : var jsonData=x$(idTree).treeview(

Uncaught TypeError: Cannot set property 'nodeId' of undefined

拟墨画扇 提交于 2019-12-02 06:47:18
问题 I'm getting this error on boostrap-treeview.js:267 when retrieving JSON data for my boostrap-treeview. $(document).ready(function() { $.ajax({ url: "js/category_data.php", method:"POST", dataType: "json", success: function(data) { $('#doctypesTree').treeview({ data: data }); } }); }); The JSON data is the following: { "2":{ "id":"12", "text":"Certified copy", "Description":"","root":"0" }, "3":{ "id":"13", "text":"Charter", "Description":"", "root":"0" }, "4":{ "id":"14", "text":"Codicil

Uncaught TypeError: Cannot set property 'nodeId' of undefined

纵然是瞬间 提交于 2019-12-02 05:48:12
I'm getting this error on boostrap-treeview.js:267 when retrieving JSON data for my boostrap-treeview. $(document).ready(function() { $.ajax({ url: "js/category_data.php", method:"POST", dataType: "json", success: function(data) { $('#doctypesTree').treeview({ data: data }); } }); }); The JSON data is the following: { "2":{ "id":"12", "text":"Certified copy", "Description":"","root":"0" }, "3":{ "id":"13", "text":"Charter", "Description":"", "root":"0" }, "4":{ "id":"14", "text":"Codicil (will)", "Description":"", "root":"0" }, "5":{ "id":"15", "text":"Cohabitation agreement", "Description":""