X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/530ef4b6c5b943cfa68b779d11cf7de29aa878bf..6b044c28b5f26fb99c86c237ffad19741c0f7f3d:/docs/source/CompositeElementLite.html?ds=sidebyside diff --git a/docs/source/CompositeElementLite.html b/docs/source/CompositeElementLite.html index 4c504bfc..7d95f8cb 100644 --- a/docs/source/CompositeElementLite.html +++ b/docs/source/CompositeElementLite.html @@ -7,10 +7,10 @@
/*! - * Ext JS Library 3.2.1 - * Copyright(c) 2006-2010 Ext JS, Inc. - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ /** * @class Ext.CompositeElementLite @@ -210,18 +210,17 @@ Ext.CompositeElementLite.prototype = { filter : function(selector){ var els = [], me = this, - elements = me.elements, fn = Ext.isFunction(selector) ? selector : function(el){ return el.is(selector); }; - - me.each(function(el, self, i){ - if(fn(el, i) !== false){ + me.each(function(el, self, i) { + if (fn(el, i) !== false) { els[els.length] = me.transformElement(el); } }); + me.elements = els; return me; }, @@ -268,22 +267,30 @@ Ext.CompositeElementLite.prototype = { Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addListener; -(function(){ -var fnName, - ElProto = Ext.Element.prototype, - CelProto = Ext.CompositeElementLite.prototype; +/** + * @private + * Copies all of the functions from Ext.Element's prototype onto CompositeElementLite's prototype. + * This is called twice - once immediately below, and once again after additional Ext.Element + * are added in Ext JS + */ +Ext.CompositeElementLite.importElementMethods = function() { + var fnName, + ElProto = Ext.Element.prototype, + CelProto = Ext.CompositeElementLite.prototype; -for(fnName in ElProto){ - if(Ext.isFunction(ElProto[fnName])){ - (function(fnName){ - CelProto[fnName] = CelProto[fnName] || function(){ - return this.invoke(fnName, arguments); - }; - }).call(CelProto, fnName); + for (fnName in ElProto) { + if (typeof ElProto[fnName] == 'function'){ + (function(fnName) { + CelProto[fnName] = CelProto[fnName] || function() { + return this.invoke(fnName, arguments); + }; + }).call(CelProto, fnName); + } } -} -})(); +}; + +Ext.CompositeElementLite.importElementMethods(); if(Ext.DomQuery){ Ext.Element.selectorFunction = Ext.DomQuery.select;