oxjs/demos/treelist/js/treelist.js

36 lines
1.1 KiB
JavaScript
Raw Normal View History

Ox.load('UI', {debug: true}, function() {
Ox.load('Geo', function() {
var $treeList = new Ox.TreeList({
data: {'Ox.COUNTRIES': Ox.COUNTRIES}
}),
$debug = new Ox.Element('div'),
$button = new Ox.Button({
title: 'Debug'
})
.bindEvent({
click: function() {
$text.html(JSON.stringify($treeList.$element.options('items')))
}
})
.appendTo($debug),
$text = new Ox.Element('div').appendTo($debug),
$splitPanel = new Ox.SplitPanel({
elements: [
{
element: $treeList,
size: 256,
resizable: true,
resize: [128, 256, 384]
},
{
element: $debug
}
],
orientation: 'horizontal'
}).appendTo($('body'));
});
});