roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Thu, 11 Feb 2021 04:09:25 +0000 (12:09 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 11 Feb 2021 04:09:25 +0000 (12:09 +0800)
roojs-bootstrap-debug.js
Roo/bootstrap/Popover.js

Roo/bootstrap/Popover.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 061971e..bc7b520 100644 (file)
@@ -286,10 +286,7 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component,  {
         }
         
         
-        this.el.removeClass([
-            'fade','top','bottom', 'left', 'right','in',
-            'bs-popover-top','bs-popover-bottom', 'bs-popover-left', 'bs-popover-right'
-        ]);
+         
         
         if (this.title === false) {
             this.headerEl.hide();
@@ -300,10 +297,9 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component,  {
         this.el.dom.style.display = 'block';
          
         
-        this.el.addClass(placement + ' roo-popover-' + placement);
-
         if (on_el) {
-            this.updatePosition();
+            this.updatePosition(placement);
              
         } else {
             // this is usually just done by the builder = to show the popoup in the middle of the scren.
index 3294f2c..85f9c9f 100644 (file)
@@ -19882,10 +19882,7 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component,  {
         }
         
         
-        this.el.removeClass([
-            'fade','top','bottom', 'left', 'right','in',
-            'bs-popover-top','bs-popover-bottom', 'bs-popover-left', 'bs-popover-right'
-        ]);
+         
         
         if (this.title === false) {
             this.headerEl.hide();
@@ -19896,10 +19893,9 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component,  {
         this.el.dom.style.display = 'block';
          
         
-        this.el.addClass(placement + ' roo-popover-' + placement);
-
         if (on_el) {
-            this.updatePosition();
+            this.updatePosition(placement);
              
         } else {
             // this is usually just done by the builder = to show the popoup in the middle of the scren.
index 8571ca6..4a62b51 100644 (file)
@@ -819,10 +819,9 @@ this.headerEl.setVisibilityMode(Roo.Element.DISPLAY);this.el.enableDisplayMode('
 var B=this.trigger?this.trigger.split(' '):[];Roo.each(B,function(C){if(C=='click'){A.on('click',this.toggle,this);}else if(C!='manual'){var D=C=='hover'?'mouseenter':'focusin';var E=C=='hover'?'mouseleave':'focusout';A.on(D,this.enter,this);A.on(E,this.leave,this);
 }},this);},timeout:null,hoverState:null,toggle:function(){this.hoverState=='in'?this.leave():this.enter();},enter:function(){clearTimeout(this.timeout);this.hoverState='in';if(!this.delay||!this.delay.show){this.show();return;}var _t=this;this.timeout=setTimeout(function(){if(_t.hoverState=='in'){_t.show();
 }},this.delay.show)},leave:function(){clearTimeout(this.timeout);this.hoverState='out';if(!this.delay||!this.delay.hide){this.hide();return;}var _t=this;this.timeout=setTimeout(function(){if(_t.hoverState=='out'){_t.hide();}},this.delay.hide)},show:function(A,B){this.placement=typeof(B)=='undefined'?this.placement:B;
-A=A||false;if(!A){if(this.parent()&&(this.over=='parent'||(this.over===false))){A=this.parent().el;}else if(this.over){Roo.get(this.over);}}if(!this.el){this.render(document.body);}this.el.removeClass(['fade','top','bottom','left','right','in','bs-popover-top','bs-popover-bottom','bs-popover-left','bs-popover-right']);
-if(this.title===false){this.headerEl.hide();}this.el.show();this.el.dom.style.display='block';this.el.addClass(B+' roo-popover-'+B);if(A){this.updatePosition();}else{var es=this.el.getSize();var x=Roo.lib.Dom.getViewWidth()/2;var y=Roo.lib.Dom.getViewHeight()/2;
-this.el.setXY([x-(es.width/2),y-(es.height/2)]);}this.el.addClass('in');this.hoverState='in';if(this.modal){this.maskEl.setSize(Roo.lib.Dom.getViewWidth(true),Roo.lib.Dom.getViewHeight(true));this.maskEl.setStyle('z-index',Roo.bootstrap.Popover.zIndex++);
-this.maskEl.dom.style.display='block';this.maskEl.addClass('show');}this.el.setStyle('z-index',Roo.bootstrap.Popover.zIndex++);this.fireEvent('show',this);},updatePosition:function(A,B){this.el.removeClass(['fade','top','bottom','left','right','in','bs-popover-top','bs-popover-bottom','bs-popover-left','bs-popover-right']);
+A=A||false;if(!A){if(this.parent()&&(this.over=='parent'||(this.over===false))){A=this.parent().el;}else if(this.over){Roo.get(this.over);}}if(!this.el){this.render(document.body);}if(this.title===false){this.headerEl.hide();}this.el.show();this.el.dom.style.display='block';
+if(A){this.updatePosition(B);}else{var es=this.el.getSize();var x=Roo.lib.Dom.getViewWidth()/2;var y=Roo.lib.Dom.getViewHeight()/2;this.el.setXY([x-(es.width/2),y-(es.height/2)]);}this.el.addClass('in');this.hoverState='in';if(this.modal){this.maskEl.setSize(Roo.lib.Dom.getViewWidth(true),Roo.lib.Dom.getViewHeight(true));
+this.maskEl.setStyle('z-index',Roo.bootstrap.Popover.zIndex++);this.maskEl.dom.style.display='block';this.maskEl.addClass('show');}this.el.setStyle('z-index',Roo.bootstrap.Popover.zIndex++);this.fireEvent('show',this);},updatePosition:function(A,B){this.el.removeClass(['fade','top','bottom','left','right','in','bs-popover-top','bs-popover-bottom','bs-popover-left','bs-popover-right']);
 this.el.addClass(A+' roo-popover-'+A);if(!this.alignEl){return false;}switch(A){case 'right':var C=this.el.getAlignToXY(this.alignEl,'tl-tr',[10,0]);var D=this.el.getAlignToXY(this.alignEl,'tl-tr?',[10,0]);if(!B||C.equals(D)||C[0]==D[0]){this.setXY(D);var xy=this.alignEl.getAnchorXY('tr',false);
 xy[0]+=2;xy[1]+=5;this.arrowEl.setXY(xy);return true;}B=false;case 'left':var C=this.el.getAlignToXY(this.alignEl,'tr-tl',[-10,0]);var D=this.el.getAlignToXY(this.alignEl,'tr-tl?',[-10,0]);if(!B||C.equals(D)||C[0]==D[0]){this.setXY(D);var xy=this.alignEl.getAnchorXY('tl',false);
 xy[0]+=2;xy[1]+=5;this.arrowEl.setXY(xy);return true;}return this.updatePosition('right',false);case 'top':var C=this.el.getAlignToXY(this.alignEl,'t-b',[0,-10]);var D=this.el.getAlignToXY(this.alignEl,'t-b?',[0,-10]);if(!B||C.equals(D)||C[1]==D[1]){this.setXY(D);