From 11d46c4d17501c3d11a571cb06aab96195bb4f55 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Tue, 23 Aug 2011 19:08:08 +0000 Subject: [PATCH] make .appendTo() work --- source/Ox.UI/js/Core/Ox.Element.js | 1 + source/Ox.UI/js/Core/Ox.JQueryElement.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/source/Ox.UI/js/Core/Ox.Element.js b/source/Ox.UI/js/Core/Ox.Element.js index 02c13962..78a567f5 100644 --- a/source/Ox.UI/js/Core/Ox.Element.js +++ b/source/Ox.UI/js/Core/Ox.Element.js @@ -70,6 +70,7 @@ Ox.Element = function(options, self) { }; } // create event handler + // (this can be passed as part of self) if (!self.$eventHandler) { self.$eventHandler = $('
'); } diff --git a/source/Ox.UI/js/Core/Ox.JQueryElement.js b/source/Ox.UI/js/Core/Ox.JQueryElement.js index 9c2372fe..fe53b8c3 100644 --- a/source/Ox.UI/js/Core/Ox.JQueryElement.js +++ b/source/Ox.UI/js/Core/Ox.JQueryElement.js @@ -21,6 +21,10 @@ Ox.JQueryElement = function($element) { that.$element = $element.data({ oxid: that.id }); + // FIXME: the following two lines should make it possible to do + // $('
').appendTo($element) ... check if it works, then replace all + that[0] = that.$element[0]; + that.length = 1; Ox.UI.elements[that.id] = that; return that; };