From: Edward Date: Tue, 23 Apr 2019 09:03:09 +0000 (+0800) Subject: roojs-ui.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=78719fffd32b165dee7501b75578a192dbacabc0 roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js --- diff --git a/roojs-all.js b/roojs-all.js index adfb13fa4f..f9aa7b9242 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -1941,7 +1941,6 @@ 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.apply(Roo.form.BasicForm,{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); diff --git a/roojs-debug.js b/roojs-debug.js index 54bc3e6807..adf1f14680 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -47510,19 +47510,19 @@ Roo.apply(Roo.form.BasicForm, { 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"); +// 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(); diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index b6c37a4cf7..7845a720df 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -25059,19 +25059,19 @@ Roo.apply(Roo.form.BasicForm, { 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"); +// 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(); diff --git a/roojs-ui.js b/roojs-ui.js index 08e585c1a1..8326e84318 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -1072,7 +1072,6 @@ 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.apply(Roo.form.BasicForm,{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);