Upgrade to ExtJS 3.3.1 - Released 11/30/2010
[extjs.git] / docs / source / Ext-more.html
index 4f21c01..8545671 100644 (file)
@@ -1,12 +1,18 @@
-<html>\r
-<head>\r
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    \r
-  <title>The source code</title>\r
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body  onload="prettyPrint();">\r
-    <pre class="prettyprint lang-js"><div id="cls-Ext"></div>/**
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
+  <title>The source code</title>
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body  onload="prettyPrint();">
+    <pre class="prettyprint lang-js">/*!
+ * Ext JS Library 3.3.1
+ * Copyright(c) 2006-2010 Sencha Inc.
+ * licensing@sencha.com
+ * http://www.sencha.com/license
+ */
+/**
  * @class Ext
  */
 
@@ -19,7 +25,7 @@ Ext.ns("Ext.grid", "Ext.list", "Ext.dd", "Ext.tree", "Ext.form", "Ext.menu",
      */
 
 Ext.apply(Ext, function(){
-    var E = Ext, 
+    var E = Ext,
         idSeed = 0,
         scrollWidth = null;
 
@@ -32,13 +38,13 @@ Ext.apply(Ext, function(){
         emptyFn : function(){},
 
         <div id="prop-Ext-BLANK_IMAGE_URL"></div>/**
-         * URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. 
+         * URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images.
          * In older versions of IE, this defaults to "http://extjs.com/s.gif" and you should change this to a URL on your server.
          * For other browsers it uses an inline data URL.
          * @type String
          */
         BLANK_IMAGE_URL : Ext.isIE6 || Ext.isIE7 || Ext.isAir ?
-                            'http:/' + '/extjs.com/s.gif' :
+                            'http:/' + '/www.extjs.com/s.gif' :
                             'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',
 
         extendX : function(supr, fn){
@@ -60,7 +66,7 @@ Ext.apply(Ext, function(){
          * @return {Number} Value, if numeric, else defaultValue
          */
         num : function(v, defaultValue){
-            v = Number(Ext.isEmpty(v) || Ext.isArray(v) || Ext.isBoolean(v) || (Ext.isString(v) && v.trim().length == 0) ? NaN : v);
+            v = Number(Ext.isEmpty(v) || Ext.isArray(v) || typeof v == 'boolean' || (typeof v == 'string' && v.trim().length == 0) ? NaN : v);
             return isNaN(v) ? defaultValue : v;
         },
 
@@ -103,13 +109,13 @@ Ext.addBehaviors({
     '#foo a&#64;click' : function(e, t){
         // do something
     },
-    
+
     // add the same listener to multiple selectors (separated by comma BEFORE the &#64;)
     '#foo a, #bar span.some-class&#64;mouseover' : function(){
         // do something
     }
 });
-         * </code></pre> 
+         * </code></pre>
          * @param {Object} obj The list of behaviors to apply
          */
         addBehaviors : function(o){
@@ -134,7 +140,7 @@ Ext.addBehaviors({
                 cache = null;
             }
         },
-        
+
         <div id="method-Ext-getScrollBarWidth"></div>/**
          * Utility method for getting the width of the browser scrollbar. This can differ depending on
          * operating system settings, such as the theme or font size.
@@ -145,7 +151,7 @@ Ext.addBehaviors({
             if(!Ext.isReady){
                 return 0;
             }
-            
+
             if(force === true || scrollWidth === null){
                     // Append our div, do our calculation and then remove it
                 var div = Ext.getBody().createChild('<div class="x-hide-offsets" style="width:100px;height:50px;overflow:hidden;"><div style="height:200px;"></div></div>'),
@@ -187,15 +193,15 @@ ImageComponent = Ext.extend(Ext.BoxComponent, {
         this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height');
     }
 });
-         * </code></pre> 
-         * @param {Object} The destination object.
-         * @param {Object} The source object.
-         * @param {Array/String} Either an Array of property names, or a comma-delimited list
+         * </code></pre>
+         * @param {Object} dest The destination object.
+         * @param {Object} source The source object.
+         * @param {Array/String} names Either an Array of property names, or a comma-delimited list
          * of property names to copy.
          * @return {Object} The modified object.
         */
         copyTo : function(dest, source, names){
-            if(Ext.isString(names)){
+            if(typeof names == 'string'){
                 names = names.split(/[,;\s]/);
             }
             Ext.each(names, function(name){
@@ -221,11 +227,11 @@ ImageComponent = Ext.extend(Ext.BoxComponent, {
                 if(arg){
                     if(Ext.isArray(arg)){
                         this.destroy.apply(this, arg);
-                    }else if(Ext.isFunction(arg.destroy)){
+                    }else if(typeof arg.destroy == 'function'){
                         arg.destroy();
                     }else if(arg.dom){
                         arg.remove();
-                    }    
+                    }
                 }
             }, this);
         },
@@ -352,8 +358,8 @@ ImageComponent = Ext.extend(Ext.BoxComponent, {
 
         <div id="method-Ext-partition"></div>/**
          * Partitions the set into two sets: a true set and a false set.
-         * Example: 
-         * Example2: 
+         * Example:
+         * Example2:
          * <pre><code>
 // Example 1:
 Ext.partition([true, false, true, true, false]); // [[true, true, true], [false, false]]
@@ -390,14 +396,14 @@ Ext.invoke(Ext.query("p"), "getAttribute", "id");
          * </code></pre>
          * @param {Array|NodeList} arr The Array of items to invoke the method on.
          * @param {String} methodName The method name to invoke.
-         * @param {Anything} ... Arguments to send into the method invocation.
+         * @param {...*} args Arguments to send into the method invocation.
          * @return {Array} The results of invoking the method on each item in the array.
          */
         invoke : function(arr, methodName){
             var ret = [],
                 args = Array.prototype.slice.call(arguments, 2);
             Ext.each(arr, function(v,i) {
-                if (v && Ext.isFunction(v[methodName])) {
+                if (v && typeof v[methodName] == 'function') {
                     ret.push(v[methodName].apply(v, args));
                 } else {
                     ret.push(undefined);
@@ -444,7 +450,7 @@ Ext.zip(
          * @return {Array} The zipped set.
          */
         zip : function(){
-            var parts = Ext.partition(arguments, function( val ){ return !Ext.isFunction(val); }),
+            var parts = Ext.partition(arguments, function( val ){ return typeof val != 'function'; }),
                 arrs = parts[0],
                 fn = parts[1][0],
                 len = Ext.max(Ext.pluck(arrs, "length")),
@@ -521,7 +527,7 @@ Ext.zip(
                     case RegExp: return 'regexp';
                     case Date: return 'date';
                 }
-                if(Ext.isNumber(o.length) && Ext.isFunction(o.item)) {
+                if(typeof o.length == 'number' && typeof o.item == 'function') {
                     return 'nodelist';
                 }
             }
@@ -534,7 +540,7 @@ Ext.zip(
 
         // internal
         callback : function(cb, scope, args, delay){
-            if(Ext.isFunction(cb)){
+            if(typeof cb == 'function'){
                 if(delay){
                     cb.defer(delay, scope, args || []);
                 }else{
@@ -545,7 +551,7 @@ Ext.zip(
     };
 }());
 
-<div id="cls-Function"></div>/**
+/**
  * @class Function
  * These functions are available on every Function object (any JavaScript function).
  */
@@ -574,7 +580,7 @@ sayGoodbye('Fred'); // both alerts show
      */
     createSequence : function(fcn, scope){
         var method = this;
-        return !Ext.isFunction(fcn) ?
+        return (typeof fcn != 'function') ?
                 this :
                 function(){
                     var retval = method.apply(this || window, arguments);
@@ -585,7 +591,7 @@ sayGoodbye('Fred'); // both alerts show
 });
 
 
-<div id="cls-String"></div>/**
+/**
  * @class String
  * These functions are available as static methods on the JavaScript String object.
  */
@@ -688,6 +694,6 @@ Ext.applyIf(Number.prototype, {
         return Math.min(Math.max(this, min), max);
     }
 });
-</pre>    \r
-</body>\r
+</pre>    
+</body>
 </html>
\ No newline at end of file