projects
/
roojs1
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix popover issue
[roojs1]
/
Roo
/
bootstrap
/
Popover.js
diff --git
a/Roo/bootstrap/Popover.js
b/Roo/bootstrap/Popover.js
index
bcdc781
..
031926d
100644
(file)
--- a/
Roo/bootstrap/Popover.js
+++ b/
Roo/bootstrap/Popover.js
@@
-444,15
+444,18
@@
Roo.apply(Roo.bootstrap.Popover, {
clickHander : false,
clickHander : false,
+
onMouseDown : function(e)
{
onMouseDown : function(e)
{
- if (!e.getTarget(".roo-popover")) {
+ if (this.popups.length && !e.getTarget(".roo-popover")) {
+ /// what is nothing is showing..
this.hideAll();
}
},
this.hideAll();
}
},
+
popups : [],
register : function(popup)
popups : [],
register : function(popup)
@@
-461,14
+464,22
@@
Roo.apply(Roo.bootstrap.Popover, {
Roo.bootstrap.Popover.clickHandler = Roo.get(document).on("mousedown", Roo.bootstrap.Popover.onMouseDown, Roo.bootstrap.Popover);
}
// hide other popups.
Roo.bootstrap.Popover.clickHandler = Roo.get(document).on("mousedown", Roo.bootstrap.Popover.onMouseDown, Roo.bootstrap.Popover);
}
// hide other popups.
- this.hideAll();
- this.popups.push(popup);
+ popup.on('show', Roo.bootstrap.Popover.onShow, popup);
+ popup.on('hide', Roo.bootstrap.Popover.onHide, popup);
+ this.hideAll(); //<< why?
+ //this.popups.push(popup);
},
hideAll : function()
{
this.popups.forEach(function(p) {
p.hide();
});
},
hideAll : function()
{
this.popups.forEach(function(p) {
p.hide();
});
- }
+ },
+ onShow : function() {
+ Roo.bootstrap.Popover.popups.push(this);
+ },
+ onHide : function() {
+ Roo.bootstrap.Popover.popups.remove(this);
+ }
});
\ No newline at end of file
});
\ No newline at end of file