diff --git a/source/Ox.Geo/Ox.Geo.js b/source/Ox.Geo/Ox.Geo.js index d79d5b2c..54433479 100644 --- a/source/Ox.Geo/Ox.Geo.js +++ b/source/Ox.Geo/Ox.Geo.js @@ -6,6 +6,8 @@ Ox.load.Geo = function(options, callback) { /*@ Ox.COUNTRIES <[o]> Array of countries + See http://en.wikipedia.org/wiki/List_of_sovereign_states, + http://en.wikipedia.org/wiki/ISO_3166-3 and http://www.imdb.com/country/ area Area of the country in square meters code ISO 3166 country code dependencies <[s]> Array of dependencies of the country (country codes) diff --git a/source/Ox.UI/js/List/Ox.TreeList.js b/source/Ox.UI/js/List/Ox.TreeList.js index f147a08d..71a0e1ba 100644 --- a/source/Ox.UI/js/List/Ox.TreeList.js +++ b/source/Ox.UI/js/List/Ox.TreeList.js @@ -45,11 +45,11 @@ Ox.TreeList = function(options, self) { function clickItem(e) { var $target = $(e.target), $item, id, item; - if ($target.hasClass('OxToggle')) { + if ($target.is('.OxToggle')) { $item = $target.parent().parent(); id = $item.data('id'); item = getItemById(id); - toggleItem(item, !item.expanded) + toggleItem(item, !item.expanded); } } @@ -160,16 +160,16 @@ Ox.TreeList = function(options, self) { function toggleItem(item, expanded) { var $img, pos; item.expanded = expanded; + getItemById(item.id).expanded = expanded; + Ox.print('>>>>', getItemById(item.id)) $.each(that.$element.find('.OxItem'), function(i, v) { var $item = $(v); if ($item.data('id') == item.id) { - $img = $item.find('img'); + $img = $item.find('.OxToggle'); pos = $item.data('position'); return false; } }); - Ox.print('i.e', item.expanded, $img, $img.attr('src')); - // FIXME: why does this not work?? ///* $img.attr({ src: Ox.UI.getImagePath( @@ -177,14 +177,7 @@ Ox.TreeList = function(options, self) { ) }); //*/ - /* - 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') - }); - */ + that.$element.value(item.id, 'expanded', expanded); 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);