|
|
@ -10,6 +10,9 @@ BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
NORMAL: "normal", |
|
|
|
NORMAL: "normal", |
|
|
|
BIG: "big", |
|
|
|
BIG: "big", |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
MAX_HEIGHT: 600, |
|
|
|
|
|
|
|
BODY_TGAP: 10, |
|
|
|
|
|
|
|
BODY_HGAP: 20, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
props: { |
|
|
@ -17,7 +20,6 @@ BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
size: "normal", // small, normal, big
|
|
|
|
size: "normal", // small, normal, big
|
|
|
|
logic: { |
|
|
|
logic: { |
|
|
|
dynamic: false, |
|
|
|
dynamic: false, |
|
|
|
maxHeight: 600, |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
header: null, |
|
|
|
header: null, |
|
|
|
headerHeight: 40, |
|
|
|
headerHeight: 40, |
|
|
@ -29,6 +31,7 @@ BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
var self = this; var o = this.options; |
|
|
|
var self = this; var o = this.options; |
|
|
|
|
|
|
|
var c = this._constant; |
|
|
|
this.startX = 0; |
|
|
|
this.startX = 0; |
|
|
|
this.startY = 0; |
|
|
|
this.startY = 0; |
|
|
|
var size = this._calculateSize(); |
|
|
|
var size = this._calculateSize(); |
|
|
@ -87,28 +90,31 @@ BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
height: o.headerHeight, |
|
|
|
height: o.headerHeight, |
|
|
|
}, |
|
|
|
}, |
|
|
|
height: o.headerHeight, |
|
|
|
height: o.headerHeight, |
|
|
|
}, { |
|
|
|
}, o.logic.dynamic ? { |
|
|
|
el: o.logic.dynamic ? { |
|
|
|
el: { |
|
|
|
type: "bi.vertical", |
|
|
|
type: "bi.vertical", |
|
|
|
scrolly: false, |
|
|
|
scrolly: true, |
|
|
|
cls: "popover-body", |
|
|
|
cls: "popover-body", |
|
|
|
ref: function () { |
|
|
|
ref: function () { |
|
|
|
self.body = this; |
|
|
|
self.body = this; |
|
|
|
}, |
|
|
|
}, |
|
|
|
hgap: 20, |
|
|
|
css: { |
|
|
|
tgap: 10, |
|
|
|
"max-height": this._constant.MAX_HEIGHT - o.headerHeight - (o.footer ? o.footerHeight : 0) - c.BODY_TGAP - 2, |
|
|
|
|
|
|
|
}, |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
el: BI.extend({}, o.body, { |
|
|
|
el: o.body, |
|
|
|
extraCls: "dynamic-height-limit-layout-" + size.type, |
|
|
|
|
|
|
|
}), |
|
|
|
|
|
|
|
}], |
|
|
|
}], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
hgap: c.BODY_HGAP, |
|
|
|
|
|
|
|
tgap: c.BODY_TGAP, |
|
|
|
} : { |
|
|
|
} : { |
|
|
|
|
|
|
|
el: { |
|
|
|
type: "bi.absolute", |
|
|
|
type: "bi.absolute", |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
el: o.body, |
|
|
|
el: o.body, |
|
|
|
left: 20, |
|
|
|
left: c.BODY_HGAP, |
|
|
|
top: 10, |
|
|
|
top: c.BODY_TGAP, |
|
|
|
right: 20, |
|
|
|
right: c.BODY_HGAP, |
|
|
|
bottom: 0, |
|
|
|
bottom: 0, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|