roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Wed, 27 Jan 2021 09:49:26 +0000 (17:49 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 27 Jan 2021 09:49:26 +0000 (17:49 +0800)
roojs-bootstrap-debug.js
Roo/bootstrap/Popover.js

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

index a22b9c1..6b1cffc 100644 (file)
@@ -306,19 +306,18 @@ Roo.apply(Roo.bootstrap.Popover, {
         if (!e.getTarget(".roo-popup")) {
             this.hideAll();
         }
-        
-        
+         
     },
     
     popups : [],
     
     register : function(popup)
     {
-        if (this.clickHandler = false) {
+        if (this.clickHandler === false) {
             this.clickHandler = Roo.get(document).un("mousedown", this.onMouseDown, this);
         }
         // hide other popups.
-        this.popups.each(function(p) { p.hide()); })
+        this.hideAll();
         this.popups.push(popup);
     },
     hideAll : function()
index 73066af..2d893db 100644 (file)
@@ -19879,12 +19879,45 @@ Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component,  {
     
 });
 
-Roo.bootstrap.Popover.alignment = {
-    'left' : ['r-l', [-10,0], 'right bs-popover-right'],
-    'right' : ['l-r', [10,0], 'left bs-popover-left'],
-    'bottom' : ['t-b', [0,10], 'top bs-popover-top'],
-    'top' : [ 'b-t', [0,-10], 'bottom bs-popover-bottom']
-};
+
+Roo.apply(Roo.bootstrap.Popover, {
+
+    alignment : {
+        'left' : ['r-l', [-10,0], 'right bs-popover-right'],
+        'right' : ['l-r', [10,0], 'left bs-popover-left'],
+        'bottom' : ['t-b', [0,10], 'top bs-popover-top'],
+        'top' : [ 'b-t', [0,-10], 'bottom bs-popover-bottom']
+    },
+
+    clickHander : false,
+    
+
+    onMouseDown : function(e)
+    {
+        if (!e.getTarget(".roo-popup")) {
+            this.hideAll();
+        }
+        
+        
+    },
+    
+    popups : [],
+    
+    register : function(popup)
+    {
+        if (this.clickHandler === false) {
+            this.clickHandler = Roo.get(document).un("mousedown", this.onMouseDown, this);
+        }
+        // hide other popups.
+        this.hideAll();
+        this.popups.push(popup);
+    },
+    hideAll : function()
+    {
+        this.popups.each(function(p) {
+            p.hide());
+        })
+    }
 
  /*
  * - LGPL
index 1df5045..028256b 100644 (file)
@@ -821,8 +821,9 @@ return;}var _t=this;this.timeout=setTimeout(function(){if(_t.hoverState=='out'){
 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');
-this.el.hide();this.hoverState=null;this.fireEvent('hide',this);}});Roo.bootstrap.Popover.alignment={'left':['r-l',[-10,0],'right bs-popover-right'],'right':['l-r',[10,0],'left bs-popover-left'],'bottom':['t-b',[0,10],'top bs-popover-top'],'top':['b-t',[0,-10],'bottom bs-popover-bottom']}
-;
+this.el.hide();this.hoverState=null;this.fireEvent('hide',this);}});Roo.apply(Roo.bootstrap.Popover,{alignment:{'left':['r-l',[-10,0],'right bs-popover-right'],'right':['l-r',[10,0],'left bs-popover-left'],'bottom':['t-b',[0,10],'top bs-popover-top'],'top':['b-t',[0,-10],'bottom bs-popover-bottom']}
+,clickHander:false,onMouseDown:function(e){if(!e.getTarget(".roo-popup")){this.hideAll();}},popups:[],register:function(popup){if(this.clickHandler===false){this.clickHandler=Roo.get(document).un("mousedown",this.onMouseDown,this);}this.hideAll();this.popups.push(popup);
+},hideAll:function(){this.popups.each(function(p){p.hide());})}
 // Roo/bootstrap/Progress.js
 Roo.bootstrap.Progress=function(A){Roo.bootstrap.Progress.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Progress,Roo.bootstrap.Component,{striped:false,active:false,getAutoCreate:function(){var A={tag:'div',cls:'progress'};if(this.striped){A.cls+=' progress-striped';
 }if(this.active){A.cls+=' active';}return A;}});