Alien-Web-ExtJS-V3

 view release on metacpan or  search on metacpan

share/docs/source/Ext-more.html  view on Meta::CPAN

<!DOCTYPE html>
<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>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js"><span id='Ext'>/**
</span> * @class Ext
 */

Ext.ns(&quot;Ext.grid&quot;, &quot;Ext.list&quot;, &quot;Ext.dd&quot;, &quot;Ext.tree&quot;, &quot;Ext.form&quot;, &quot;Ext.menu&quot;,
       &quot;Ext.state&quot;, &quot;Ext.layout.boxOverflow&quot;, &quot;Ext.app&quot;, &quot;Ext.ux&quot;, &quot;Ext.chart&quot;, &quot;Ext.direct&quot;, &quot;Ext.slider&quot;);
<span id='Ext-property-ux'>    /**
</span>     * Namespace alloted for extensions to the framework.
     * @property ux
     * @type Object
     */

Ext.apply(Ext, function(){
    var E = Ext,
        idSeed = 0,
        scrollWidth = null;

    return {
<span id='Ext-property-emptyFn'>        /**
</span>        * A reusable empty function
        * @property
        * @type Function
        */
        emptyFn : function(){},

<span id='Ext-property-BLANK_IMAGE_URL'>        /**
</span>         * 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 &quot;http://extjs.com/s.gif&quot; 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:/' + '/www.extjs.com/s.gif' :
                            'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==',

        extendX : function(supr, fn){
            return Ext.extend(supr, fn(supr.prototype));
        },

<span id='Ext-method-getDoc'>        /**
</span>         * Returns the current HTML document object as an {@link Ext.Element}.
         * @return Ext.Element The document
         */
        getDoc : function(){
            return Ext.get(document);
        },

<span id='Ext-method-num'>        /**
</span>         * Utility method for validating that a value is numeric, returning the specified default value if it is not.
         * @param {Mixed} value Should be a number, but any type will be handled appropriately
         * @param {Number} defaultValue The value to return if the original value is non-numeric
         * @return {Number} Value, if numeric, else defaultValue
         */
        num : function(v, defaultValue){
            v = Number(Ext.isEmpty(v) || Ext.isArray(v) || typeof v == 'boolean' || (typeof v == 'string' &amp;&amp; v.trim().length == 0) ? NaN : v);
            return isNaN(v) ? defaultValue : v;
        },

<span id='Ext-method-value'>        /**
</span>         * &lt;p&gt;Utility method for returning a default value if the passed value is empty.&lt;/p&gt;
         * &lt;p&gt;The value is deemed to be empty if it is&lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
         * &lt;li&gt;null&lt;/li&gt;
         * &lt;li&gt;undefined&lt;/li&gt;
         * &lt;li&gt;an empty array&lt;/li&gt;
         * &lt;li&gt;a zero length string (Unless the &lt;tt&gt;allowBlank&lt;/tt&gt; parameter is &lt;tt&gt;true&lt;/tt&gt;)&lt;/li&gt;
         * &lt;/ul&gt;&lt;/div&gt;
         * @param {Mixed} value The value to test
         * @param {Mixed} defaultValue The value to return if the original value is empty
         * @param {Boolean} allowBlank (optional) true to allow zero length strings to qualify as non-empty (defaults to false)
         * @return {Mixed} value, if non-empty, else defaultValue
         */
        value : function(v, defaultValue, allowBlank){
            return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
        },

<span id='Ext-method-escapeRe'>        /**
</span>         * Escapes the passed string for use in a regular expression
         * @param {String} str
         * @return {String}
         */
        escapeRe : function(s) {
            return s.replace(/([-.*+?^${}()|[\]\/\\])/g, &quot;\\$1&quot;);
        },

        sequence : function(o, name, fn, scope){
            o[name] = o[name].createSequence(fn, scope);
        },



( run in 0.551 second using v1.01-cache-2.11-cpan-119454b85a5 )