3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
\r
4 <title>The source code</title>
\r
5 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
\r
6 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
\r
8 <body onload="prettyPrint();">
\r
9 <pre class="prettyprint lang-js">/**
\r
10 * @class Ext.CompositeElementLite
\r
12 Ext.apply(Ext.CompositeElementLite.prototype, {
\r
13 addElements : function(els, root){
\r
17 if(typeof els == "string"){
\r
18 els = Ext.Element.selectorFunction(els, root);
\r
20 var yels = this.elements;
\r
21 Ext.each(els, function(e) {
\r
22 yels.push(Ext.get(e));
\r
27 <div id="method-Ext.CompositeElementLite-first"></div>/**
\r
28 * Returns the first Element
\r
29 * @return {Ext.Element}
\r
32 return this.item(0);
\r
35 <div id="method-Ext.CompositeElementLite-last"></div>/**
\r
36 * Returns the last Element
\r
37 * @return {Ext.Element}
\r
40 return this.item(this.getCount()-1);
\r
43 <div id="method-Ext.CompositeElementLite-contains"></div>/**
\r
44 * Returns true if this composite contains the passed element
\r
45 * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
\r
48 contains : function(el){
\r
49 return this.indexOf(el) != -1;
\r
52 <div id="method-Ext.CompositeElementLite-removeElement"></div>/**
\r
53 * Removes the specified element(s).
\r
54 * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite
\r
55 * or an array of any of those.
\r
56 * @param {Boolean} removeDom (optional) True to also remove the element from the document
\r
57 * @return {CompositeElement} this
\r
59 removeElement : function(keys, removeDom){
\r
61 els = this.elements,
\r
63 Ext.each(keys, function(val){
\r
64 if ((el = (els[val] || els[val = me.indexOf(val)]))) {
\r
72 els.splice(val, 1);
\r