Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git] / docs / source / CompositeElementLite.html
index 7d33457..b977e36 100644 (file)
@@ -3,8 +3,8 @@
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>The source code</title>
-  <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
-  <script type="text/javascript" src="../prettify/prettify.js"></script>
+  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
   <style type="text/css">
     .highlight { display: block; background-color: #ddd; }
   </style>
@@ -19,7 +19,7 @@
 </span> * @class Ext.CompositeElementLite
  * &lt;p&gt;This class encapsulates a &lt;i&gt;collection&lt;/i&gt; of DOM elements, providing methods to filter
  * members, or to perform collective actions upon the whole set.&lt;/p&gt;
- * &lt;p&gt;Although they are not listed, this class supports all of the methods of {@link Ext.core.Element} and
+ * &lt;p&gt;Although they are not listed, this class supports all of the methods of {@link Ext.Element} and
  * {@link Ext.fx.Anim}. The methods from these classes will be performed on all the elements in this collection.&lt;/p&gt;
  * Example:&lt;pre&gt;&lt;code&gt;
 var els = Ext.select(&quot;#some-el div.some-class&quot;);
@@ -57,12 +57,11 @@ Ext.override(Ext.CompositeElementLite, {
         return this.add(r);
     }
 });&lt;/pre&gt;&lt;/code&gt;
-     * @type Array
-     * @property elements
+     * @property {HTMLElement} elements
      */
     this.elements = [];
     this.add(els, root);
-    this.el = new Ext.core.Element.Flyweight();
+    this.el = new Ext.Element.Flyweight();
 };
 
 Ext.CompositeElementLite.prototype = {
@@ -91,8 +90,8 @@ Ext.CompositeElementLite.prototype = {
     },
 <span id='Ext-CompositeElementLite-method-add'>    /**
 </span>     * 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.
-     * @return {CompositeElement} This Composite object.
+     * @param {HTMLElement[]/Ext.CompositeElement} els Either an Array of DOM elements to add, or another Composite object who's elements should be added.
+     * @return {Ext.CompositeElement} This Composite object.
      */
     add : function(els, root){
         var me = this,
@@ -101,7 +100,7 @@ Ext.CompositeElementLite.prototype = {
             return this;
         }
         if(typeof els == &quot;string&quot;){
-            els = Ext.core.Element.selectorFunction(els, root);
+            els = Ext.Element.selectorFunction(els, root);
         }else if(els.isComposite){
             els = els.elements;
         }else if(!Ext.isIterable(els)){
@@ -124,7 +123,7 @@ Ext.CompositeElementLite.prototype = {
         for(i = 0; i &lt; len; i++) {
             e = els[i];
             if(e){
-                Ext.core.Element.prototype[fn].apply(me.getElement(e), args);
+                Ext.Element.prototype[fn].apply(me.getElement(e), args);
             }
         }
         return me;
@@ -132,7 +131,7 @@ Ext.CompositeElementLite.prototype = {
 <span id='Ext-CompositeElementLite-method-item'>    /**
 </span>     * Returns a flyweight Element of the dom element object at the specified index
      * @param {Number} index
-     * @return {Ext.core.Element}
+     * @return {Ext.Element}
      */
     item : function(index){
         var me = this,
@@ -163,13 +162,13 @@ Ext.CompositeElementLite.prototype = {
 </span>     * &lt;p&gt;Calls the passed function for each element in this composite.&lt;/p&gt;
      * @param {Function} fn The function to call. The function is passed the following parameters:&lt;ul&gt;
      * &lt;li&gt;&lt;b&gt;el&lt;/b&gt; : Element&lt;div class=&quot;sub-desc&quot;&gt;The current Element in the iteration.
-     * &lt;b&gt;This is the flyweight (shared) Ext.core.Element instance, so if you require a
+     * &lt;b&gt;This is the flyweight (shared) Ext.Element instance, so if you require a
      * a reference to the dom node, use el.dom.&lt;/b&gt;&lt;/div&gt;&lt;/li&gt;
      * &lt;li&gt;&lt;b&gt;c&lt;/b&gt; : Composite&lt;div class=&quot;sub-desc&quot;&gt;This Composite object.&lt;/div&gt;&lt;/li&gt;
      * &lt;li&gt;&lt;b&gt;idx&lt;/b&gt; : Number&lt;div class=&quot;sub-desc&quot;&gt;The zero-based index in the iteration.&lt;/div&gt;&lt;/li&gt;
      * &lt;/ul&gt;
-     * @param {Object} scope (optional) The scope (&lt;i&gt;this&lt;/i&gt; reference) in which the function is executed. (defaults to the Element)
-     * @return {CompositeElement} this
+     * @param {Object} [scope] The scope (&lt;i&gt;this&lt;/i&gt; reference) in which the function is executed. (defaults to the Element)
+     * @return {Ext.CompositeElement} this
      */
     each : function(fn, scope){
         var me = this,
@@ -191,8 +190,8 @@ Ext.CompositeElementLite.prototype = {
 
 <span id='Ext-CompositeElementLite-method-fill'>    /**
 </span>    * 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.
-    * @return {CompositeElement} this
+    * @param {HTMLElement[]/Ext.CompositeElement} els Either an array of DOM elements, or another Composite from which to fill this Composite.
+    * @return {Ext.CompositeElement} this
     */
     fill : function(els){
         var me = this;
@@ -205,10 +204,10 @@ Ext.CompositeElementLite.prototype = {
 </span>     * Filters this composite to only elements that match the passed selector.
      * @param {String/Function} selector A string CSS selector or a comparison function.
      * The comparison function will be called with the following arguments:&lt;ul&gt;
-     * &lt;li&gt;&lt;code&gt;el&lt;/code&gt; : Ext.core.Element&lt;div class=&quot;sub-desc&quot;&gt;The current DOM element.&lt;/div&gt;&lt;/li&gt;
+     * &lt;li&gt;&lt;code&gt;el&lt;/code&gt; : Ext.Element&lt;div class=&quot;sub-desc&quot;&gt;The current DOM element.&lt;/div&gt;&lt;/li&gt;
      * &lt;li&gt;&lt;code&gt;index&lt;/code&gt; : Number&lt;div class=&quot;sub-desc&quot;&gt;The current index within the collection.&lt;/div&gt;&lt;/li&gt;
      * &lt;/ul&gt;
-     * @return {CompositeElement} this
+     * @return {Ext.CompositeElement} this
      */
     filter : function(selector){
         var els = [],
@@ -223,15 +222,15 @@ Ext.CompositeElementLite.prototype = {
                 els[els.length] = me.transformElement(el);
             }
         });
-        
+
         me.elements = els;
         return me;
     },
 
 <span id='Ext-CompositeElementLite-method-indexOf'>    /**
 </span>     * Find the index of the passed element within the composite collection.
-     * @param el {Mixed} The id of an element, or an Ext.core.Element, or an HtmlElement to find within the composite collection.
-     * @return Number The index of the passed Ext.core.Element in the composite collection, or -1 if not found.
+     * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.
+     * @return Number The index of the passed Ext.Element in the composite collection, or -1 if not found.
      */
     indexOf : function(el){
         return Ext.Array.indexOf(this.elements, this.transformElement(el));
@@ -239,11 +238,11 @@ Ext.CompositeElementLite.prototype = {
 
 <span id='Ext-CompositeElementLite-method-replaceElement'>    /**
 </span>    * 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 {String/HTMLElement/Ext.Element/Number} el The id of an element, the Element itself, the index of the element in this composite
     * to replace.
-    * @param {Mixed} replacement The id of an element or the Element itself.
+    * @param {String/Ext.Element} 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
+    * @return {Ext.CompositeElement} this
     */
     replaceElement : function(el, replacement, domReplace){
         var index = !isNaN(el) ? el : this.indexOf(el),
@@ -272,13 +271,13 @@ Ext.CompositeElementLite.prototype.on = Ext.CompositeElementLite.prototype.addLi
 
 <span id='Ext-CompositeElementLite-method-importElementMethods'>/**
 </span> * @private
- * Copies all of the functions from Ext.core.Element's prototype onto CompositeElementLite's prototype.
- * This is called twice - once immediately below, and once again after additional Ext.core.Element
+ * 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.core.Element.prototype,
+        ElProto = Ext.Element.prototype,
         CelProto = Ext.CompositeElementLite.prototype;
 
     for (fnName in ElProto) {
@@ -296,29 +295,29 @@ Ext.CompositeElementLite.importElementMethods = function() {
 Ext.CompositeElementLite.importElementMethods();
 
 if(Ext.DomQuery){
-    Ext.core.Element.selectorFunction = Ext.DomQuery.select;
+    Ext.Element.selectorFunction = Ext.DomQuery.select;
 }
 
-<span id='Ext-core-Element-method-select'>/**
-</span> * Selects elements based on the passed CSS selector to enable {@link Ext.core.Element Element} methods
+<span id='Ext-Element-method-select'>/**
+</span> * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
  * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
  * {@link Ext.CompositeElementLite CompositeElementLite} object.
- * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {String/HTMLElement[]} selector The CSS selector or an array of elements
  * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
- * @return {CompositeElementLite/CompositeElement}
- * @member Ext.core.Element
+ * @return {Ext.CompositeElementLite/Ext.CompositeElement}
+ * @member Ext.Element
  * @method select
  */
-Ext.core.Element.select = function(selector, root){
+Ext.Element.select = function(selector, root){
     var els;
     if(typeof selector == &quot;string&quot;){
-        els = Ext.core.Element.selectorFunction(selector, root);
+        els = Ext.Element.selectorFunction(selector, root);
     }else if(selector.length !== undefined){
         els = selector;
     }else{
         //&lt;debug&gt;
         Ext.Error.raise({
-            sourceClass: &quot;Ext.core.Element&quot;,
+            sourceClass: &quot;Ext.Element&quot;,
             sourceMethod: &quot;select&quot;,
             selector: selector,
             root: root,
@@ -329,16 +328,16 @@ Ext.core.Element.select = function(selector, root){
     return new Ext.CompositeElementLite(els);
 };
 <span id='Ext-method-select'>/**
-</span> * Selects elements based on the passed CSS selector to enable {@link Ext.core.Element Element} methods
+</span> * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods
  * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or
  * {@link Ext.CompositeElementLite CompositeElementLite} object.
- * @param {String/Array} selector The CSS selector or an array of elements
+ * @param {String/HTMLElement[]} selector The CSS selector or an array of elements
  * @param {HTMLElement/String} root (optional) The root element of the query or id of the root
- * @return {CompositeElementLite/CompositeElement}
+ * @return {Ext.CompositeElementLite/Ext.CompositeElement}
  * @member Ext
  * @method select
  */
-Ext.select = Ext.core.Element.select;
+Ext.select = Ext.Element.select;
 </pre>
 </body>
 </html>