Alien-Web-ExtJS-V3
view release on metacpan or search on metacpan
share/docs/source/Ext-more.html view on Meta::CPAN
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("Ext.grid", "Ext.list", "Ext.dd", "Ext.tree", "Ext.form", "Ext.menu",
"Ext.state", "Ext.layout.boxOverflow", "Ext.app", "Ext.ux", "Ext.chart", "Ext.direct", "Ext.slider");
<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 "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:/' + '/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' && v.trim().length == 0) ? NaN : v);
return isNaN(v) ? defaultValue : v;
},
<span id='Ext-method-value'> /**
</span> * <p>Utility method for returning a default value if the passed value is empty.</p>
* <p>The value is deemed to be empty if it is<div class="mdetail-params"><ul>
* <li>null</li>
* <li>undefined</li>
* <li>an empty array</li>
* <li>a zero length string (Unless the <tt>allowBlank</tt> parameter is <tt>true</tt>)</li>
* </ul></div>
* @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, "\\$1");
},
sequence : function(o, name, fn, scope){
o[name] = o[name].createSequence(fn, scope);
},
<span id='Ext-method-addBehaviors'> /**
</span> * Applies event listeners to elements by selectors when the document is ready.
* The event name is specified with an <tt>&#64;</tt> suffix.
* <pre><code>
Ext.addBehaviors({
// add a listener for click on all anchors in element with id foo
'#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>
* @param {Object} obj The list of behaviors to apply
*/
addBehaviors : function(o){
if(!Ext.isReady){
Ext.onReady(function(){
Ext.addBehaviors(o);
});
} else {
var cache = {}, // simple cache for applying multiple behaviors to same selector does query multiple times
parts,
b,
s;
( run in 0.711 second using v1.01-cache-2.11-cpan-787462296c9 )