$(document).ready((function(){var e="#5A8DEE",t=[{text:"Parent 1",href:"#parent1",tags:["4"],nodes:[{text:"Child 1",href:"#child1",tags:["2"],nodes:[{text:"Grandchild 1",href:"#grandchild1",tags:["0"]},{text:"Grandchild 2",href:"#grandchild2",tags:["0"]}]},{text:"Child 2",href:"#child2",tags:["0"]}]},{text:"Parent 2",href:"#parent2",tags:["0"]},{text:"Parent 3",href:"#parent3",tags:["0"]},{text:"Parent 4",href:"#parent4",tags:["0"]},{text:"Parent 5",href:"#parent5",tags:["0"]}],c=[{text:"Parent 1",tags:["2"],nodes:[{text:"Child 1",tags:["2"],nodes:[{text:"Grandchild 1",tags:["0"]},{text:"Grandchild 2",tags:["0"]}]},{text:"Child 2",tags:["3"]}]},{text:"Parent 2",tags:["7"]},{text:"Parent 3",icon:"feather icon-map",href:"#demo",tags:["11"]},{text:"Parent 4",icon:"feather icon-download-cloud",href:"/index.html",tags:["19"],selected:!0},{text:"Parent 5",icon:"feather icon-message-square",color:["#fff"],backColor:"#FDAC41",href:"http://www.pixinvent.com",tags:["0","available"]}];$("#default-treeview").treeview({selectedBackColor:[e],data:t}),$("#collapsed-treeview").treeview({selectedBackColor:[e],levels:1,data:t}),$("#expanded-treeview").treeview({selectedBackColor:[e],levels:99,data:t}),$("#primary-color-treeview").treeview({selectedBackColor:[e],color:["#FF5B5C"],data:t}),$("#custom-icon-treeview").treeview({selectedBackColor:[e],color:[e],expandIcon:"feather icon-chevron-right",collapseIcon:"feather icon-chevron-down",nodeIcon:"feather icon-bookmark",data:t}),$("#tags-badge-treeview").treeview({selectedBackColor:[e],color:[e],expandIcon:"feather icon-stop-circle",collapseIcon:"feather icon-check-square",nodeIcon:"feather icon-user",showTags:!0,data:t}),$("#no-border-treeview").treeview({selectedBackColor:[e],color:[e],showBorder:!1,data:t}),$("#colorful-treeview").treeview({expandIcon:"feather icon-stop-circle",collapseIcon:"feather icon-check-square",nodeIcon:"icon-head",color:["#fff"],backColor:[e],onhoverColor:["#6999f3"],borderColor:[e],showBorder:!1,showTags:!0,highlightSelected:!0,selectedColor:["#fff"],selectedBackColor:["#2c6de9"],data:t}),$("#node-override-treeview").treeview({expandIcon:"feather icon-stop-circle",collapseIcon:"feather icon-check-square",nodeIcon:"icon-head",color:["#FDAC41"],backColor:["#FFEED9"],onhoverColor:["#fed8a6"],borderColor:["#FFEED9"],showBorder:!1,highlightSelected:!0,showTags:!0,selectedColor:["#fff"],selectedBackColor:["#FDAC41"],data:c}),$("#link-enabled-treeview").treeview({selectedBackColor:[e],color:[e],enableLinks:!0,data:t});var a=$("#disabled-treeview").treeview({selectedBackColor:[e],data:t});$("#btn-disable-all").on("click",(function(e){a.treeview("disableAll",{silent:$("#chk-disable-silent").is(":checked")})})),$("#btn-enable-all").on("click",(function(e){a.treeview("enableAll",{silent:$("#chk-disable-silent").is(":checked")})}));$("#data-treeview").treeview({selectedBackColor:[e],color:[e],data:'[{"text": "Parent 1","nodes": [{"text": "Child 1","nodes": [{"text": "Grandchild 1"},{"text": "Grandchild 2"}]},{"text": "Child 2"}]},{"text": "Parent 2"},{"text": "Parent 3"},{"text": "Parent 4"},{"text": "Parent 5"}]'});var o=$("#searchable-tree").treeview({selectedBackColor:[e],color:[e],showBorder:!0,data:t}),r=function(e){var t=$("#input-search").val(),c={ignoreCase:$("#chk-ignore-case").is(":checked"),exactMatch:$("#chk-exact-match").is(":checked"),revealResults:$("#chk-reveal-results").is(":checked")},a=o.treeview("search",[t,c]),r="
"+a.length+" matches found
";$.each(a,(function(e,t){r+="- "+t.text+"
"})),$("#search-output").html(r)};$("#btn-search").on("click",r),$("#input-search").on("keyup",r),$("#btn-clear-search").on("click",(function(e){o.treeview("clearSearch"),$("#input-search").val(""),$("#search-output").html("")}));var l=$("#expandible-tree").treeview({selectedBackColor:[e],data:t});$("#btn-expand-all").on("click",(function(e){$("#select-expand-all-levels").val();l.treeview("expandAll",{levels:2})})),$("#btn-collapse-all").on("click",(function(e){l.treeview("collapseAll")}));var n=$("#checkable-tree").treeview({selectedBackColor:[e],data:t,showIcon:!1,showCheckbox:!0});$("#btn-check-all").on("click",(function(e){n.treeview("checkAll",{silent:$("#chk-check-silent").is(":checked")})})),$("#btn-uncheck-all").on("click",(function(e){n.treeview("uncheckAll",{silent:$("#chk-check-silent").is(":checked")})}))}));