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
e001c18
..
031926d
100644
(file)
--- a/
Roo/bootstrap/Popover.js
+++ b/
Roo/bootstrap/Popover.js
@@
-276,12
+276,12
@@
Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, {
if (this.parent() && (this.over == 'parent' || (this.over === false))) {
on_el = this.parent().el;
} else if (this.over) {
if (this.parent() && (this.over == 'parent' || (this.over === false))) {
on_el = this.parent().el;
} else if (this.over) {
- Roo.get(this.over);
+
on_el =
Roo.get(this.over);
}
}
}
}
- this.alignEl =
on_el
;
+ this.alignEl =
Roo.get( on_el )
;
if (!this.el) {
this.render(document.body);
if (!this.el) {
this.render(document.body);
@@
-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