* Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
* Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
/**
* Adds elements to this Composite object.
* @param {Mixed} els Either an Array of DOM elements to add, or another Composite object who's elements should be added.
/**
* Adds elements to this Composite object.
* @param {Mixed} els Either an Array of DOM elements to add, or another Composite object who's elements should be added.
els = Ext.Element.selectorFunction(els, root);
}else if(els.isComposite){
els = els.elements;
}else if(!Ext.isIterable(els)){
els = [els];
}
els = Ext.Element.selectorFunction(els, root);
}else if(els.isComposite){
els = els.elements;
}else if(!Ext.isIterable(els)){
els = [els];
}
for(var i = 0, len = els.length; i < len; ++i){
elements.push(me.transformElement(els[i]));
}
return me;
},
for(var i = 0, len = els.length; i < len; ++i){
elements.push(me.transformElement(els[i]));
}
return me;
},
* @param {Object} scope (optional) The scope (<i>this</i> reference) in which the function is executed. (defaults to the Element)
* @return {CompositeElement} this
*/
* @param {Object} scope (optional) The scope (<i>this</i> reference) in which the function is executed. (defaults to the Element)
* @return {CompositeElement} this
*/
/**
* Clears this Composite and adds the elements passed.
* @param {Mixed} els Either an array of DOM elements, or another Composite from which to fill this Composite.
/**
* Clears this Composite and adds the elements passed.
* @param {Mixed} els Either an array of DOM elements, or another Composite from which to fill this Composite.
/**
* Filters this composite to only elements that match the passed selector.
* @param {String/Function} selector A string CSS selector or a comparison function.
/**
* Filters this composite to only elements that match the passed selector.
* @param {String/Function} selector A string CSS selector or a comparison function.
me.each(function(el, self, i){
if(fn(el, i) !== false){
els[els.length] = me.transformElement(el);
me.each(function(el, self, i){
if(fn(el, i) !== false){
els[els.length] = me.transformElement(el);
/**
* Find the index of the passed element within the composite collection.
* @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
/**
* Find the index of the passed element within the composite collection.
* @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
/**
* Replaces the specified element with the passed element.
* @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
/**
* Replaces the specified element with the passed element.
* @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
* @param {Mixed} replacement The id of an element or the Element itself.
* @param {Boolean} domReplace (Optional) True to remove and replace the element in the document too.
* @return {CompositeElement} this
* @param {Mixed} replacement The id of an element or the Element itself.
* @param {Boolean} domReplace (Optional) True to remove and replace the element in the document too.
* @return {CompositeElement} this
replaceElement : function(el, replacement, domReplace){
var index = !isNaN(el) ? el : this.indexOf(el),
d;
replaceElement : function(el, replacement, domReplace){
var index = !isNaN(el) ? el : this.indexOf(el),
d;
var fnName,
ElProto = Ext.Element.prototype,
CelProto = Ext.CompositeElementLite.prototype;
var fnName,
ElProto = Ext.Element.prototype,
CelProto = Ext.CompositeElementLite.prototype;
CelProto[fnName] = CelProto[fnName] || function(){
return this.invoke(fnName, arguments);
};
}).call(CelProto, fnName);
CelProto[fnName] = CelProto[fnName] || function(){
return this.invoke(fnName, arguments);
};
}).call(CelProto, fnName);