Created
May 20, 2015 14:45
-
-
Save pjanik/318360ecaf43a44301b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="bin-view"></div> | |
<script> | |
var MATERIALS = [ | |
{ | |
category: "Cat A", | |
children: [ | |
{ | |
category: "Cat A1", | |
children: [ | |
{ | |
category: "Cat A11", | |
children: [ | |
{ | |
collections: [ | |
{id: 2}, | |
{id: 2} | |
] | |
} | |
] | |
}, | |
{ | |
category: "Cat A12", | |
children: [ | |
{ | |
collections: [ | |
{id: 3}, | |
{id: 4} | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
category: "Cat A2", | |
children: [ | |
{ | |
category: "Cat A21", | |
children: [ | |
{ | |
collections: [ | |
{id: 3}, | |
{id: 4} | |
] | |
} | |
] | |
}, | |
{ | |
category: "Cat A22", | |
children: [ | |
{ | |
collections: [ | |
{id: 3} | |
] | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
category: "Cat B", | |
children: [ | |
{ | |
category: "Cat B1 (login required)", | |
loginRequired: true, | |
children: [ | |
{ | |
category: "Cat B11", | |
children: [ | |
{ | |
collections: [ | |
{id: 2}, | |
{id: 2} | |
] | |
} | |
] | |
}, | |
{ | |
category: "Cat B12", | |
children: [ | |
{ | |
collections: [ | |
{id: 3}, | |
{id: 4} | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
category: "Cat B2", | |
children: [ | |
{ | |
category: "Cat B21 (login required)", | |
loginRequired: true, | |
children: [ | |
{ | |
collections: [ | |
{id: 3}, | |
{id: 4} | |
] | |
} | |
] | |
}, | |
{ | |
category: "Cat B22", | |
children: [ | |
{ | |
collections: [ | |
{id: 4} | |
] | |
} | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
category: "Cat C", | |
children: [ | |
{ | |
category: "Cat C1", | |
children: [ | |
{ | |
category: "Cat C11", | |
children: [ | |
{ | |
collections: [ | |
{id: 2}, | |
{id: 2} | |
] | |
} | |
] | |
}, | |
{ | |
category: "Cat C12", | |
children: [ | |
{ | |
collections: [ | |
{id: 3}, | |
{id: 4} | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
category: "Cat C2", | |
children: [ | |
{ | |
category: "Cat C21", | |
children: [ | |
{ | |
collections: [ | |
{id: 2}, | |
{id: 2} | |
] | |
} | |
] | |
}, | |
{ | |
category: "Cat C22", | |
children: [ | |
{ | |
collections: [ | |
{id: 4} | |
] | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
]; | |
Portal.renderMaterialsBin(MATERIALS, '#bin-view'); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment