roojs-ui.js
authorEdward <edward@roojs.com>
Tue, 23 Apr 2019 08:55:15 +0000 (16:55 +0800)
committerEdward <edward@roojs.com>
Tue, 23 Apr 2019 08:55:15 +0000 (16:55 +0800)
roojs-ui-debug.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index 6ab07bd..9b45d76 100644 (file)
@@ -1941,7 +1941,7 @@ if(f.inputType=='radio'){if(typeof(B[f.getName()])=='undefined'){B[f.getName()]=
 }});return this;},applyToFields:function(o){this.items.each(function(f){Roo.apply(f,o);});return this;},applyIfToFields:function(o){this.items.each(function(f){Roo.applyIf(f,o);});return this;}});Roo.BasicForm=Roo.form.BasicForm;
 // Roo/form/Form.js
 Roo.form.Form=function(A){var B=[];if(A.items){B=A.items;delete A.items;}Roo.form.Form.superclass.constructor.call(this,null,A);this.url=this.url||this.action;if(!this.root){this.root=new Roo.form.Layout(Roo.applyIf({id:Roo.id()},A));}this.active=this.root;
-this.buttons=[];this.allItems=[];this.addEvents({clientvalidation:true,rendered:true});if(this.progressUrl){this.addxtype({xns:Roo.form,xtype:'Hidden',name:'UPLOAD_IDENTIFIER'});}Roo.each(B,this.addxtype,this);};Roo.extend(Roo.form.Form,Roo.form.BasicForm,{buttonAlign:'center',minButtonWidth:75,labelAlign:'left',monitorValid:false,monitorPoll:200,progressUrl:false,formData:false,column:function(c){var A=new Roo.form.Column(c);
+this.buttons=[];this.allItems=[];this.addEvents({clientvalidation:true,rendered:true});if(this.progressUrl){this.addxtype({xns:Roo.form,xtype:'Hidden',name:'UPLOAD_IDENTIFIER'});}Roo.each(B,this.addxtype,this);Roo.form.Form.popover.apply();};Roo.extend(Roo.form.Form,Roo.form.BasicForm,{buttonAlign:'center',minButtonWidth:75,labelAlign:'left',monitorValid:false,monitorPoll:200,progressUrl:false,formData:false,column:function(c){var A=new Roo.form.Column(c);
 this.start(A);if(arguments.length>1){this.add.apply(this,Array.prototype.slice.call(arguments,1));this.end();}return A;},fieldset:function(c){var fs=new Roo.form.FieldSet(c);this.start(fs);if(arguments.length>1){this.add.apply(this,Array.prototype.slice.call(arguments,1));
 this.end();}return fs;},container:function(c){var l=new Roo.form.Layout(c);this.start(l);if(arguments.length>1){this.add.apply(this,Array.prototype.slice.call(arguments,1));this.end();}return l;},start:function(c){Roo.applyIf(c,{'labelAlign':this.active.labelAlign,'labelWidth':this.active.labelWidth,'itemCls':this.active.itemCls}
 );this.active.stack.push(c);c.ownerCt=this.active;this.active=c;return this;},end:function(){if(this.active==this.root){return this;}this.active=this.active.ownerCt;return this;},add:function(){this.active.stack.push.apply(this.active.stack,arguments);this.allItems.push.apply(this.allItems,arguments);
@@ -1953,7 +1953,20 @@ for(var i=0,A=this.buttons.length;i<A;i++){var b=this.buttons[i];var td=document
 var fe=Roo.factory(ar[i],Roo.form);if(!A){A=fe;}fe.form=this;if(fe.store){fe.store.form=this;}if(fe.isLayout){this.start(fe);this.allItems.push(fe);if(fe.items&&fe.addxtype){fe.addxtype.apply(fe,fe.items);delete fe.items;}this.end();continue;}this.add(fe);
 }if(ar[i].xtype=='Button'){this.addButton(ar[i]);this.allItems.push(fe);continue;}if(ar[i].xtype=='end'){alert('end is not supported on xtype any more, use items');}}return A;},startMonitoring:function(){if(!this.bound){this.bound=true;Roo.TaskMgr.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this}
 );}},stopMonitoring:function(){this.bound=false;},bindHandler:function(){if(!this.bound){return false;}var A=true;this.items.each(function(f){if(!f.isValid(true)){A=false;return false;}});for(var i=0,B=this.buttons.length;i<B;i++){var C=this.buttons[i];if(C.formBind===true&&C.disabled===A){C.setDisabled(!A);
-}}this.fireEvent('clientvalidation',this,A);}});Roo.Form=Roo.form.Form;
+}}this.fireEvent('clientvalidation',this,A);}});Roo.Form=Roo.form.Form;Roo.apply(Roo.form.Form,{popover:{padding:5,isApplied:false,isMasked:false,form:false,target:false,toolTip:false,intervalID:false,maskEl:false,apply:function(){if(this.isApplied){return;
+}this.maskEl={top:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-top-mask"},true),left:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-left-mask"},true),bottom:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-bottom-mask"}
+,true),right:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-right-mask"},true)};this.maskEl.top.enableDisplayMode("block");this.maskEl.left.enableDisplayMode("block");this.maskEl.bottom.enableDisplayMode("block");this.maskEl.right.enableDisplayMode("block");
+this.toolTip=new Roo.bootstrap.Tooltip({cls:'roo-form-error-popover',alignment:{'left':['r-l',[-2,0],'right'],'right':['l-r',[2,0],'left'],'bottom':['tl-bl',[0,2],'top'],'top':['bl-tl',[0,-2],'bottom']}});this.toolTip.render(Roo.get(document.body));this.toolTip.el.enableDisplayMode("block");
+Roo.get(document.body).on('click',function(){this.unmask();},this);Roo.get(document.body).on('touchstart',function(){this.unmask();},this);this.isApplied=true},mask:function(A,B){this.form=A;this.target=B;if(!this.form.errorMask||!B.el){return;}var C=this.target.el.findScrollableParent()||this.target.el.findParent('div.modal',100,true)||Roo.get(document.body);
+Roo.log(C);var ot=this.target.el.calcOffsetsTo(C);var D=ot[1]-this.form.maskOffset;D=Math.min(D,C.dom.scrollHeight);C.scrollTo('top',D);var E=this.target.el.getBox();Roo.log(E);var F=Roo.bootstrap.Modal.zIndex++;this.maskEl.top.setStyle('position','absolute');
+this.maskEl.top.setStyle('z-index',F);this.maskEl.top.setSize(Roo.lib.Dom.getDocumentWidth(),E.y-this.padding);this.maskEl.top.setLeft(0);this.maskEl.top.setTop(0);this.maskEl.top.show();this.maskEl.left.setStyle('position','absolute');this.maskEl.left.setStyle('z-index',F);
+this.maskEl.left.setSize(E.x-this.padding,E.height+this.padding*2);this.maskEl.left.setLeft(0);this.maskEl.left.setTop(E.y-this.padding);this.maskEl.left.show();this.maskEl.bottom.setStyle('position','absolute');this.maskEl.bottom.setStyle('z-index',F);this.maskEl.bottom.setSize(Roo.lib.Dom.getDocumentWidth(),Roo.lib.Dom.getDocumentHeight()-E.bottom-this.padding);
+this.maskEl.bottom.setLeft(0);this.maskEl.bottom.setTop(E.bottom+this.padding);this.maskEl.bottom.show();this.maskEl.right.setStyle('position','absolute');this.maskEl.right.setStyle('z-index',F);this.maskEl.right.setSize(Roo.lib.Dom.getDocumentWidth()-E.right-this.padding,E.height+this.padding*2);
+this.maskEl.right.setLeft(E.right+this.padding);this.maskEl.right.setTop(E.y-this.padding);this.maskEl.right.show();this.toolTip.bindEl=this.target.el;this.toolTip.el.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);var G=this.target.blankText;if(this.target.getValue()!==''){if(this.target.invalidText.length){G=this.target.invalidText;
+}else if(this.target.regexText.length){G=this.target.regexText;}}this.toolTip.show(G);this.intervalID=window.setInterval(function(){Roo.bootstrap.Form.popover.unmask();},10000);window.onwheel=function(){return false;};(function(){this.isMasked=true;}).defer(500,this);
+},unmask:function(){if(!this.isApplied||!this.isMasked||!this.form||!this.target||!this.form.errorMask){return;}this.maskEl.top.setStyle('position','absolute');this.maskEl.top.setSize(0,0).setXY([0,0]);this.maskEl.top.hide();this.maskEl.left.setStyle('position','absolute');
+this.maskEl.left.setSize(0,0).setXY([0,0]);this.maskEl.left.hide();this.maskEl.bottom.setStyle('position','absolute');this.maskEl.bottom.setSize(0,0).setXY([0,0]);this.maskEl.bottom.hide();this.maskEl.right.setStyle('position','absolute');this.maskEl.right.setSize(0,0).setXY([0,0]);
+this.maskEl.right.hide();this.toolTip.hide();this.toolTip.el.hide();window.onwheel=function(){return true;};if(this.intervalID){window.clearInterval(this.intervalID);this.intervalID=false;}this.isMasked=false;}}});
 // Roo/form/Action.js
 Roo.namespace('Roo.form');Roo.form.Action=function(A,B){this.form=A;this.options=B||{};};Roo.form.Action.CLIENT_INVALID='client';Roo.form.Action.SERVER_INVALID='server';Roo.form.Action.CONNECT_FAILURE='connect';Roo.form.Action.LOAD_FAILURE='load';Roo.form.Action.prototype={type:'default',failureType:undefined,response:undefined,result:undefined,run:function(A){}
 ,success:function(A){},handleResponse:function(A){},failure:function(A){this.response=A;this.failureType=Roo.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false);},processResponse:function(A){this.response=A;if(!A.responseText){return true;}this.result=this.handleResponse(A);
index 3d8fe5d..5a1c4f3 100644 (file)
@@ -47516,7 +47516,7 @@ Roo.form.Form = function(config){
     
     Roo.each(xitems, this.addxtype, this);
     
-    
+    Roo.form.Form.popover.apply();
     
 };
 
@@ -47894,7 +47894,193 @@ Roo.extend(Roo.form.Form, Roo.form.BasicForm, {
 
 // back compat
 Roo.Form = Roo.form.Form;
-/*
+
+
+Roo.apply(Roo.form.Form, {
+    
+    popover : {
+        
+        padding : 5,
+        
+        isApplied : false,
+        
+        isMasked : false,
+        
+        form : false,
+        
+        target : false,
+        
+        toolTip : false,
+        
+        intervalID : false,
+        
+        maskEl : false,
+        
+        apply : function()
+        {
+            if(this.isApplied){
+                return;
+            }
+            
+            this.maskEl = {
+                top : Roo.DomHelper.append(Roo.get(document.body), { tag: "div", cls:"x-dlg-mask roo-form-top-mask" }, true),
+                left : Roo.DomHelper.append(Roo.get(document.body), { tag: "div", cls:"x-dlg-mask roo-form-left-mask" }, true),
+                bottom : Roo.DomHelper.append(Roo.get(document.body), { tag: "div", cls:"x-dlg-mask roo-form-bottom-mask" }, true),
+                right : Roo.DomHelper.append(Roo.get(document.body), { tag: "div", cls:"x-dlg-mask roo-form-right-mask" }, true)
+            };
+            
+            this.maskEl.top.enableDisplayMode("block");
+            this.maskEl.left.enableDisplayMode("block");
+            this.maskEl.bottom.enableDisplayMode("block");
+            this.maskEl.right.enableDisplayMode("block");
+            
+            this.toolTip = new Roo.bootstrap.Tooltip({
+                cls : 'roo-form-error-popover',
+                alignment : {
+                    'left' : ['r-l', [-2,0], 'right'],
+                    'right' : ['l-r', [2,0], 'left'],
+                    'bottom' : ['tl-bl', [0,2], 'top'],
+                    'top' : [ 'bl-tl', [0,-2], 'bottom']
+                }
+            });
+            
+            this.toolTip.render(Roo.get(document.body));
+
+            this.toolTip.el.enableDisplayMode("block");
+            
+            Roo.get(document.body).on('click', function(){
+                this.unmask();
+            }, this);
+            
+            Roo.get(document.body).on('touchstart', function(){
+                this.unmask();
+            }, this);
+            
+            this.isApplied = true
+        },
+        
+        mask : function(form, target)
+        {
+            this.form = form;
+            
+            this.target = target;
+            
+            if(!this.form.errorMask || !target.el){
+                return;
+            }
+            
+            var scrollable = this.target.el.findScrollableParent() || this.target.el.findParent('div.modal', 100, true) || Roo.get(document.body);
+            
+            Roo.log(scrollable);
+            
+            var ot = this.target.el.calcOffsetsTo(scrollable);
+            
+            var scrollTo = ot[1] - this.form.maskOffset;
+            
+            scrollTo = Math.min(scrollTo, scrollable.dom.scrollHeight);
+            
+            scrollable.scrollTo('top', scrollTo);
+            
+            var box = this.target.el.getBox();
+            Roo.log(box);
+            var zIndex = Roo.bootstrap.Modal.zIndex++;
+
+            
+            this.maskEl.top.setStyle('position', 'absolute');
+            this.maskEl.top.setStyle('z-index', zIndex);
+            this.maskEl.top.setSize(Roo.lib.Dom.getDocumentWidth(), box.y - this.padding);
+            this.maskEl.top.setLeft(0);
+            this.maskEl.top.setTop(0);
+            this.maskEl.top.show();
+            
+            this.maskEl.left.setStyle('position', 'absolute');
+            this.maskEl.left.setStyle('z-index', zIndex);
+            this.maskEl.left.setSize(box.x - this.padding, box.height + this.padding * 2);
+            this.maskEl.left.setLeft(0);
+            this.maskEl.left.setTop(box.y - this.padding);
+            this.maskEl.left.show();
+
+            this.maskEl.bottom.setStyle('position', 'absolute');
+            this.maskEl.bottom.setStyle('z-index', zIndex);
+            this.maskEl.bottom.setSize(Roo.lib.Dom.getDocumentWidth(), Roo.lib.Dom.getDocumentHeight() - box.bottom - this.padding);
+            this.maskEl.bottom.setLeft(0);
+            this.maskEl.bottom.setTop(box.bottom + this.padding);
+            this.maskEl.bottom.show();
+
+            this.maskEl.right.setStyle('position', 'absolute');
+            this.maskEl.right.setStyle('z-index', zIndex);
+            this.maskEl.right.setSize(Roo.lib.Dom.getDocumentWidth() - box.right - this.padding, box.height + this.padding * 2);
+            this.maskEl.right.setLeft(box.right + this.padding);
+            this.maskEl.right.setTop(box.y - this.padding);
+            this.maskEl.right.show();
+
+            this.toolTip.bindEl = this.target.el;
+
+            this.toolTip.el.setStyle('z-index', Roo.bootstrap.Modal.zIndex++);
+
+            var tip = this.target.blankText;
+
+            if(this.target.getValue() !== '' ) {
+                
+                if (this.target.invalidText.length) {
+                    tip = this.target.invalidText;
+                } else if (this.target.regexText.length){
+                    tip = this.target.regexText;
+                }
+            }
+
+            this.toolTip.show(tip);
+
+            this.intervalID = window.setInterval(function() {
+                Roo.bootstrap.Form.popover.unmask();
+            }, 10000);
+
+            window.onwheel = function(){ return false;};
+            
+            (function(){ this.isMasked = true; }).defer(500, this);
+            
+        },
+        
+        unmask : function()
+        {
+            if(!this.isApplied || !this.isMasked || !this.form || !this.target || !this.form.errorMask){
+                return;
+            }
+            
+            this.maskEl.top.setStyle('position', 'absolute');
+            this.maskEl.top.setSize(0, 0).setXY([0, 0]);
+            this.maskEl.top.hide();
+
+            this.maskEl.left.setStyle('position', 'absolute');
+            this.maskEl.left.setSize(0, 0).setXY([0, 0]);
+            this.maskEl.left.hide();
+
+            this.maskEl.bottom.setStyle('position', 'absolute');
+            this.maskEl.bottom.setSize(0, 0).setXY([0, 0]);
+            this.maskEl.bottom.hide();
+
+            this.maskEl.right.setStyle('position', 'absolute');
+            this.maskEl.right.setSize(0, 0).setXY([0, 0]);
+            this.maskEl.right.hide();
+            
+            this.toolTip.hide();
+            
+            this.toolTip.el.hide();
+            
+            window.onwheel = function(){ return true;};
+            
+            if(this.intervalID){
+                window.clearInterval(this.intervalID);
+                this.intervalID = false;
+            }
+            
+            this.isMasked = false;
+            
+        }
+        
+    }
+    
+});/*
  * Based on:
  * Ext JS Library 1.1.1
  * Copyright(c) 2006-2007, Ext JS, LLC.
index ecb1b84..b686892 100644 (file)
@@ -25065,7 +25065,7 @@ Roo.form.Form = function(config){
     
     Roo.each(xitems, this.addxtype, this);
     
-    
+    Roo.form.Form.popover.apply();
     
 };
 
@@ -25443,7 +25443,193 @@ Roo.extend(Roo.form.Form, Roo.form.BasicForm, {
 
 // back compat
 Roo.Form = Roo.form.Form;
-/*
+
+
+Roo.apply(Roo.form.Form, {
+    
+    popover : {
+        
+        padding : 5,
+        
+        isApplied : false,
+        
+        isMasked : false,
+        
+        form : false,
+        
+        target : false,
+        
+        toolTip : false,
+        
+        intervalID : false,
+        
+        maskEl : false,
+        
+        apply : function()
+        {
+            if(this.isApplied){
+                return;
+            }
+            
+            this.maskEl = {
+                top : Roo.DomHelper.append(Roo.get(document.body), { tag: "div", cls:"x-dlg-mask roo-form-top-mask" }, true),
+                left : Roo.DomHelper.append(Roo.get(document.body), { tag: "div", cls:"x-dlg-mask roo-form-left-mask" }, true),
+                bottom : Roo.DomHelper.append(Roo.get(document.body), { tag: "div", cls:"x-dlg-mask roo-form-bottom-mask" }, true),
+                right : Roo.DomHelper.append(Roo.get(document.body), { tag: "div", cls:"x-dlg-mask roo-form-right-mask" }, true)
+            };
+            
+            this.maskEl.top.enableDisplayMode("block");
+            this.maskEl.left.enableDisplayMode("block");
+            this.maskEl.bottom.enableDisplayMode("block");
+            this.maskEl.right.enableDisplayMode("block");
+            
+            this.toolTip = new Roo.bootstrap.Tooltip({
+                cls : 'roo-form-error-popover',
+                alignment : {
+                    'left' : ['r-l', [-2,0], 'right'],
+                    'right' : ['l-r', [2,0], 'left'],
+                    'bottom' : ['tl-bl', [0,2], 'top'],
+                    'top' : [ 'bl-tl', [0,-2], 'bottom']
+                }
+            });
+            
+            this.toolTip.render(Roo.get(document.body));
+
+            this.toolTip.el.enableDisplayMode("block");
+            
+            Roo.get(document.body).on('click', function(){
+                this.unmask();
+            }, this);
+            
+            Roo.get(document.body).on('touchstart', function(){
+                this.unmask();
+            }, this);
+            
+            this.isApplied = true
+        },
+        
+        mask : function(form, target)
+        {
+            this.form = form;
+            
+            this.target = target;
+            
+            if(!this.form.errorMask || !target.el){
+                return;
+            }
+            
+            var scrollable = this.target.el.findScrollableParent() || this.target.el.findParent('div.modal', 100, true) || Roo.get(document.body);
+            
+            Roo.log(scrollable);
+            
+            var ot = this.target.el.calcOffsetsTo(scrollable);
+            
+            var scrollTo = ot[1] - this.form.maskOffset;
+            
+            scrollTo = Math.min(scrollTo, scrollable.dom.scrollHeight);
+            
+            scrollable.scrollTo('top', scrollTo);
+            
+            var box = this.target.el.getBox();
+            Roo.log(box);
+            var zIndex = Roo.bootstrap.Modal.zIndex++;
+
+            
+            this.maskEl.top.setStyle('position', 'absolute');
+            this.maskEl.top.setStyle('z-index', zIndex);
+            this.maskEl.top.setSize(Roo.lib.Dom.getDocumentWidth(), box.y - this.padding);
+            this.maskEl.top.setLeft(0);
+            this.maskEl.top.setTop(0);
+            this.maskEl.top.show();
+            
+            this.maskEl.left.setStyle('position', 'absolute');
+            this.maskEl.left.setStyle('z-index', zIndex);
+            this.maskEl.left.setSize(box.x - this.padding, box.height + this.padding * 2);
+            this.maskEl.left.setLeft(0);
+            this.maskEl.left.setTop(box.y - this.padding);
+            this.maskEl.left.show();
+
+            this.maskEl.bottom.setStyle('position', 'absolute');
+            this.maskEl.bottom.setStyle('z-index', zIndex);
+            this.maskEl.bottom.setSize(Roo.lib.Dom.getDocumentWidth(), Roo.lib.Dom.getDocumentHeight() - box.bottom - this.padding);
+            this.maskEl.bottom.setLeft(0);
+            this.maskEl.bottom.setTop(box.bottom + this.padding);
+            this.maskEl.bottom.show();
+
+            this.maskEl.right.setStyle('position', 'absolute');
+            this.maskEl.right.setStyle('z-index', zIndex);
+            this.maskEl.right.setSize(Roo.lib.Dom.getDocumentWidth() - box.right - this.padding, box.height + this.padding * 2);
+            this.maskEl.right.setLeft(box.right + this.padding);
+            this.maskEl.right.setTop(box.y - this.padding);
+            this.maskEl.right.show();
+
+            this.toolTip.bindEl = this.target.el;
+
+            this.toolTip.el.setStyle('z-index', Roo.bootstrap.Modal.zIndex++);
+
+            var tip = this.target.blankText;
+
+            if(this.target.getValue() !== '' ) {
+                
+                if (this.target.invalidText.length) {
+                    tip = this.target.invalidText;
+                } else if (this.target.regexText.length){
+                    tip = this.target.regexText;
+                }
+            }
+
+            this.toolTip.show(tip);
+
+            this.intervalID = window.setInterval(function() {
+                Roo.bootstrap.Form.popover.unmask();
+            }, 10000);
+
+            window.onwheel = function(){ return false;};
+            
+            (function(){ this.isMasked = true; }).defer(500, this);
+            
+        },
+        
+        unmask : function()
+        {
+            if(!this.isApplied || !this.isMasked || !this.form || !this.target || !this.form.errorMask){
+                return;
+            }
+            
+            this.maskEl.top.setStyle('position', 'absolute');
+            this.maskEl.top.setSize(0, 0).setXY([0, 0]);
+            this.maskEl.top.hide();
+
+            this.maskEl.left.setStyle('position', 'absolute');
+            this.maskEl.left.setSize(0, 0).setXY([0, 0]);
+            this.maskEl.left.hide();
+
+            this.maskEl.bottom.setStyle('position', 'absolute');
+            this.maskEl.bottom.setSize(0, 0).setXY([0, 0]);
+            this.maskEl.bottom.hide();
+
+            this.maskEl.right.setStyle('position', 'absolute');
+            this.maskEl.right.setSize(0, 0).setXY([0, 0]);
+            this.maskEl.right.hide();
+            
+            this.toolTip.hide();
+            
+            this.toolTip.el.hide();
+            
+            window.onwheel = function(){ return true;};
+            
+            if(this.intervalID){
+                window.clearInterval(this.intervalID);
+                this.intervalID = false;
+            }
+            
+            this.isMasked = false;
+            
+        }
+        
+    }
+    
+});/*
  * Based on:
  * Ext JS Library 1.1.1
  * Copyright(c) 2006-2007, Ext JS, LLC.
index d74a6cd..cc4038a 100644 (file)
@@ -1072,7 +1072,7 @@ if(f.inputType=='radio'){if(typeof(B[f.getName()])=='undefined'){B[f.getName()]=
 }});return this;},applyToFields:function(o){this.items.each(function(f){Roo.apply(f,o);});return this;},applyIfToFields:function(o){this.items.each(function(f){Roo.applyIf(f,o);});return this;}});Roo.BasicForm=Roo.form.BasicForm;
 // Roo/form/Form.js
 Roo.form.Form=function(A){var B=[];if(A.items){B=A.items;delete A.items;}Roo.form.Form.superclass.constructor.call(this,null,A);this.url=this.url||this.action;if(!this.root){this.root=new Roo.form.Layout(Roo.applyIf({id:Roo.id()},A));}this.active=this.root;
-this.buttons=[];this.allItems=[];this.addEvents({clientvalidation:true,rendered:true});if(this.progressUrl){this.addxtype({xns:Roo.form,xtype:'Hidden',name:'UPLOAD_IDENTIFIER'});}Roo.each(B,this.addxtype,this);};Roo.extend(Roo.form.Form,Roo.form.BasicForm,{buttonAlign:'center',minButtonWidth:75,labelAlign:'left',monitorValid:false,monitorPoll:200,progressUrl:false,formData:false,column:function(c){var A=new Roo.form.Column(c);
+this.buttons=[];this.allItems=[];this.addEvents({clientvalidation:true,rendered:true});if(this.progressUrl){this.addxtype({xns:Roo.form,xtype:'Hidden',name:'UPLOAD_IDENTIFIER'});}Roo.each(B,this.addxtype,this);Roo.form.Form.popover.apply();};Roo.extend(Roo.form.Form,Roo.form.BasicForm,{buttonAlign:'center',minButtonWidth:75,labelAlign:'left',monitorValid:false,monitorPoll:200,progressUrl:false,formData:false,column:function(c){var A=new Roo.form.Column(c);
 this.start(A);if(arguments.length>1){this.add.apply(this,Array.prototype.slice.call(arguments,1));this.end();}return A;},fieldset:function(c){var fs=new Roo.form.FieldSet(c);this.start(fs);if(arguments.length>1){this.add.apply(this,Array.prototype.slice.call(arguments,1));
 this.end();}return fs;},container:function(c){var l=new Roo.form.Layout(c);this.start(l);if(arguments.length>1){this.add.apply(this,Array.prototype.slice.call(arguments,1));this.end();}return l;},start:function(c){Roo.applyIf(c,{'labelAlign':this.active.labelAlign,'labelWidth':this.active.labelWidth,'itemCls':this.active.itemCls}
 );this.active.stack.push(c);c.ownerCt=this.active;this.active=c;return this;},end:function(){if(this.active==this.root){return this;}this.active=this.active.ownerCt;return this;},add:function(){this.active.stack.push.apply(this.active.stack,arguments);this.allItems.push.apply(this.allItems,arguments);
@@ -1084,7 +1084,20 @@ for(var i=0,A=this.buttons.length;i<A;i++){var b=this.buttons[i];var td=document
 var fe=Roo.factory(ar[i],Roo.form);if(!A){A=fe;}fe.form=this;if(fe.store){fe.store.form=this;}if(fe.isLayout){this.start(fe);this.allItems.push(fe);if(fe.items&&fe.addxtype){fe.addxtype.apply(fe,fe.items);delete fe.items;}this.end();continue;}this.add(fe);
 }if(ar[i].xtype=='Button'){this.addButton(ar[i]);this.allItems.push(fe);continue;}if(ar[i].xtype=='end'){alert('end is not supported on xtype any more, use items');}}return A;},startMonitoring:function(){if(!this.bound){this.bound=true;Roo.TaskMgr.start({run:this.bindHandler,interval:this.monitorPoll||200,scope:this}
 );}},stopMonitoring:function(){this.bound=false;},bindHandler:function(){if(!this.bound){return false;}var A=true;this.items.each(function(f){if(!f.isValid(true)){A=false;return false;}});for(var i=0,B=this.buttons.length;i<B;i++){var C=this.buttons[i];if(C.formBind===true&&C.disabled===A){C.setDisabled(!A);
-}}this.fireEvent('clientvalidation',this,A);}});Roo.Form=Roo.form.Form;
+}}this.fireEvent('clientvalidation',this,A);}});Roo.Form=Roo.form.Form;Roo.apply(Roo.form.Form,{popover:{padding:5,isApplied:false,isMasked:false,form:false,target:false,toolTip:false,intervalID:false,maskEl:false,apply:function(){if(this.isApplied){return;
+}this.maskEl={top:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-top-mask"},true),left:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-left-mask"},true),bottom:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-bottom-mask"}
+,true),right:Roo.DomHelper.append(Roo.get(document.body),{tag:"div",cls:"x-dlg-mask roo-form-right-mask"},true)};this.maskEl.top.enableDisplayMode("block");this.maskEl.left.enableDisplayMode("block");this.maskEl.bottom.enableDisplayMode("block");this.maskEl.right.enableDisplayMode("block");
+this.toolTip=new Roo.bootstrap.Tooltip({cls:'roo-form-error-popover',alignment:{'left':['r-l',[-2,0],'right'],'right':['l-r',[2,0],'left'],'bottom':['tl-bl',[0,2],'top'],'top':['bl-tl',[0,-2],'bottom']}});this.toolTip.render(Roo.get(document.body));this.toolTip.el.enableDisplayMode("block");
+Roo.get(document.body).on('click',function(){this.unmask();},this);Roo.get(document.body).on('touchstart',function(){this.unmask();},this);this.isApplied=true},mask:function(A,B){this.form=A;this.target=B;if(!this.form.errorMask||!B.el){return;}var C=this.target.el.findScrollableParent()||this.target.el.findParent('div.modal',100,true)||Roo.get(document.body);
+Roo.log(C);var ot=this.target.el.calcOffsetsTo(C);var D=ot[1]-this.form.maskOffset;D=Math.min(D,C.dom.scrollHeight);C.scrollTo('top',D);var E=this.target.el.getBox();Roo.log(E);var F=Roo.bootstrap.Modal.zIndex++;this.maskEl.top.setStyle('position','absolute');
+this.maskEl.top.setStyle('z-index',F);this.maskEl.top.setSize(Roo.lib.Dom.getDocumentWidth(),E.y-this.padding);this.maskEl.top.setLeft(0);this.maskEl.top.setTop(0);this.maskEl.top.show();this.maskEl.left.setStyle('position','absolute');this.maskEl.left.setStyle('z-index',F);
+this.maskEl.left.setSize(E.x-this.padding,E.height+this.padding*2);this.maskEl.left.setLeft(0);this.maskEl.left.setTop(E.y-this.padding);this.maskEl.left.show();this.maskEl.bottom.setStyle('position','absolute');this.maskEl.bottom.setStyle('z-index',F);this.maskEl.bottom.setSize(Roo.lib.Dom.getDocumentWidth(),Roo.lib.Dom.getDocumentHeight()-E.bottom-this.padding);
+this.maskEl.bottom.setLeft(0);this.maskEl.bottom.setTop(E.bottom+this.padding);this.maskEl.bottom.show();this.maskEl.right.setStyle('position','absolute');this.maskEl.right.setStyle('z-index',F);this.maskEl.right.setSize(Roo.lib.Dom.getDocumentWidth()-E.right-this.padding,E.height+this.padding*2);
+this.maskEl.right.setLeft(E.right+this.padding);this.maskEl.right.setTop(E.y-this.padding);this.maskEl.right.show();this.toolTip.bindEl=this.target.el;this.toolTip.el.setStyle('z-index',Roo.bootstrap.Modal.zIndex++);var G=this.target.blankText;if(this.target.getValue()!==''){if(this.target.invalidText.length){G=this.target.invalidText;
+}else if(this.target.regexText.length){G=this.target.regexText;}}this.toolTip.show(G);this.intervalID=window.setInterval(function(){Roo.bootstrap.Form.popover.unmask();},10000);window.onwheel=function(){return false;};(function(){this.isMasked=true;}).defer(500,this);
+},unmask:function(){if(!this.isApplied||!this.isMasked||!this.form||!this.target||!this.form.errorMask){return;}this.maskEl.top.setStyle('position','absolute');this.maskEl.top.setSize(0,0).setXY([0,0]);this.maskEl.top.hide();this.maskEl.left.setStyle('position','absolute');
+this.maskEl.left.setSize(0,0).setXY([0,0]);this.maskEl.left.hide();this.maskEl.bottom.setStyle('position','absolute');this.maskEl.bottom.setSize(0,0).setXY([0,0]);this.maskEl.bottom.hide();this.maskEl.right.setStyle('position','absolute');this.maskEl.right.setSize(0,0).setXY([0,0]);
+this.maskEl.right.hide();this.toolTip.hide();this.toolTip.el.hide();window.onwheel=function(){return true;};if(this.intervalID){window.clearInterval(this.intervalID);this.intervalID=false;}this.isMasked=false;}}});
 // Roo/form/Action.js
 Roo.namespace('Roo.form');Roo.form.Action=function(A,B){this.form=A;this.options=B||{};};Roo.form.Action.CLIENT_INVALID='client';Roo.form.Action.SERVER_INVALID='server';Roo.form.Action.CONNECT_FAILURE='connect';Roo.form.Action.LOAD_FAILURE='load';Roo.form.Action.prototype={type:'default',failureType:undefined,response:undefined,result:undefined,run:function(A){}
 ,success:function(A){},handleResponse:function(A){},failure:function(A){this.response=A;this.failureType=Roo.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false);},processResponse:function(A){this.response=A;if(!A.responseText){return true;}this.result=this.handleResponse(A);