From: Alan Knowles Date: Thu, 28 Jan 2021 08:48:14 +0000 (+0800) Subject: roojs-bootstrap.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=a9c353dd86fd10f17b74dad8ea4d0ce4409ff027 roojs-bootstrap.js roojs-bootstrap-debug.js Roo/bootstrap/Popover.js --- diff --git a/Roo/bootstrap/Popover.js b/Roo/bootstrap/Popover.js index 78eb21d927..8c6455385c 100644 --- a/Roo/bootstrap/Popover.js +++ b/Roo/bootstrap/Popover.js @@ -132,6 +132,9 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, { onRender : function(ct, position) { Roo.bootstrap.Component.superclass.onRender.call(this, ct, position); + + + if(!this.el){ var cfg = Roo.apply({}, this.getAutoCreate()); cfg.id = Roo.id(); @@ -147,6 +150,9 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, { // Roo.log(this.el); } + this.contentEl = this.el.select('.popover-content',true).first(); + this.headerEl = this.el.select('.popover-title',true).first(); + var nitems = []; if(typeof(this.items) != 'undefined'){ var items = this.items; @@ -163,8 +169,6 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, { Roo.EventManager.onWindowResize(this.resizeMask, this, true); - this.contentEl = this.el.select('.popover-content',true).first(); - this.headerEl = this.el.select('.popover-title',true).first(); this.initEvents(); }, diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 5325970db5..1723ce0a21 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -19723,6 +19723,10 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, { onRender : function(ct, position) { Roo.bootstrap.Component.superclass.onRender.call(this, ct, position); + + this.contentEl = this.el.select('.popover-content',true).first(); + this.headerEl = this.el.select('.popover-title',true).first(); + if(!this.el){ var cfg = Roo.apply({}, this.getAutoCreate()); cfg.id = Roo.id(); @@ -19754,8 +19758,6 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, { Roo.EventManager.onWindowResize(this.resizeMask, this, true); - this.contentEl = this.el.select('.popover-content',true).first(); - this.headerEl = this.el.select('.popover-header',true).first(); this.initEvents(); }, diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 7fa61458d7..56b5e9cb19 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -812,9 +812,9 @@ var A=this;if(this.store.getCount()>0){this.store.data.each(function(d){A.addIte Roo.bootstrap.Popover=function(A){Roo.bootstrap.Popover.superclass.constructor.call(this,A);this.addEvents({"show":true,"hide":true});};Roo.extend(Roo.bootstrap.Popover,Roo.bootstrap.Component,{title:false,html:false,placement:'right',trigger:'hover',modal:false,delay:0,over:false,can_build_overlaid:false,maskEl:false,headerEl:false,contentEl:false,getChildContainer:function(){return this.contentEl; },getPopoverHeader:function(){this.title=true;return this.headerEl},getAutoCreate:function(){var A={cls:'popover roo-dynamic shadow roo-popover'+(this.modal?'-modal':''),style:'display:block',cn:[{cls:'arrow'},{cls:'popover-inner ',cn:[{tag:'h3',cls:'popover-title popover-header',html:this.title===false?'':this.title} ,{cls:'popover-content popover-body '+(this.cls||''),html:this.html||''}]}]};return A;},setTitle:function(A){this.title=A;if(this.el){this.headerEl.dom.innerHTML=A;}},setContent:function(A){this.html=A;if(this.contentEl){this.contentEl.dom.innerHTML=A;}},onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A); -if(!this.el){var B=Roo.apply({},this.getAutoCreate());B.id=Roo.id();if(this.cls){B.cls+=' '+this.cls;}if(this.style){B.style=this.style;}this.el=Roo.get(document.body).createChild(B,A);}var C=[];if(typeof(this.items)!='undefined'){var D=this.items;delete this.items; -for(var i=0;i