/*!
- * Ext JS Library 3.1.1
- * Copyright(c) 2006-2010 Ext JS, LLC
+ * Ext JS Library 3.2.1
+ * Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
*/
-
// for old browsers
window.undefined = window.undefined;
* The version of the framework
* @type String
*/
- version : '3.1.1'
+ version : '3.2.1',
+ versionDetail : {
+ major: 3,
+ minor: 2,
+ patch: 1
+ }
};
/**
var oc = Object.prototype.constructor;
return function(sb, sp, overrides){
- if(Ext.isObject(sp)){
+ if(typeof sp == 'object'){
overrides = sp;
sp = sb;
sb = overrides.constructor != oc ? overrides.constructor : function(){sp.apply(this, arguments);};
if(Ext.isIterable(obj)){
Ext.each(obj, fn, scope);
return;
- }else if(Ext.isObject(obj)){
+ }else if(typeof obj == 'object'){
for(var prop in obj){
if(obj.hasOwnProperty(prop)){
if(fn.call(scope || obj, prop, obj[prop], obj) === false){
if (el.dom){
return el.dom;
} else {
- if (Ext.isString(el)) {
+ if (typeof el == 'string') {
var e = DOC.getElementById(el);
// IE returns elements with the 'name' and 'id' attribute.
// we do a strict check to return the element with only the id attribute
* @return {Boolean}
*/
isElement : function(v) {
- return !!v && v.tagName;
+ return v ? !!v.tagName : false;
},
/**
*/
Ext.apply(Ext, function(){
- var E = Ext,
+ var E = Ext,
idSeed = 0,
scrollWidth = null;
emptyFn : function(){},
/**
- * 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){
* @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;
},
'#foo a@click' : function(e, t){
// do something
},
-
+
// add the same listener to multiple selectors (separated by comma BEFORE the @)
'#foo a, #bar span.some-class@mouseover' : function(){
// do something
}
});
- * </code></pre>
+ * </code></pre>
* @param {Object} obj The list of behaviors to apply
*/
addBehaviors : function(o){
cache = null;
}
},
-
+
/**
* 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.
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>'),
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){
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);
},
/**
* 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]]
* </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);
* @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")),
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';
}
}
// internal
callback : function(cb, scope, args, delay){
- if(Ext.isFunction(cb)){
+ if(typeof cb == 'function'){
if(delay){
cb.defer(delay, scope, args || []);
}else{
*/
createSequence : function(fcn, scope){
var method = this;
- return !Ext.isFunction(fcn) ?
+ return (typeof fcn != 'function') ?
this :
function(){
var retval = method.apply(this || window, arguments);
});
* </code></pre>
+ * <p>See the {@link #start} method for details about how to configure a task object.</p>
* Also see {@link Ext.util.DelayedTask}.
*
* @constructor
/**
* Starts a new task.
* @method start
- * @param {Object} task A config object that supports the following properties:<ul>
- * <li><code>run</code> : Function<div class="sub-desc">The function to execute each time the task is run. The
- * function will be called at each interval and passed the <code>args</code> argument if specified. If a
- * particular scope is required, be sure to specify it using the <code>scope</code> argument.</div></li>
+ * @param {Object} task <p>A config object that supports the following properties:<ul>
+ * <li><code>run</code> : Function<div class="sub-desc"><p>The function to execute each time the task is invoked. The
+ * function will be called at each interval and passed the <code>args</code> argument if specified, and the
+ * current invocation count if not.</p>
+ * <p>If a particular scope (<code>this</code> reference) is required, be sure to specify it using the <code>scope</code> argument.</p>
+ * <p>Return <code>false</code> from this function to terminate the task.</p></div></li>
* <li><code>interval</code> : Number<div class="sub-desc">The frequency in milliseconds with which the task
- * should be executed.</div></li>
+ * should be invoked.</div></li>
* <li><code>args</code> : Array<div class="sub-desc">(optional) An array of arguments to be passed to the function
- * specified by <code>run</code>.</div></li>
+ * specified by <code>run</code>. If not specified, the current invocation count is passed.</div></li>
* <li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<tt>this</tt> reference) in which to execute the
* <code>run</code> function. Defaults to the task config object.</div></li>
- * <li><code>duration</code> : Number<div class="sub-desc">(optional) The length of time in milliseconds to execute
+ * <li><code>duration</code> : Number<div class="sub-desc">(optional) The length of time in milliseconds to invoke
* the task before stopping automatically (defaults to indefinite).</div></li>
- * <li><code>repeat</code> : Number<div class="sub-desc">(optional) The number of times to execute the task before
+ * <li><code>repeat</code> : Number<div class="sub-desc">(optional) The number of times to invoke the task before
* stopping automatically (defaults to indefinite).</div></li>
- * </ul>
+ * </ul></p>
+ * <p>Before each invocation, Ext injects the property <code>taskRunCount</code> into the task object so
+ * that calculations based on the repeat count can be performed.</p>
* @return {Object} The task
*/
this.start = function(task){
}
Ext.TaskMgr.start(task);
</code></pre>
+ * <p>See the {@link #start} method for details about how to configure a task object.</p>
* @singleton
*/
Ext.TaskMgr = new Ext.util.TaskRunner();if(typeof jQuery == "undefined"){
isAncestor : function(p, c){
var ret = false;
-
+
p = Ext.getDom(p);
c = Ext.getDom(c);
if (p && c) {
return !!(p.compareDocumentPosition(c) & 16);
} else {
while (c = c.parentNode) {
- ret = c == p || ret;
+ ret = c == p || ret;
}
- }
- }
+ }
+ }
return ret;
},
}
};
};
-
+
var createResponse = function(cb, xhr){
var headerObj = {},
- headerStr,
+ headerStr,
t,
s;
try {
- headerStr = xhr.getAllResponseHeaders();
+ headerStr = xhr.getAllResponseHeaders();
Ext.each(headerStr.replace(/\r\n/g, '\n').split('\n'), function(v){
t = v.indexOf(':');
if(t >= 0){
}
});
} catch(e) {}
-
+
return {
responseText: xhr.responseText,
responseXML : xhr.responseXML,
if (args.top.from)
e.setTop(args.top.from);
break;
+ // jQuery can't handle callback, scope, and xy arguments, so break here
case 'callback':
case 'scope':
- // jQuery can't handle callback and scope arguments, so break here
+ case 'xy':
break;
default: