roojs-core.js
authorAlan Knowles <alan@roojs.com>
Wed, 14 Dec 2011 09:13:56 +0000 (17:13 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 14 Dec 2011 09:13:56 +0000 (17:13 +0800)
roojs-core.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core-debug.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-core.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-core-debug.js
roojs-core.js
roojs-debug.js

index a009ab4..4f12d57 100644 (file)
@@ -147,7 +147,8 @@ hd.appendChild(s);}else if(P[2]&&P[2].length>0){if(window.execScript){window.exe
 bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx;},getFrameWidth:function(J,K){return K&&Roo.isBorderBox?0:(this.getPadding(J)+this.getBorderWidth(J));},setBox:function(J,K,L){var w=J.width,h=J.height;if((K&&!this.autoBoxAdjust)&&!this.isBorderBox()){w-=(this.getBorderWidth("lr")+this.getPadding("lr"));h-=(this.getBorderWidth("tb")+this.getPadding("tb"));}
 this.setBounds(J.x,J.y,w,h,this.preanim(arguments,2));return this;},repaint:function(){var J=this.dom;this.addClass("x-repaint");setTimeout(function(){Roo.get(J).removeClass("x-repaint");},1);return this;},getMargins:function(J){if(!J){return {top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0};}else {return this.addStyles(J,El.margins);}},addStyles:function(J,K){var L=0,v,w;for(var i=0,M=J.length;i<M;i++){v=this.getStyle(K[J.charAt(i)]);if(v){w=parseInt(v,10);if(w){L+=w;}}}return L;},createProxy:function(J,K,L){if(K){K=Roo.getDom(K);}else {K=document.body;}
 J=typeof J=="object"?J:{tag:"div",cls:J};var M=Roo.DomHelper.append(K,J,true);if(L){M.setBox(this.getBox());}return M;},mask:function(J,K){if(this.getStyle("position")=="static"){this.setStyle("position","relative");}if(!this._mask){this._mask=Roo.DomHelper.append(this.dom,{cls:"roo-el-mask"},true);}
-this.addClass("x-masked");this._mask.setDisplayed(true);if(typeof J=='string'){if(!this._maskMsg){this._maskMsg=Roo.DomHelper.append(this.dom,{cls:"roo-el-mask-msg",cn:{tag:'div'}},true);}var mm=this._maskMsg;mm.dom.className=K?"roo-el-mask-msg "+K:"roo-el-mask-msg";mm.dom.firstChild.innerHTML=J;mm.setDisplayed(true);mm.center(this);}if(Roo.isIE&&!(Roo.isIE7&&Roo.isStrict)&&this.getStyle('height')=='auto'){this._mask.setHeight(this.getHeight());}return this._mask;},unmask:function(J){if(this._mask){if(J===true){this._mask.remove();delete this._mask;if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg;}}else {this._mask.setDisplayed(false);if(this._maskMsg){this._maskMsg.setDisplayed(false);}}}
+this.addClass("x-masked");this._mask.setDisplayed(true);var p=this.getPositioning();if(typeof J=='string'){if(!this._maskMsg){this._maskMsg=Roo.DomHelper.append(this.dom,{cls:"roo-el-mask-msg",cn:{tag:'div'}},true);}var mm=this._maskMsg;mm.dom.className=K?"roo-el-mask-msg "+K:"roo-el-mask-msg";mm.dom.firstChild.innerHTML=J;mm.setDisplayed(true);mm.center(this);mm.setStyle('z-index',parseInt(p['z-index'])+102);}if(Roo.isIE&&!(Roo.isIE7&&Roo.isStrict)&&this.getStyle('height')=='auto'){this._mask.setHeight(this.getHeight());}
+this_mask.setStyle('z-index',parseInt(p['z-index'])+100);return this._mask;},unmask:function(J){if(this._mask){if(J===true){this._mask.remove();delete this._mask;if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg;}}else {this._mask.setDisplayed(false);if(this._maskMsg){this._maskMsg.setDisplayed(false);}}}
 this.removeClass("x-masked");},isMasked:function(){return this._mask&&this._mask.isVisible();},createShim:function(){var el=document.createElement('iframe');el.frameBorder='no';el.className='roo-shim';if(Roo.isIE&&Roo.isSecure){el.src=Roo.SSL_SECURE_URL;}var J=Roo.get(this.dom.parentNode.insertBefore(el,this.dom));J.autoBoxAdjust=false;return J;},remove:function(){if(this.dom.parentNode){this.dom.parentNode.removeChild(this.dom);}delete El.cache[this.dom.id];},addClassOnOver:function(J,K){this.on("mouseover",function(){Roo.fly(this,'_internal').addClass(J);},this.dom);var L=function(e){if(K!==true||!e.within(this,true)){Roo.fly(this,'_internal').removeClass(J);}};this.on("mouseout",L,this.dom);return this;},addClassOnFocus:function(J){this.on("focus",function(){Roo.fly(this,'_internal').addClass(J);},this.dom);this.on("blur",function(){Roo.fly(this,'_internal').removeClass(J);},this.dom);return this;},addClassOnClick:function(J){var K=this.dom;this.on("mousedown",function(){Roo.fly(K,'_internal').addClass(J);var d=Roo.get(document);var fn=function(){Roo.fly(K,'_internal').removeClass(J);d.removeListener("mouseup",fn);};d.on("mouseup",fn);});return this;},swallowEvent:function(J,K){var fn=function(e){e.stopPropagation();if(K){e.preventDefault();}};if(J instanceof Array){for(var i=0,L=J.length;i<L;i++){this.on(J[i],fn);}return this;}
 this.on(J,fn);return this;},fitToParentDelegate:Roo.emptyFn,fitToParent:function(J,K){Roo.EventManager.removeResizeListener(this.fitToParentDelegate);this.fitToParentDelegate=Roo.emptyFn;if(J===true&&!this.dom.parentNode){return;}var p=Roo.get(K||this.dom.parentNode);this.setSize(p.getComputedWidth()-p.getFrameWidth('lr'),p.getComputedHeight()-p.getFrameWidth('tb'));if(J===true){this.fitToParentDelegate=this.fitToParent.createDelegate(this,[true,K]);Roo.EventManager.onWindowResize(this.fitToParentDelegate);}return this;},getNextSibling:function(){var n=this.dom.nextSibling;while(n&&n.nodeType!=1){n=n.nextSibling;}return n;},getPrevSibling:function(){var n=this.dom.previousSibling;while(n&&n.nodeType!=1){n=n.previousSibling;}return n;},appendChild:function(el){el=Roo.get(el);el.appendTo(this);return this;},createChild:function(J,K,L){J=J||{tag:'div'};if(K){return Roo.DomHelper.insertBefore(K,J,L!==true);}return Roo.DomHelper[!this.dom.firstChild?'overwrite':'append'](this.dom,J,L!==true);},appendTo:function(el){el=Roo.getDom(el);el.appendChild(this.dom);return this;},insertBefore:function(el){el=Roo.getDom(el);el.parentNode.insertBefore(this.dom,el);return this;},insertAfter:function(el){el=Roo.getDom(el);el.parentNode.insertBefore(this.dom,el.nextSibling);return this;},insertFirst:function(el,J){el=el||{};if(typeof el=='object'&&!el.nodeType){return this.createChild(el,this.dom.firstChild,J);}else {el=Roo.getDom(el);this.dom.insertBefore(el,this.dom.firstChild);return !J?Roo.get(el):el;}},insertSibling:function(el,J,K){J=J?J.toLowerCase():'before';el=el||{};var rt,L=J=='before'?this.dom:this.dom.nextSibling;if(typeof el=='object'&&!el.nodeType){if(J=='after'&&!this.dom.nextSibling){rt=Roo.DomHelper.append(this.dom.parentNode,el,!K);}else {rt=Roo.DomHelper[J=='after'?'insertAfter':'insertBefore'](this.dom,el,!K);}}else {rt=this.dom.parentNode.insertBefore(Roo.getDom(el),J=='before'?this.dom:this.dom.nextSibling);if(!K){rt=Roo.get(rt);}}return rt;},wrap:function(J,K){if(!J){J={tag:"div"};}var L=Roo.DomHelper.insertBefore(this.dom,J,!K);L.dom?L.dom.appendChild(this.dom):L.appendChild(this.dom);return L;},replace:function(el){el=Roo.get(el);this.insertBefore(el);el.remove();return this;},insertHtml:function(J,K,L){var el=Roo.DomHelper.insertHtml(J,this.dom,K);return L?Roo.get(el):el;},set:function(o,J){var el=this.dom;J=typeof J=='undefined'?(el.setAttribute?true:false):J;for(var K in o){if(K=="style"||typeof o[K]=="function")continue;if(K=="cls"){el.className=o["cls"];}else {if(J)el.setAttribute(K,o[K]);else el[K]=o[K];}}if(o.style){Roo.DomHelper.applyStyles(el,o.style);}return this;},addKeyListener:function(J,fn,K){var L;if(typeof J!="object"||J instanceof Array){L={key:J,fn:fn,scope:K};}else {L={key:J.key,shift:J.shift,ctrl:J.ctrl,alt:J.alt,fn:fn,scope:K};}return new Roo.KeyMap(this,L);},addKeyMap:function(J){return new Roo.KeyMap(this,J);},isScrollable:function(){var J=this.dom;return J.scrollHeight>J.clientHeight||J.scrollWidth>J.clientWidth;},scrollTo:function(J,K,L){var M=J.toLowerCase()=="left"?"scrollLeft":"scrollTop";if(!L||!A){this.dom[M]=K;}else {var to=M=="scrollLeft"?[K,this.dom.scrollTop]:[this.dom.scrollLeft,K];this.anim({scroll:{"to":to}},this.preanim(arguments,2),'scroll');}return this;},scroll:function(J,K,L){if(!this.isScrollable()){return;}var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;var w=el.scrollWidth,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;J=J.toLowerCase();var M=false;var a=this.preanim(arguments,2);switch(J){case "l":case "left":if(w-l>cw){var v=Math.min(l+K,w-cw);this.scrollTo("left",v,a);M=true;}break;case "r":case "right":if(l>0){var v=Math.max(l-K,0);this.scrollTo("left",v,a);M=true;}break;case "t":case "top":case "up":if(t>0){var v=Math.max(t-K,0);this.scrollTo("top",v,a);M=true;}break;case "b":case "bottom":case "down":if(h-t>ch){var v=Math.min(t+K,h-ch);this.scrollTo("top",v,a);M=true;}break;}return M;},translatePoints:function(x,y){if(typeof x=='object'||x instanceof Array){y=x[1];x=x[0];}var p=this.getStyle('position');var o=this.getXY();var l=parseInt(this.getStyle('left'),10);var t=parseInt(this.getStyle('top'),10);if(isNaN(l)){l=(p=="relative")?0:this.dom.offsetLeft;}if(isNaN(t)){t=(p=="relative")?0:this.dom.offsetTop;}return {left:(x-o[0]+l),top:(y-o[1]+t)};},getScroll:function(){var d=this.dom,J=document;if(d==J||d==J.body){var l=window.pageXOffset||J.documentElement.scrollLeft||J.body.scrollLeft||0;var t=window.pageYOffset||J.documentElement.scrollTop||J.body.scrollTop||0;return {left:l,top:t};}else {return {left:d.scrollLeft,top:d.scrollTop};}},getColor:function(J,K,L){var v=this.getStyle(J);if(!v||v=="transparent"||v=="inherit"){return K;}var M=typeof L=="undefined"?"#":L;if(v.substr(0,4)=="rgb("){var N=v.slice(4,v.length-1).split(",");for(var i=0;i<3;i++){var h=parseInt(N[i]).toString(16);if(h<16){h="0"+h;}
 M+=h;}}else {if(v.substr(0,1)=="#"){if(v.length==4){for(var i=1;i<4;i++){var c=v.charAt(i);M+=c+c;}}else if(v.length==7){M+=v.substr(1);}}}return (M.length>5?M.toLowerCase():K);},boxWrap:function(J){J=J||'x-box';var el=Roo.get(this.insertHtml('beforeBegin',String.format('<div class="{0}">'+El.boxMarkup+'</div>',J)));el.child('.'+J+'-mc').dom.appendChild(this.dom);return el;},getAttributeNS:Roo.isIE?function(ns,J){var d=this.dom;var K=typeof d[ns+":"+J];if(K!='undefined'&&K!='unknown'){return d[ns+":"+J];}return d[J];}:function(ns,J){var d=this.dom;return d.getAttributeNS(ns,J)||d.getAttribute(ns+":"+J)||d.getAttribute(J)||d[J];}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;ep.un=ep.removeListener;ep.autoBoxAdjust=true;El.unitPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;El.addUnits=function(v,J){if(v===""||v=="auto"){return v;}if(v===undefined){return '';}if(typeof v=="number"||!El.unitPattern.test(v)){return v+(J||'px');}return v;};El.boxMarkup='<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};El.cache={};var H;El.get=function(el){var ex,J,id;if(!el){return null;}if(typeof el=="string"){if(!(J=document.getElementById(el))){return null;}if(ex=El.cache[el]){ex.dom=J;}else {ex=El.cache[el]=new El(J);}return ex;}else if(el.tagName){if(!(id=el.id)){id=Roo.id(el);}if(ex=El.cache[id]){ex.dom=el;}else {ex=El.cache[id]=new El(el);}return ex;}else if(el instanceof El){if(el!=H){el.dom=document.getElementById(el.id)||el.dom;El.cache[el.id]=el;}return el;}else if(el.isComposite){return el;}else if(el instanceof Array){return El.select(el);}else if(el==document){if(!H){var f=function(){};f.prototype=El.prototype;H=new f();H.dom=document;}return H;}return null;};El.uncache=function(el){for(var i=0,a=arguments,J=a.length;i<J;i++){if(a[i]){delete El.cache[a[i].id||a[i]];}}};El.garbageCollect=function(){if(!Roo.enableGarbageCollector){clearInterval(El.collectorThread);return;}for(var J in El.cache){var el=El.cache[J],d=el.dom;if(!d||!d.parentNode||(!d.offsetParent&&!document.getElementById(J))){delete El.cache[J];if(d&&Roo.enableListenerCollection){E.purgeElement(d);}}}}
index eeb9c35..15b5ee9 100644 (file)
@@ -68,7 +68,7 @@ Roo.apply = function(o, c, defaults){
             document.execCommand("BackgroundImageCache", false, true);
         }catch(e){}
     }
-
+    
     Roo.apply(Roo, {
         /**
          * True if the browser is in strict mode
@@ -8860,7 +8860,8 @@ if(opt.anim.isAnimated()){
          * @param {String} msgCls (optional) A css class to apply to the msg element
          * @return {Element} The mask  element
          */
-        mask : function(msg, msgCls){
+        mask : function(msg, msgCls)
+        {
             if(this.getStyle("position") == "static"){
                 this.setStyle("position", "relative");
             }
@@ -8869,6 +8870,7 @@ if(opt.anim.isAnimated()){
             }
             this.addClass("x-masked");
             this._mask.setDisplayed(true);
+            var p = this.getPositioning();
             if(typeof msg == 'string'){
                 if(!this._maskMsg){
                     this._maskMsg = Roo.DomHelper.append(this.dom, {cls:"roo-el-mask-msg", cn:{tag:'div'}}, true);
@@ -8878,10 +8880,13 @@ if(opt.anim.isAnimated()){
                 mm.dom.firstChild.innerHTML = msg;
                 mm.setDisplayed(true);
                 mm.center(this);
+                mm.setStyle('z-index', parseInt(p['z-index']) + 102);
             }
             if(Roo.isIE && !(Roo.isIE7 && Roo.isStrict) && this.getStyle('height') == 'auto'){ // ie will not expand full height automatically
                 this._mask.setHeight(this.getHeight());
             }
+            this_mask.setStyle('z-index', parseInt(p['z-index']) + 100);
+            
             return this._mask;
         },
 
@@ -11555,82 +11560,30 @@ Roo.Ajax = new Roo.data.Connection({
  
 /**
  * Global Ajax request class.
+ * 
  * @class Roo.Ajax
  * @extends Roo.data.Connection
- * @instanceOf  Roo.data.Connection
+ * @static
+ * 
+ * @cfg {String} url  The default URL to be used for requests to the server. (defaults to undefined)
+ * @cfg {Object} extraParams  An object containing properties which are used as extra parameters to each request made by this object. (defaults to undefined)
+ * @cfg {Object} defaultHeaders  An object containing request headers which are added to each request made by this object. (defaults to undefined)
+ * @cfg {String} method (Optional)  The default HTTP method to be used for requests. (defaults to undefined; if not set but parms are present will use POST, otherwise GET)
+ * @cfg {Number} timeout (Optional) The timeout in milliseconds to be used for requests. (defaults to 30000)
+ * @cfg {Boolean} autoAbort (Optional) Whether a new request should abort any pending requests. (defaults to false)
+ * @cfg {Boolean} disableCaching (Optional)   True to add a unique cache-buster param to GET requests. (defaults to true)
  */
 Roo.Ajax = new Roo.data.Connection({
     // fix up the docs
-    
     /**
-     * fix up scoping
      * @scope Roo.Ajax
-     */
-    
-   /**
-     * @cfg {String} url @hide
-     */
-    /**
-     * @cfg {Object} extraParams @hide
-     */
-    /**
-     * @cfg {Object} defaultHeaders @hide
-     */
-    /**
-     * @cfg {String} method (Optional) @hide
-     */
-    /**
-     * @cfg {Number} timeout (Optional) @hide
-     */
-    /**
-     * @cfg {Boolean} autoAbort (Optional) @hide
-     */
-
-    /**
-     * @cfg {Boolean} disableCaching (Optional) @hide
-     */
-
-    /**
-     * @property  disableCaching
-     * True to add a unique cache-buster param to GET requests. (defaults to true)
-     * @type Boolean
-     */
-    /**
-     * @property  url
-     * The default URL to be used for requests to the server. (defaults to undefined)
-     * @type String
-     */
-    /**
-     * @property  extraParams
-     * An object containing properties which are used as
-     * extra parameters to each request made by this object. (defaults to undefined)
-     * @type Object
-     */
-    /**
-     * @property  defaultHeaders
-     * An object containing request headers which are added to each request made by this object. (defaults to undefined)
-     * @type Object
-     */
-    /**
-     * @property  method
-     * The default HTTP method to be used for requests. (defaults to undefined; if not set but parms are present will use POST, otherwise GET)
-     * @type String
-     */
-    /**
-     * @property  timeout
-     * The timeout in milliseconds to be used for requests. (defaults to 30000)
-     * @type Number
-     */
-
-    /**
-     * @property  autoAbort
-     * Whether a new request should abort any pending requests. (defaults to false)
-     * @type Boolean
+     * @type {Boolear} 
      */
     autoAbort : false,
 
     /**
      * Serialize the passed form into a url encoded string
+     * @scope Roo.Ajax
      * @param {String/HTMLElement} form
      * @return {String}
      */
index 4e1c968..cb99a91 100644 (file)
@@ -147,7 +147,8 @@ hd.appendChild(s);}else if(P[2]&&P[2].length>0){if(window.execScript){window.exe
 bx.right=bx.x+bx.width;bx.bottom=bx.y+bx.height;return bx;},getFrameWidth:function(J,K){return K&&Roo.isBorderBox?0:(this.getPadding(J)+this.getBorderWidth(J));},setBox:function(J,K,L){var w=J.width,h=J.height;if((K&&!this.autoBoxAdjust)&&!this.isBorderBox()){w-=(this.getBorderWidth("lr")+this.getPadding("lr"));h-=(this.getBorderWidth("tb")+this.getPadding("tb"));}
 this.setBounds(J.x,J.y,w,h,this.preanim(arguments,2));return this;},repaint:function(){var J=this.dom;this.addClass("x-repaint");setTimeout(function(){Roo.get(J).removeClass("x-repaint");},1);return this;},getMargins:function(J){if(!J){return {top:parseInt(this.getStyle("margin-top"),10)||0,left:parseInt(this.getStyle("margin-left"),10)||0,bottom:parseInt(this.getStyle("margin-bottom"),10)||0,right:parseInt(this.getStyle("margin-right"),10)||0};}else {return this.addStyles(J,El.margins);}},addStyles:function(J,K){var L=0,v,w;for(var i=0,M=J.length;i<M;i++){v=this.getStyle(K[J.charAt(i)]);if(v){w=parseInt(v,10);if(w){L+=w;}}}return L;},createProxy:function(J,K,L){if(K){K=Roo.getDom(K);}else {K=document.body;}
 J=typeof J=="object"?J:{tag:"div",cls:J};var M=Roo.DomHelper.append(K,J,true);if(L){M.setBox(this.getBox());}return M;},mask:function(J,K){if(this.getStyle("position")=="static"){this.setStyle("position","relative");}if(!this._mask){this._mask=Roo.DomHelper.append(this.dom,{cls:"roo-el-mask"},true);}
-this.addClass("x-masked");this._mask.setDisplayed(true);if(typeof J=='string'){if(!this._maskMsg){this._maskMsg=Roo.DomHelper.append(this.dom,{cls:"roo-el-mask-msg",cn:{tag:'div'}},true);}var mm=this._maskMsg;mm.dom.className=K?"roo-el-mask-msg "+K:"roo-el-mask-msg";mm.dom.firstChild.innerHTML=J;mm.setDisplayed(true);mm.center(this);}if(Roo.isIE&&!(Roo.isIE7&&Roo.isStrict)&&this.getStyle('height')=='auto'){this._mask.setHeight(this.getHeight());}return this._mask;},unmask:function(J){if(this._mask){if(J===true){this._mask.remove();delete this._mask;if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg;}}else {this._mask.setDisplayed(false);if(this._maskMsg){this._maskMsg.setDisplayed(false);}}}
+this.addClass("x-masked");this._mask.setDisplayed(true);var p=this.getPositioning();if(typeof J=='string'){if(!this._maskMsg){this._maskMsg=Roo.DomHelper.append(this.dom,{cls:"roo-el-mask-msg",cn:{tag:'div'}},true);}var mm=this._maskMsg;mm.dom.className=K?"roo-el-mask-msg "+K:"roo-el-mask-msg";mm.dom.firstChild.innerHTML=J;mm.setDisplayed(true);mm.center(this);mm.setStyle('z-index',parseInt(p['z-index'])+102);}if(Roo.isIE&&!(Roo.isIE7&&Roo.isStrict)&&this.getStyle('height')=='auto'){this._mask.setHeight(this.getHeight());}
+this_mask.setStyle('z-index',parseInt(p['z-index'])+100);return this._mask;},unmask:function(J){if(this._mask){if(J===true){this._mask.remove();delete this._mask;if(this._maskMsg){this._maskMsg.remove();delete this._maskMsg;}}else {this._mask.setDisplayed(false);if(this._maskMsg){this._maskMsg.setDisplayed(false);}}}
 this.removeClass("x-masked");},isMasked:function(){return this._mask&&this._mask.isVisible();},createShim:function(){var el=document.createElement('iframe');el.frameBorder='no';el.className='roo-shim';if(Roo.isIE&&Roo.isSecure){el.src=Roo.SSL_SECURE_URL;}var J=Roo.get(this.dom.parentNode.insertBefore(el,this.dom));J.autoBoxAdjust=false;return J;},remove:function(){if(this.dom.parentNode){this.dom.parentNode.removeChild(this.dom);}delete El.cache[this.dom.id];},addClassOnOver:function(J,K){this.on("mouseover",function(){Roo.fly(this,'_internal').addClass(J);},this.dom);var L=function(e){if(K!==true||!e.within(this,true)){Roo.fly(this,'_internal').removeClass(J);}};this.on("mouseout",L,this.dom);return this;},addClassOnFocus:function(J){this.on("focus",function(){Roo.fly(this,'_internal').addClass(J);},this.dom);this.on("blur",function(){Roo.fly(this,'_internal').removeClass(J);},this.dom);return this;},addClassOnClick:function(J){var K=this.dom;this.on("mousedown",function(){Roo.fly(K,'_internal').addClass(J);var d=Roo.get(document);var fn=function(){Roo.fly(K,'_internal').removeClass(J);d.removeListener("mouseup",fn);};d.on("mouseup",fn);});return this;},swallowEvent:function(J,K){var fn=function(e){e.stopPropagation();if(K){e.preventDefault();}};if(J instanceof Array){for(var i=0,L=J.length;i<L;i++){this.on(J[i],fn);}return this;}
 this.on(J,fn);return this;},fitToParentDelegate:Roo.emptyFn,fitToParent:function(J,K){Roo.EventManager.removeResizeListener(this.fitToParentDelegate);this.fitToParentDelegate=Roo.emptyFn;if(J===true&&!this.dom.parentNode){return;}var p=Roo.get(K||this.dom.parentNode);this.setSize(p.getComputedWidth()-p.getFrameWidth('lr'),p.getComputedHeight()-p.getFrameWidth('tb'));if(J===true){this.fitToParentDelegate=this.fitToParent.createDelegate(this,[true,K]);Roo.EventManager.onWindowResize(this.fitToParentDelegate);}return this;},getNextSibling:function(){var n=this.dom.nextSibling;while(n&&n.nodeType!=1){n=n.nextSibling;}return n;},getPrevSibling:function(){var n=this.dom.previousSibling;while(n&&n.nodeType!=1){n=n.previousSibling;}return n;},appendChild:function(el){el=Roo.get(el);el.appendTo(this);return this;},createChild:function(J,K,L){J=J||{tag:'div'};if(K){return Roo.DomHelper.insertBefore(K,J,L!==true);}return Roo.DomHelper[!this.dom.firstChild?'overwrite':'append'](this.dom,J,L!==true);},appendTo:function(el){el=Roo.getDom(el);el.appendChild(this.dom);return this;},insertBefore:function(el){el=Roo.getDom(el);el.parentNode.insertBefore(this.dom,el);return this;},insertAfter:function(el){el=Roo.getDom(el);el.parentNode.insertBefore(this.dom,el.nextSibling);return this;},insertFirst:function(el,J){el=el||{};if(typeof el=='object'&&!el.nodeType){return this.createChild(el,this.dom.firstChild,J);}else {el=Roo.getDom(el);this.dom.insertBefore(el,this.dom.firstChild);return !J?Roo.get(el):el;}},insertSibling:function(el,J,K){J=J?J.toLowerCase():'before';el=el||{};var rt,L=J=='before'?this.dom:this.dom.nextSibling;if(typeof el=='object'&&!el.nodeType){if(J=='after'&&!this.dom.nextSibling){rt=Roo.DomHelper.append(this.dom.parentNode,el,!K);}else {rt=Roo.DomHelper[J=='after'?'insertAfter':'insertBefore'](this.dom,el,!K);}}else {rt=this.dom.parentNode.insertBefore(Roo.getDom(el),J=='before'?this.dom:this.dom.nextSibling);if(!K){rt=Roo.get(rt);}}return rt;},wrap:function(J,K){if(!J){J={tag:"div"};}var L=Roo.DomHelper.insertBefore(this.dom,J,!K);L.dom?L.dom.appendChild(this.dom):L.appendChild(this.dom);return L;},replace:function(el){el=Roo.get(el);this.insertBefore(el);el.remove();return this;},insertHtml:function(J,K,L){var el=Roo.DomHelper.insertHtml(J,this.dom,K);return L?Roo.get(el):el;},set:function(o,J){var el=this.dom;J=typeof J=='undefined'?(el.setAttribute?true:false):J;for(var K in o){if(K=="style"||typeof o[K]=="function")continue;if(K=="cls"){el.className=o["cls"];}else {if(J)el.setAttribute(K,o[K]);else el[K]=o[K];}}if(o.style){Roo.DomHelper.applyStyles(el,o.style);}return this;},addKeyListener:function(J,fn,K){var L;if(typeof J!="object"||J instanceof Array){L={key:J,fn:fn,scope:K};}else {L={key:J.key,shift:J.shift,ctrl:J.ctrl,alt:J.alt,fn:fn,scope:K};}return new Roo.KeyMap(this,L);},addKeyMap:function(J){return new Roo.KeyMap(this,J);},isScrollable:function(){var J=this.dom;return J.scrollHeight>J.clientHeight||J.scrollWidth>J.clientWidth;},scrollTo:function(J,K,L){var M=J.toLowerCase()=="left"?"scrollLeft":"scrollTop";if(!L||!A){this.dom[M]=K;}else {var to=M=="scrollLeft"?[K,this.dom.scrollTop]:[this.dom.scrollLeft,K];this.anim({scroll:{"to":to}},this.preanim(arguments,2),'scroll');}return this;},scroll:function(J,K,L){if(!this.isScrollable()){return;}var el=this.dom;var l=el.scrollLeft,t=el.scrollTop;var w=el.scrollWidth,h=el.scrollHeight;var cw=el.clientWidth,ch=el.clientHeight;J=J.toLowerCase();var M=false;var a=this.preanim(arguments,2);switch(J){case "l":case "left":if(w-l>cw){var v=Math.min(l+K,w-cw);this.scrollTo("left",v,a);M=true;}break;case "r":case "right":if(l>0){var v=Math.max(l-K,0);this.scrollTo("left",v,a);M=true;}break;case "t":case "top":case "up":if(t>0){var v=Math.max(t-K,0);this.scrollTo("top",v,a);M=true;}break;case "b":case "bottom":case "down":if(h-t>ch){var v=Math.min(t+K,h-ch);this.scrollTo("top",v,a);M=true;}break;}return M;},translatePoints:function(x,y){if(typeof x=='object'||x instanceof Array){y=x[1];x=x[0];}var p=this.getStyle('position');var o=this.getXY();var l=parseInt(this.getStyle('left'),10);var t=parseInt(this.getStyle('top'),10);if(isNaN(l)){l=(p=="relative")?0:this.dom.offsetLeft;}if(isNaN(t)){t=(p=="relative")?0:this.dom.offsetTop;}return {left:(x-o[0]+l),top:(y-o[1]+t)};},getScroll:function(){var d=this.dom,J=document;if(d==J||d==J.body){var l=window.pageXOffset||J.documentElement.scrollLeft||J.body.scrollLeft||0;var t=window.pageYOffset||J.documentElement.scrollTop||J.body.scrollTop||0;return {left:l,top:t};}else {return {left:d.scrollLeft,top:d.scrollTop};}},getColor:function(J,K,L){var v=this.getStyle(J);if(!v||v=="transparent"||v=="inherit"){return K;}var M=typeof L=="undefined"?"#":L;if(v.substr(0,4)=="rgb("){var N=v.slice(4,v.length-1).split(",");for(var i=0;i<3;i++){var h=parseInt(N[i]).toString(16);if(h<16){h="0"+h;}
 M+=h;}}else {if(v.substr(0,1)=="#"){if(v.length==4){for(var i=1;i<4;i++){var c=v.charAt(i);M+=c+c;}}else if(v.length==7){M+=v.substr(1);}}}return (M.length>5?M.toLowerCase():K);},boxWrap:function(J){J=J||'x-box';var el=Roo.get(this.insertHtml('beforeBegin',String.format('<div class="{0}">'+El.boxMarkup+'</div>',J)));el.child('.'+J+'-mc').dom.appendChild(this.dom);return el;},getAttributeNS:Roo.isIE?function(ns,J){var d=this.dom;var K=typeof d[ns+":"+J];if(K!='undefined'&&K!='unknown'){return d[ns+":"+J];}return d[J];}:function(ns,J){var d=this.dom;return d.getAttributeNS(ns,J)||d.getAttribute(ns+":"+J)||d.getAttribute(J)||d[J];}};var ep=El.prototype;ep.on=ep.addListener;ep.mon=ep.addListener;ep.un=ep.removeListener;ep.autoBoxAdjust=true;El.unitPattern=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i;El.addUnits=function(v,J){if(v===""||v=="auto"){return v;}if(v===undefined){return '';}if(typeof v=="number"||!El.unitPattern.test(v)){return v+(J||'px');}return v;};El.boxMarkup='<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';El.VISIBILITY=1;El.DISPLAY=2;El.borders={l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"};El.paddings={l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"};El.margins={l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"};El.cache={};var H;El.get=function(el){var ex,J,id;if(!el){return null;}if(typeof el=="string"){if(!(J=document.getElementById(el))){return null;}if(ex=El.cache[el]){ex.dom=J;}else {ex=El.cache[el]=new El(J);}return ex;}else if(el.tagName){if(!(id=el.id)){id=Roo.id(el);}if(ex=El.cache[id]){ex.dom=el;}else {ex=El.cache[id]=new El(el);}return ex;}else if(el instanceof El){if(el!=H){el.dom=document.getElementById(el.id)||el.dom;El.cache[el.id]=el;}return el;}else if(el.isComposite){return el;}else if(el instanceof Array){return El.select(el);}else if(el==document){if(!H){var f=function(){};f.prototype=El.prototype;H=new f();H.dom=document;}return H;}return null;};El.uncache=function(el){for(var i=0,a=arguments,J=a.length;i<J;i++){if(a[i]){delete El.cache[a[i].id||a[i]];}}};El.garbageCollect=function(){if(!Roo.enableGarbageCollector){clearInterval(El.collectorThread);return;}for(var J in El.cache){var el=El.cache[J],d=el.dom;if(!d||!d.parentNode||(!d.offsetParent&&!document.getElementById(J))){delete El.cache[J];if(d&&Roo.enableListenerCollection){E.purgeElement(d);}}}}
index 87a6519..962d78b 100644 (file)
@@ -68,7 +68,7 @@ Roo.apply = function(o, c, defaults){
             document.execCommand("BackgroundImageCache", false, true);
         }catch(e){}
     }
-
+    
     Roo.apply(Roo, {
         /**
          * True if the browser is in strict mode
@@ -8860,7 +8860,8 @@ if(opt.anim.isAnimated()){
          * @param {String} msgCls (optional) A css class to apply to the msg element
          * @return {Element} The mask  element
          */
-        mask : function(msg, msgCls){
+        mask : function(msg, msgCls)
+        {
             if(this.getStyle("position") == "static"){
                 this.setStyle("position", "relative");
             }
@@ -8869,6 +8870,7 @@ if(opt.anim.isAnimated()){
             }
             this.addClass("x-masked");
             this._mask.setDisplayed(true);
+            var p = this.getPositioning();
             if(typeof msg == 'string'){
                 if(!this._maskMsg){
                     this._maskMsg = Roo.DomHelper.append(this.dom, {cls:"roo-el-mask-msg", cn:{tag:'div'}}, true);
@@ -8878,10 +8880,13 @@ if(opt.anim.isAnimated()){
                 mm.dom.firstChild.innerHTML = msg;
                 mm.setDisplayed(true);
                 mm.center(this);
+                mm.setStyle('z-index', parseInt(p['z-index']) + 102);
             }
             if(Roo.isIE && !(Roo.isIE7 && Roo.isStrict) && this.getStyle('height') == 'auto'){ // ie will not expand full height automatically
                 this._mask.setHeight(this.getHeight());
             }
+            this_mask.setStyle('z-index', parseInt(p['z-index']) + 100);
+            
             return this._mask;
         },
 
@@ -11555,82 +11560,30 @@ Roo.Ajax = new Roo.data.Connection({
  
 /**
  * Global Ajax request class.
+ * 
  * @class Roo.Ajax
  * @extends Roo.data.Connection
- * @instanceOf  Roo.data.Connection
+ * @static
+ * 
+ * @cfg {String} url  The default URL to be used for requests to the server. (defaults to undefined)
+ * @cfg {Object} extraParams  An object containing properties which are used as extra parameters to each request made by this object. (defaults to undefined)
+ * @cfg {Object} defaultHeaders  An object containing request headers which are added to each request made by this object. (defaults to undefined)
+ * @cfg {String} method (Optional)  The default HTTP method to be used for requests. (defaults to undefined; if not set but parms are present will use POST, otherwise GET)
+ * @cfg {Number} timeout (Optional) The timeout in milliseconds to be used for requests. (defaults to 30000)
+ * @cfg {Boolean} autoAbort (Optional) Whether a new request should abort any pending requests. (defaults to false)
+ * @cfg {Boolean} disableCaching (Optional)   True to add a unique cache-buster param to GET requests. (defaults to true)
  */
 Roo.Ajax = new Roo.data.Connection({
     // fix up the docs
-    
     /**
-     * fix up scoping
      * @scope Roo.Ajax
-     */
-    
-   /**
-     * @cfg {String} url @hide
-     */
-    /**
-     * @cfg {Object} extraParams @hide
-     */
-    /**
-     * @cfg {Object} defaultHeaders @hide
-     */
-    /**
-     * @cfg {String} method (Optional) @hide
-     */
-    /**
-     * @cfg {Number} timeout (Optional) @hide
-     */
-    /**
-     * @cfg {Boolean} autoAbort (Optional) @hide
-     */
-
-    /**
-     * @cfg {Boolean} disableCaching (Optional) @hide
-     */
-
-    /**
-     * @property  disableCaching
-     * True to add a unique cache-buster param to GET requests. (defaults to true)
-     * @type Boolean
-     */
-    /**
-     * @property  url
-     * The default URL to be used for requests to the server. (defaults to undefined)
-     * @type String
-     */
-    /**
-     * @property  extraParams
-     * An object containing properties which are used as
-     * extra parameters to each request made by this object. (defaults to undefined)
-     * @type Object
-     */
-    /**
-     * @property  defaultHeaders
-     * An object containing request headers which are added to each request made by this object. (defaults to undefined)
-     * @type Object
-     */
-    /**
-     * @property  method
-     * The default HTTP method to be used for requests. (defaults to undefined; if not set but parms are present will use POST, otherwise GET)
-     * @type String
-     */
-    /**
-     * @property  timeout
-     * The timeout in milliseconds to be used for requests. (defaults to 30000)
-     * @type Number
-     */
-
-    /**
-     * @property  autoAbort
-     * Whether a new request should abort any pending requests. (defaults to false)
-     * @type Boolean
+     * @type {Boolear} 
      */
     autoAbort : false,
 
     /**
      * Serialize the passed form into a url encoded string
+     * @scope Roo.Ajax
      * @param {String/HTMLElement} form
      * @return {String}
      */