projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eaa7b28
)
Roo/bootstrap/Popover.js
author
Alan Knowles
<alan@roojs.com>
Thu, 11 Feb 2021 03:46:43 +0000
(11:46 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 11 Feb 2021 03:46:43 +0000
(11:46 +0800)
Roo/bootstrap/Popover.js
patch
|
blob
|
history
diff --git
a/Roo/bootstrap/Popover.js
b/Roo/bootstrap/Popover.js
index
fd23720
..
b77309d
100644
(file)
--- a/
Roo/bootstrap/Popover.js
+++ b/
Roo/bootstrap/Popover.js
@@
-63,7
+63,7
@@
Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, {
maskEl : false, // the mask element
headerEl : false,
contentEl : false,
maskEl : false, // the mask element
headerEl : false,
contentEl : false,
-
+ alignEl : false, // when show is called with an element - this get's stored.
getChildContainer : function()
{
getChildContainer : function()
{
@@
-267,12
+267,11
@@
Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, {
* @param {Roo.Element|string|Boolean} - element to align and point to. (set align to [ pos, offset ])
* @param {string} (left|right|top|bottom) position
*/
* @param {Roo.Element|string|Boolean} - element to align and point to. (set align to [ pos, offset ])
* @param {string} (left|right|top|bottom) position
*/
- show : function (on_el)
+ show : function (on_el
, placement
)
{
{
-
+ this.placement = typeof(placement) == 'undefined' ? this.placement : placement;
on_el = on_el || false; // default to false
on_el = on_el || false; // default to false
- var align = on_el && typeof(on_el._align) != 'undefined' ? on_el._align : false;
-
+
if (!on_el) {
if (this.parent() && (this.over == 'parent' || (this.over === false))) {
on_el = this.parent().el;
if (!on_el) {
if (this.parent() && (this.over == 'parent' || (this.over === false))) {
on_el = this.parent().el;
@@
-296,10
+295,8
@@
Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, {
this.headerEl.hide();
}
this.headerEl.hide();
}
+ // why make it so complicated... - we used to support functional calls for this .. why ?
- var placement = typeof this.placement == 'function' ?
- this.placement.call(this, this.el, on_el) :
- this.placement;
/*
var autoToken = /\s?auto?\s?/i; /// not sure how this was supposed to work? right auto ? what?
/*
var autoToken = /\s?auto?\s?/i; /// not sure how this was supposed to work? right auto ? what?
@@
-322,13
+319,9
@@
Roo.extend(Roo.bootstrap.Popover, Roo.bootstrap.Component, {
var box = this.el.getBox();
var box = this.el.getBox();
- this.alignment = align || Roo.bootstrap.Popover.alignment[placement];
- this.el.addClass(this.alignment[2]);
-
-// Roo.log(align);
+ this.el.addClass(placement + ' roo-popover-' + placement);
if (on_el) {
if (on_el) {
- this.alignEl = on_el;
this.updatePosition();
} else {
this.updatePosition();
} else {