upgrade to extjs 3.1.1

This commit is contained in:
Damien Churchill 2010-03-17 23:17:13 +00:00
parent 0f6cab42a8
commit ed03721789
248 changed files with 51820 additions and 24393 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/*! /*!
* Ext JS Library 3.1.0 * Ext JS Library 3.1.1
* Copyright(c) 2006-2009 Ext JS, LLC * Copyright(c) 2006-2010 Ext JS, LLC
* licensing@extjs.com * licensing@extjs.com
* http://www.extjs.com/license * http://www.extjs.com/license
*/ */
@ -19,7 +19,7 @@ Ext = {
* The version of the framework * The version of the framework
* @type String * @type String
*/ */
version : '3.1.0' version : '3.1.1'
}; };
/** /**
@ -53,7 +53,7 @@ Ext.apply = function(o, c, defaults){
DOC = document, DOC = document,
isStrict = DOC.compatMode == "CSS1Compat", isStrict = DOC.compatMode == "CSS1Compat",
isOpera = check(/opera/), isOpera = check(/opera/),
isChrome = check(/chrome/), isChrome = check(/\bchrome\b/),
isWebKit = check(/webkit/), isWebKit = check(/webkit/),
isSafari = !isChrome && check(/safari/), isSafari = !isChrome && check(/safari/),
isSafari2 = isSafari && check(/applewebkit\/4/), // unique to Safari 2 isSafari2 = isSafari && check(/applewebkit\/4/), // unique to Safari 2
@ -161,7 +161,11 @@ Ext.apply = function(o, c, defaults){
* @return {String} The generated Id. * @return {String} The generated Id.
*/ */
id : function(el, prefix){ id : function(el, prefix){
return (el = Ext.getDom(el) || {}).id = el.id || (prefix || "ext-gen") + (++idSeed); el = Ext.getDom(el, true) || {};
if (!el.id) {
el.id = (prefix || "ext-gen") + (++idSeed);
}
return el.id;
}, },
/** /**
@ -404,7 +408,7 @@ Ext.urlDecode("foo=1&bar=2&bar=3&bar=4", false); // returns {foo: "1", bar: ["2"
} }
//NodeList has an item and length property //NodeList has an item and length property
//IXMLDOMNodeList has nextNode method, needs to be checked first. //IXMLDOMNodeList has nextNode method, needs to be checked first.
return ((v.nextNode || v.item) && Ext.isNumber(v.length)); return ((typeof v.nextNode != 'undefined' || v.item) && Ext.isNumber(v.length));
}, },
/** /**
@ -484,6 +488,8 @@ Ext.urlDecode("foo=1&bar=2&bar=3&bar=4", false); // returns {foo: "1", bar: ["2"
/** /**
* Return the dom node for the passed String (id), dom node, or Ext.Element. * Return the dom node for the passed String (id), dom node, or Ext.Element.
* Optional 'strict' flag is needed for IE since it can return 'name' and
* 'id' elements by using getElementById.
* Here are some examples: * Here are some examples:
* <pre><code> * <pre><code>
// gets dom node based on id // gets dom node based on id
@ -503,11 +509,29 @@ function(el){
* @param {Mixed} el * @param {Mixed} el
* @return HTMLElement * @return HTMLElement
*/ */
getDom : function(el){ getDom : function(el, strict){
if(!el || !DOC){ if(!el || !DOC){
return null; return null;
} }
return el.dom ? el.dom : (Ext.isString(el) ? DOC.getElementById(el) : el); if (el.dom){
return el.dom;
} else {
if (Ext.isString(el)) {
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
if (e && isIE && strict) {
if (el == e.getAttribute('id')) {
return e;
} else {
return null;
}
}
return e;
} else {
return el;
}
}
}, },
/** /**
@ -1050,7 +1074,7 @@ Ext.apply(Ext, function(){
* @return {Number} Value, if numeric, else defaultValue * @return {Number} Value, if numeric, else defaultValue
*/ */
num : function(v, defaultValue){ num : function(v, defaultValue){
v = Number(Ext.isEmpty(v) || Ext.isBoolean(v) ? NaN : v); v = Number(Ext.isEmpty(v) || Ext.isArray(v) || Ext.isBoolean(v) || (Ext.isString(v) && v.trim().length == 0) ? NaN : v);
return isNaN(v) ? defaultValue : v; return isNaN(v) ? defaultValue : v;
}, },
@ -1324,7 +1348,7 @@ ImageComponent = Ext.extend(Ext.BoxComponent, {
* @return {Number} The mean. * @return {Number} The mean.
*/ */
mean : function(arr){ mean : function(arr){
return Ext.sum(arr) / arr.length; return arr.length > 0 ? Ext.sum(arr) / arr.length : undefined;
}, },
/** /**
@ -2116,7 +2140,7 @@ Ext.TaskMgr = new Ext.util.TaskRunner();(function(){
if(!v.checkReady || loadComplete || element.nextSibling || (doc && doc.body)) { if(!v.checkReady || loadComplete || element.nextSibling || (doc && doc.body)) {
element = v.override ? (v.override === true ? v.obj : v.override) : element; element = v.override ? (v.override === true ? v.obj : v.override) : element;
v.fn.call(element, v.obj); v.fn.call(element, v.obj);
v = null; onAvailStack.remove(v);
} else { } else {
notAvail.push(v); notAvail.push(v);
} }
@ -2208,14 +2232,13 @@ Ext.TaskMgr = new Ext.util.TaskRunner();(function(){
// This function should ALWAYS be called from Ext.EventManager // This function should ALWAYS be called from Ext.EventManager
removeListener: function(el, eventName, fn) { removeListener: function(el, eventName, fn) {
el = Ext.getDom(el); el = Ext.getDom(el);
var i, len, li; var i, len, li, lis;
if (el && fn) { if (el && fn) {
if (eventName == UNLOAD) { if(eventName == UNLOAD){
if (unloadListeners[id] !== undefined) { if((lis = unloadListeners[el.id]) !== undefined){
for (i = 0, len = unloadListeners[id].length; i < len; i++) { for(i = 0, len = lis.length; i < len; i++){
li = unloadListeners[id][i]; if((li = lis[i]) && li[TYPE] == eventName && li[FN] == fn){
if (li && li[TYPE] == eventName && li[FN] == fn) { unloadListeners[el.id].splice(i, 1);
unloadListeners[id].splice(i, 1);
} }
} }
} }
@ -3477,12 +3500,14 @@ Ext.lib.Ajax = function() {
var me = this, var me = this,
val, val,
floor = Math.floor, floor = Math.floor,
i, len = start.length, v; i,
len,
v;
if(colorRE.test(attr)){ if(colorRE.test(attr)){
val = []; val = [];
for(i=0; i<len; i++) { for(i = 0, len = start.length; i < len; i++) {
v = start[i]; v = start[i];
val[i] = superclass.doMethod.call(me, attr, v, end[i]); val[i] = superclass.doMethod.call(me, attr, v, end[i]);
} }

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1005 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 833 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 904 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 961 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 962 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 947 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 971 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 823 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 823 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Some files were not shown because too many files have changed in this diff Show More