roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Wed, 27 Jan 2021 09:38:34 +0000 (17:38 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 27 Jan 2021 09:38:34 +0000 (17:38 +0800)
roojs-bootstrap-debug.js
examples/bootstrap4/popover.html

examples/bootstrap4/popover.html
roojs-bootstrap-debug.js
roojs-bootstrap.js

index ef6eb3a..38899ca 100644 (file)
@@ -15,7 +15,8 @@
         
     <script type="text/javascript" src="../../roojs-core-debug.js"></script>
     <script type="text/javascript" src="../../roojs-bootstrap-debug.js"></script>
-   
+    <script type="text/javascript" src="../../Roo/bootstrap/Popover.js"></script>
+
          <script type="text/javascript">
             rootURL = '/';
          </script>
index 4b764a7..fd632c7 100644 (file)
@@ -19806,7 +19806,7 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component,  {
         }
         
         if (!this.el) {
-            this.render();
+            this.render(document.body);
         }
         
         // set content.
index 49079c0..f9369f6 100644 (file)
@@ -817,7 +817,7 @@ i++){C.push(this.addxtype(Roo.apply({},D[i])));}}this.items=C;this.initEvents();
 }if(this.triggers===false){return;}var A=(this.over=='parent')?this.parent().el:Roo.get(this.over);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){if(!A){A=(this.over=='parent')?this.parent().el:Roo.get(this.over);}if(!this.el){this.render();}this.el.select('.popover-title',true).first().dom.innerHtml=this.title;
+return;}var _t=this;this.timeout=setTimeout(function(){if(_t.hoverState=='out'){_t.hide();}},this.delay.hide)},show:function(A){if(!A){A=(this.over=='parent')?this.parent().el:Roo.get(this.over);}if(!this.el){this.render(document.body);}this.el.select('.popover-title',true).first().dom.innerHtml=this.title;
 if(this.html!==false){this.el.select('.popover-content',true).first().dom.innerHtml=this.html;}this.el.removeClass(['fade','top','bottom','left','right','in','bs-popover-top','bs-popover-bottom','bs-popover-left','bs-popover-right']);if(!this.title.length){this.el.select('.popover-title',true).hide();
 }var B=typeof this.placement=='function'?this.placement.call(this,this.el,A):this.placement;var C=/\s?auto?\s?/i;var D=C.test(B);if(D){B=B.replace(C,'')||'top';}this.el.show();this.el.dom.style.display='block';var p=this.getPosition();var E=this.el.getBox();
 if(D){}var F=Roo.bootstrap.Popover.alignment[B];this.el.addClass(F[2]);this.el.alignTo(A,F[0],F[1]);this.el.addClass('in');if(this.el.hasClass('fade')){}this.hoverState='in';this.fireEvent('show',this);},hide:function(){this.el.setXY([0,0]);this.el.removeClass('in');