63 lines
1.2 KiB
Plaintext
63 lines
1.2 KiB
Plaintext
@{
|
|
ViewData["Title"] = "Home Page";
|
|
}
|
|
<div id="tree"></div>
|
|
<div>
|
|
<a href="Users">Users</a>
|
|
</div>
|
|
<div>
|
|
<a href="Accounts">Accounts</a>
|
|
</div>
|
|
<div>
|
|
<a href="Channels">Channels</a>
|
|
</div>
|
|
<div>
|
|
<a href="Behaviors">Behaviors</a>
|
|
</div>
|
|
|
|
<div id="tree"></div>
|
|
|
|
|
|
@section Scripts{
|
|
<script type="text/javascript">
|
|
function getTree() {
|
|
// Some logic to retrieve, or generate tree structure
|
|
var tree = [
|
|
{
|
|
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"
|
|
}
|
|
];
|
|
return tree;
|
|
}
|
|
|
|
$('#tree').bstreeview({data: getTree()});
|
|
</script>
|
|
} |