From f538e7a77d1724017a114094112d75de1cee2296 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 28 Jan 2021 16:14:28 +0800 Subject: [PATCH] roojs-bootstrap.js roojs-bootstrap-debug.js Roo/bootstrap/Popover.js --- Roo/bootstrap/Popover.js | 2 +- roojs-bootstrap-debug.js | 6 +++--- roojs-bootstrap.js | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Roo/bootstrap/Popover.js b/Roo/bootstrap/Popover.js index 97dcebed42..64c2e5479e 100644 --- a/Roo/bootstrap/Popover.js +++ b/Roo/bootstrap/Popover.js @@ -282,7 +282,7 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, { 'bs-popover-top','bs-popover-bottom', 'bs-popover-left', 'bs-popover-right' ]); - if (!this.title.length) { + if (this.title === false) { this.headerEl.hide(); } diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index ccb7e8e33e..930b9ceaaf 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -19775,7 +19775,7 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, { } - this.headerEl.setVisibilityMode(Roo.Element.DISPLAY); + this.headerEl.setVisibilityMode(Roo.Element.DISPLAY); // probably not needed as it's default in BS4 this.el.enableDisplayMode('block'); this.el.hide(); if (this.over === false && !this.parent()) { @@ -19873,8 +19873,8 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, { 'bs-popover-top','bs-popover-bottom', 'bs-popover-left', 'bs-popover-right' ]); - if (!this.title.length) { - this.el.select('.popover-title',true).hide(); + if (this.title === false) { + this.headerEl.hide(); } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 5b2872f201..835f7b6b73 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -820,10 +820,10 @@ var B=this.trigger?this.trigger.split(' '):[];Roo.each(B,function(C){if(C=='clic }},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){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.length){this.el.select('.popover-title',true).hide();}var B=typeof this.placement=='function'?this.placement.call(this,this.el,A):this.placement;this.el.show();this.el.dom.style.display='block';var p=this.getPosition();var C=this.el.getBox(); -var D=Roo.bootstrap.Popover.alignment[B];this.el.addClass(D[2]);if(A){this.el.alignTo(A,D[0],D[1]);}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'); -if(this.el.hasClass('fade')){}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);},hide:function(){this.el.setXY([0,0]);this.el.removeClass('in');this.el.hide();this.hoverState=null;this.maskEl.hide();this.fireEvent('hide',this);}});Roo.apply(Roo.bootstrap.Popover,{alignment:{'left':['r-l',[-10,0],'left bs-popover-left'],'right':['l-br',[10,0],'right bs-popover-right'],'bottom':['t-b',[0,10],'top bs-popover-top'],'top':['b-t',[0,-10],'bottom bs-popover-bottom']} +if(this.title===false){this.headerEl.hide();}var B=typeof this.placement=='function'?this.placement.call(this,this.el,A):this.placement;this.el.show();this.el.dom.style.display='block';var p=this.getPosition();var C=this.el.getBox();var D=Roo.bootstrap.Popover.alignment[B]; +this.el.addClass(D[2]);if(A){this.el.alignTo(A,D[0],D[1]);}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');if(this.el.hasClass('fade')){} +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);},hide:function(){this.el.setXY([0,0]);this.el.removeClass('in');this.el.hide();this.hoverState=null;this.maskEl.hide();this.fireEvent('hide',this);}});Roo.apply(Roo.bootstrap.Popover,{alignment:{'left':['r-l',[-10,0],'left bs-popover-left'],'right':['l-br',[10,0],'right bs-popover-right'],'bottom':['t-b',[0,10],'top bs-popover-top'],'top':['b-t',[0,-10],'bottom bs-popover-bottom']} ,zIndex:20001,clickHander:false,onMouseDown:function(e){if(!e.getTarget(".roo-popover")){this.hideAll();}},popups:[],register:function(A){if(!Roo.bootstrap.Popover.clickHandler){Roo.bootstrap.Popover.clickHandler=Roo.get(document).on("mousedown",Roo.bootstrap.Popover.onMouseDown,Roo.bootstrap.Popover); }this.hideAll();this.popups.push(A);},hideAll:function(){this.popups.forEach(function(p){p.hide();});}}); // Roo/bootstrap/Progress.js -- 2.39.2