X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..f5240829880f87e0cf581c6a296e436fdef0ef80:/src/adapter/jquery-bridge.js diff --git a/src/adapter/jquery-bridge.js b/src/adapter/jquery-bridge.js index e4a63434..ce5b9415 100644 --- a/src/adapter/jquery-bridge.js +++ b/src/adapter/jquery-bridge.js @@ -1,6 +1,6 @@ /*! - * Ext JS Library 3.1.1 - * Copyright(c) 2006-2010 Ext JS, LLC + * Ext JS Library 3.3.0 + * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license */ @@ -24,7 +24,7 @@ Ext.lib.Dom = { isAncestor : function(p, c){ var ret = false; - + p = Ext.getDom(p); c = Ext.getDom(c); if (p && c) { @@ -34,10 +34,10 @@ Ext.lib.Dom = { return !!(p.compareDocumentPosition(c) & 16); } else { while (c = c.parentNode) { - ret = c == p || ret; + ret = c == p || ret; } - } - } + } + } return ret; }, @@ -265,15 +265,15 @@ Ext.lib.Ajax = function(){ } }; }; - + 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){ @@ -285,15 +285,19 @@ Ext.lib.Ajax = function(){ } }); } catch(e) {} - + return { responseText: xhr.responseText, responseXML : xhr.responseXML, argument: cb.argument, status: xhr.status, statusText: xhr.statusText, - getResponseHeader : function(header){return headerObj[header.toLowerCase()];}, - getAllResponseHeaders : function(){return headerStr} + getResponseHeader : function(header){ + return headerObj[header.toLowerCase()]; + }, + getAllResponseHeaders : function(){ + return headerStr; + } }; }; return { @@ -325,12 +329,12 @@ Ext.lib.Ajax = function(){ } if(hs){ o.beforeSend = function(xhr){ - for(var h in hs){ - if(hs.hasOwnProperty(h)){ + for (var h in hs) { + if (hs.hasOwnProperty(h)) { xhr.setRequestHeader(h, hs[h]); } } - } + }; } } jQuery.ajax(o); @@ -455,9 +459,10 @@ Ext.lib.Anim = function(){ 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: