X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6:/src/adapter/prototype-bridge.js diff --git a/src/adapter/prototype-bridge.js b/src/adapter/prototype-bridge.js index 405b955b..ce0c7085 100644 --- a/src/adapter/prototype-bridge.js +++ b/src/adapter/prototype-bridge.js @@ -1,22 +1,22 @@ /*! - * Ext JS Library 3.1.0 - * Copyright(c) 2006-2009 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ (function(){ var libFlyweight, version = Prototype.Version.split('.'), - mouseEnterSupported = (parseInt(version[0]) >= 2) || (parseInt(version[1]) >= 7) || (parseInt(version[2]) >= 1), + mouseEnterSupported = (parseInt(version[0], 10) >= 2) || (parseInt(version[1], 10) >= 7) || (parseInt(version[2], 10) >= 1), mouseCache = {}, elContains = function(parent, child) { - if(parent && parent.firstChild){ + if(parent && parent.firstChild){ while(child) { if(child === parent) { return true; } - child = child.parentNode; + child = child.parentNode; if(child && (child.nodeType != 1)) { child = null; } @@ -25,7 +25,7 @@ var libFlyweight, return false; }, checkRelatedTarget = function(e) { - return !elContains(e.currentTarget, pub.getRelatedTarget(e)); + return !elContains(e.currentTarget, Ext.lib.Event.getRelatedTarget(e)); }; Ext.lib.Dom = { @@ -74,7 +74,7 @@ Ext.lib.Dom = { isAncestor : function(p, c){ // missing from prototype? var ret = false; - + p = Ext.getDom(p); c = Ext.getDom(c); if (p && c) { @@ -84,10 +84,10 @@ Ext.lib.Dom = { return !!(p.compareDocumentPosition(c) & 16); } else { while (c = c.parentNode) { - ret = c == p || ret; + ret = c == p || ret; } - } - } + } + } return ret; }, @@ -250,7 +250,7 @@ Ext.lib.Event = { un : function(el, eventName, fn){ if((eventName == 'mouseenter' || eventName == 'mouseleave') && !mouseEnterSupported){ - var item = mouseCache[el.id], + var item = mouseCache[el.id], ev = item && item[eventName]; if(ev){ @@ -317,12 +317,12 @@ 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){ @@ -334,15 +334,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 { @@ -396,7 +400,7 @@ Ext.lib.Ajax = function(){ abort : function(trans){ return false; }, - + serializeForm : function(form){ return Form.serialize(form.dom||form); } @@ -405,7 +409,7 @@ Ext.lib.Ajax = function(){ Ext.lib.Anim = function(){ - + var easings = { easeOut: function(pos) { return 1-Math.pow(1-pos,2); @@ -503,7 +507,7 @@ function fly(el){ libFlyweight.dom = el; return libFlyweight; } - + Ext.lib.Region = function(t, r, b, l) { this.top = t; this[1] = t;