-/*!
- * Ext JS Library 3.1.1
- * Copyright(c) 2006-2010 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-/**\r
- * @class Ext.CompositeElementLite\r
- */\r
-Ext.apply(Ext.CompositeElementLite.prototype, { \r
- addElements : function(els, root){\r
- if(!els){\r
- return this;\r
- }\r
- if(typeof els == "string"){\r
- els = Ext.Element.selectorFunction(els, root);\r
- }\r
- var yels = this.elements; \r
- Ext.each(els, function(e) {\r
- yels.push(Ext.get(e));\r
- });\r
- return this;\r
- },\r
- \r
- /**\r
- * Returns the first Element\r
- * @return {Ext.Element}\r
- */\r
- first : function(){\r
- return this.item(0);\r
- }, \r
- \r
- /**\r
- * Returns the last Element\r
- * @return {Ext.Element}\r
- */\r
- last : function(){\r
- return this.item(this.getCount()-1);\r
- },\r
- \r
- /**\r
- * Returns true if this composite contains the passed element\r
- * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.\r
- * @return Boolean\r
- */\r
- contains : function(el){\r
- return this.indexOf(el) != -1;\r
- },
-
- /**\r
- * Removes the specified element(s).\r
- * @param {Mixed} el The id of an element, the Element itself, the index of the element in this composite\r
- * or an array of any of those.\r
- * @param {Boolean} removeDom (optional) True to also remove the element from the document\r
- * @return {CompositeElement} this\r
- */\r
- removeElement : function(keys, removeDom){\r
- var me = this,\r
- els = this.elements, \r
- el; \r
- Ext.each(keys, function(val){\r
- if ((el = (els[val] || els[val = me.indexOf(val)]))) {\r
- if(removeDom){\r
- if(el.dom){\r
- el.remove();\r
- }else{\r
- Ext.removeNode(el);\r
- }\r
- }\r
- els.splice(val, 1); \r
- }\r
- });\r
- return this;\r
- } \r
-});