oxjs/demos/treelist/js/treelist.js

36 lines
No EOL
1.1 KiB
JavaScript

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'));
});
});