1
0
Fork 0
forked from 0x2620/oxjs

add documentation browser (Ox.DocPanel, demo, more documentation)

This commit is contained in:
rolux 2011-05-07 17:56:29 +02:00
commit 698d57abb0
11 changed files with 1610 additions and 1179 deletions

View file

@ -156,7 +156,7 @@ Ox.TreeList = function(options, self) {
}
function toggleItem(item, expanded) {
var $img, $item, pos;
var $img, pos;
item.expanded = expanded;
$.each(that.$element.find('.OxItem'), function(i, v) {
var $item = $(v);
@ -166,12 +166,23 @@ Ox.TreeList = function(options, self) {
return false;
}
});
Ox.print('i.e', item.expanded)
Ox.print('i.e', item.expanded, $img, $img.attr('src'));
// FIXME: why does this not work??
///*
$img.attr({
src: Ox.UI.getImagePath(
'symbol' + (item.expanded ? 'Down' : 'Right') + '.svg'
)
});
//*/
/*
Ox.print($img.attr('src'))
$img.attr({
src: $img.attr('src') == Ox.UI.getImagePath('symbolDown.svg') ?
Ox.UI.getImagePath('symbolRight.svg') :
Ox.UI.getImagePath('symbolDown.svg')
});
*/
item.expanded ?
that.$element.addItems(pos + 1, parseItems(item.items, item.level + 1)) :
that.$element.removeItems(pos + 1, parseItems(item.items, item.level + 1).length);