2011-10-01 13:06:50 +00:00
|
|
|
Ox.load({UI: {debug: true}, Geo: {}}, function() {
|
2011-09-05 05:40:44 +00:00
|
|
|
|
2011-10-01 13:06:50 +00:00
|
|
|
var $treeList = new Ox.TreeList({
|
|
|
|
data: {'Ox.COUNTRIES': Ox.COUNTRIES},
|
|
|
|
width: 256 - Ox.UI.SCROLLBAR_SIZE
|
|
|
|
})
|
|
|
|
.bindEvent({
|
|
|
|
resize: function(data) {
|
|
|
|
$treeList.options({width: data.width - Ox.UI.SCROLLBAR_SIZE});
|
|
|
|
}
|
2011-09-05 05:40:44 +00:00
|
|
|
}),
|
2011-10-01 13:06:50 +00:00
|
|
|
$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'));
|
2011-09-05 05:40:44 +00:00
|
|
|
|
|
|
|
});
|