diff --git a/source/Ox.UI/js/Code/Ox.DocPanel.js b/source/Ox.UI/js/Code/Ox.DocPanel.js index 59884908..3585d29f 100644 --- a/source/Ox.UI/js/Code/Ox.DocPanel.js +++ b/source/Ox.UI/js/Code/Ox.DocPanel.js @@ -47,7 +47,7 @@ Ox.DocPanel = function(options, self) { .options(options || {}); self.$list = Ox.Element(); - self.$page = Ox.Element().append(self.options.element); + self.$page = Ox.Element(); that.setElement( self.$panel = Ox.SplitPanel({ @@ -174,6 +174,8 @@ Ox.DocPanel = function(options, self) { that.$element.replaceElement(1, self.$page); that.triggerEvent('select', {id: self.options.selected}); } + } else { + self.$page.empty().append(self.options.element); } } diff --git a/source/Ox.UI/js/Code/Ox.ExamplePanel.js b/source/Ox.UI/js/Code/Ox.ExamplePanel.js index 213f5d6f..961e1ea4 100644 --- a/source/Ox.UI/js/Code/Ox.ExamplePanel.js +++ b/source/Ox.UI/js/Code/Ox.ExamplePanel.js @@ -17,7 +17,7 @@ Ox.ExamplePanel = function(options, self) { .options(options || {}) self.$list = Ox.Element(); - self.$page = Ox.Element().append(self.options.element); + self.$page = Ox.Element(); that.setElement( self.$panel = Ox.SplitPanel({ @@ -63,6 +63,7 @@ Ox.ExamplePanel = function(options, self) { } }); self.$panel.replaceElement(0, self.$list); + selectItem(self.options.selected); that.triggerEvent('load', {}); }); @@ -108,7 +109,7 @@ Ox.ExamplePanel = function(options, self) { }) ); } else { - self.$page.empty() + self.$page.empty().append(self.options.element); } self.options.selected = id; that.triggerEvent('select', {id: id}); @@ -116,7 +117,6 @@ Ox.ExamplePanel = function(options, self) { self.setOption = function(key, value) { if (key == 'selected') { - Ox.print('SETTING LIST SELECTED TO', [value]) self.$list.options({selected: [value]}); } };