From ea4df1e4823afea247340210aa3a88db104fc996 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Mon, 22 Sep 2014 16:57:12 +0200 Subject: [PATCH] remove Ox.JQueryElement --- source/Ox.UI/js/Core/JQueryElement.js | 32 --------------------------- 1 file changed, 32 deletions(-) delete mode 100644 source/Ox.UI/js/Core/JQueryElement.js diff --git a/source/Ox.UI/js/Core/JQueryElement.js b/source/Ox.UI/js/Core/JQueryElement.js deleted file mode 100644 index ac7c3477..00000000 --- a/source/Ox.UI/js/Core/JQueryElement.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -/*@ -Ox.JQueryElement Wrapper for jQuery - $element jQuery DOM Element - ($element) -> Wrapped jQuery DOM element -@*/ -Ox.JQueryElement = function($element) { - //@ id Unique id - this.oxid = Ox.uid(); - //@ $element The jQuery-wrapped DOM element - this.$element = $element.data({oxid: this.oxid}); - //@ 0 The DOM element (for compatibility with jQuery) - this[0] = this.$element[0]; - //@ length 1 (for compatibility with jQuery) - this.length = 1; - Ox.UI.elements[this.oxid] = this; - return this; -}; - -// add all jQuery methods to the prototype of Ox.JQueryElement -Ox.methods($('
'), true).forEach(function(method) { - Ox.JQueryElement.prototype[method] = function() { - var $element = this.$element[method].apply(this.$element, arguments), - oxid; - // if exactly one $element of an Ox object was returned, then return the - // Ox object instead, so that we can do oxObj.jqFn().oxFn() - return $element && $element.jquery && $element.length == 1 - && Ox.UI.elements[oxid = $element.data('oxid')] - ? Ox.UI.elements[oxid] : $element; - }; -});