1
0
Fork 0
forked from 0x2620/oxjs

fix bugs in treelist where the icon would not update, items would not expand, and expanding items would be slow

This commit is contained in:
rlx 2011-10-01 13:06:50 +00:00
commit b3e7945a96
3 changed files with 67 additions and 58 deletions

View file

@ -1,36 +1,38 @@
Ox.load('UI', {debug: true}, function() {
Ox.load({UI: {debug: true}, Geo: {}}, function() {
Ox.load('Geo', function() {
var $treeList = new Ox.TreeList({
data: {'Ox.COUNTRIES': Ox.COUNTRIES}
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});
}
}),
$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'));
});
$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'));
});