Skip to content
This repository has been archived by the owner on Dec 21, 2021. It is now read-only.

Commit

Permalink
AUI-1156 - Demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Mak authored and eduardolundgren committed Feb 28, 2014
1 parent 692e107 commit 4183b3c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
17 changes: 17 additions & 0 deletions demos/tree/assets/pages.html
@@ -0,0 +1,17 @@
[
{
"label": "subchild-one",
"leaf": true,
"type": "node"
},
{
"label": "subchild-two",
"leaf": true,
"type": "node"
},
{
"label": "subchild-three",
"leaf": true,
"type": "node"
}
]
35 changes: 33 additions & 2 deletions demos/tree/index.html
Expand Up @@ -21,11 +21,13 @@ <h2>TreeView normal with drag and drop and undraggable elements</h2>
<div class="span4">
<h2>TreeView file with IO</h2>
<div id="treeio"></div>
</div>
<div class="span4">
<h2>TreeViewDD file with IO</h2>
<div id="treeioDD"></div>
</div>
<div class="span4">
<h2>TreeView with Tree Paginator</h2>
<div id="treepaginator"></div>
</div>
</div>
</div>
<script>
Expand Down Expand Up @@ -209,6 +211,35 @@ <h2>TreeViewDD file with IO</h2>
type: 'file'
}).render();

var treeViewPaginator = new Y.TreeView({
boundingBox: '#treepaginator',
}).render();

var rootTreeNodePaginator = new Y.TreeNode(
{
children: [
{
id: 'child-one',
io: 'assets/pages.html',
label: 'child-one',
paginator: {
limit: 3,
offsetParam: 'start',
start: 0,
total: 6
},
type: 'io'
},
{ label: 'child-two' },
{ label: 'child-three' },
{ label: 'child-four' }
],
label: 'root-one',
id: 'root-one'
}
);

treeViewPaginator.appendChild(rootTreeNodePaginator);
});
</script>
</body>
Expand Down

0 comments on commit 4183b3c

Please sign in to comment.