diff --git a/source/Ox.UI/js/Code/DocPanel.js b/source/Ox.UI/js/Code/DocPanel.js index 9fcd7f4e..01140a9d 100644 --- a/source/Ox.UI/js/Code/DocPanel.js +++ b/source/Ox.UI/js/Code/DocPanel.js @@ -275,7 +275,8 @@ Ox.DocPanel = function(options, self) { .bindEvent({ select: function(data) { selectItem( - data.ids.length ? Ox.last(data.ids[0].split('/')) : '' + data.ids.length ? Ox.last(data.ids[0].split('/')) : '', + true ); } }); @@ -309,7 +310,7 @@ Ox.DocPanel = function(options, self) { }); } - function selectItem(id) { + function selectItem(id, fromList) { var item = id ? getItemByName(id) : null; if (item) { self.options.selected = id; @@ -333,7 +334,7 @@ Ox.DocPanel = function(options, self) { that.$element.replaceElement(1, self.$page); } else { self.options.selected = ''; - self.$list.options({selected: []}); + !fromList && self.$list.options({selected: []}); self.$page.empty().append(self.options.element); } that.triggerEvent('select', {id: self.options.selected});