|
|
|
@ -50,12 +50,14 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
var fn = function (e) { |
|
|
|
|
function fn (e) { |
|
|
|
|
e.stopPropagation(); |
|
|
|
|
}, stop = function (e) { |
|
|
|
|
} |
|
|
|
|
function stop (e) { |
|
|
|
|
e.stopEvent(); |
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
this.element.css({ |
|
|
|
|
"z-index": BI.zIndex_popup, |
|
|
|
|
"min-width": BI.isNumeric(o.minWidth) ? (o.minWidth / BI.pixRatio + BI.pixUnit) : o.minWidth, |
|
|
|
@ -108,7 +110,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
type: "bi.absolute", |
|
|
|
|
cls: "bi-bubble-arrow-wrapper", |
|
|
|
|
items: [{ |
|
|
|
|
el: this.arrow, |
|
|
|
|
el: this.arrow |
|
|
|
|
}] |
|
|
|
|
}); |
|
|
|
|
// 因为三角符号的原因位置变大了,需要占位
|
|
|
|
@ -121,7 +123,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
items: [{ |
|
|
|
|
el: this.arrowWrapper, |
|
|
|
|
left: 0, |
|
|
|
|
top: 0, |
|
|
|
|
top: 0 |
|
|
|
|
}, { |
|
|
|
|
el: this.placeholder |
|
|
|
|
}] |
|
|
|
@ -139,6 +141,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
"padding-left": o.innerHgap / BI.pixRatio + BI.pixUnit, |
|
|
|
|
"padding-right": o.innerHgap / BI.pixRatio + BI.pixUnit |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return this.button_group; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -147,6 +150,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
if (false === o.tool) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return BI.createWidget(o.tool); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -155,6 +159,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
if (o.tabs.length === 0) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return BI.createWidget({ |
|
|
|
|
type: "bi.center", |
|
|
|
|
cls: "list-view-tab", |
|
|
|
@ -218,7 +223,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
top: o.tgap + o.vgap, |
|
|
|
|
left: 0, |
|
|
|
|
right: "", |
|
|
|
|
bottom: "", |
|
|
|
|
bottom: "" |
|
|
|
|
}; |
|
|
|
|
placeholderStyle = { |
|
|
|
|
left: 0, |
|
|
|
@ -237,7 +242,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
top: o.bgap + o.vgap, |
|
|
|
|
left: "", |
|
|
|
|
right: 0, |
|
|
|
|
bottom: "", |
|
|
|
|
bottom: "" |
|
|
|
|
}; |
|
|
|
|
placeholderStyle = { |
|
|
|
|
left: 0, |
|
|
|
@ -257,14 +262,14 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
bottom: o.bgap + o.vgap, |
|
|
|
|
left: 0, |
|
|
|
|
right: "", |
|
|
|
|
top: "", |
|
|
|
|
top: "" |
|
|
|
|
}; |
|
|
|
|
placeholderStyle = { |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
height: this._const.TRIANGLE_LENGTH, |
|
|
|
|
top: "", |
|
|
|
|
bottom: -this._const.TRIANGLE_LENGTH, |
|
|
|
|
bottom: -this._const.TRIANGLE_LENGTH |
|
|
|
|
}; |
|
|
|
|
break; |
|
|
|
|
case "top,left": |
|
|
|
@ -276,14 +281,14 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
bottom: o.bgap + o.vgap, |
|
|
|
|
right: 0, |
|
|
|
|
left: "", |
|
|
|
|
top: "", |
|
|
|
|
top: "" |
|
|
|
|
}; |
|
|
|
|
placeholderStyle = { |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
height: this._const.TRIANGLE_LENGTH, |
|
|
|
|
top: "", |
|
|
|
|
bottom: -this._const.TRIANGLE_LENGTH, |
|
|
|
|
bottom: -this._const.TRIANGLE_LENGTH |
|
|
|
|
}; |
|
|
|
|
break; |
|
|
|
|
case "left": |
|
|
|
@ -296,7 +301,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
right: o.rgap + o.hgap, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: "", |
|
|
|
|
left: "", |
|
|
|
|
left: "" |
|
|
|
|
}; |
|
|
|
|
placeholderStyle = { |
|
|
|
|
top: 0, |
|
|
|
@ -315,7 +320,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
right: o.rgap + o.hgap, |
|
|
|
|
bottom: 0, |
|
|
|
|
top: "", |
|
|
|
|
left: "", |
|
|
|
|
left: "" |
|
|
|
|
}; |
|
|
|
|
placeholderStyle = { |
|
|
|
|
top: 0, |
|
|
|
@ -335,7 +340,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
left: o.lgap + o.hgap, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: "", |
|
|
|
|
right: "", |
|
|
|
|
right: "" |
|
|
|
|
}; |
|
|
|
|
placeholderStyle = { |
|
|
|
|
top: 0, |
|
|
|
@ -354,7 +359,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
left: o.lgap + o.hgap, |
|
|
|
|
bottom: 0, |
|
|
|
|
top: "", |
|
|
|
|
right: "", |
|
|
|
|
right: "" |
|
|
|
|
}; |
|
|
|
|
placeholderStyle = { |
|
|
|
|
top: 0, |
|
|
|
@ -372,8 +377,14 @@ BI.PopupView = BI.inherit(BI.Widget, {
|
|
|
|
|
break; |
|
|
|
|
case "innerLeft": |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
this.element.removeClass("left").removeClass("right").removeClass("top").removeClass("bottom").addClass(direction); |
|
|
|
|
this.element.removeClass("left") |
|
|
|
|
.removeClass("right") |
|
|
|
|
.removeClass("top") |
|
|
|
|
.removeClass("bottom") |
|
|
|
|
.addClass(direction); |
|
|
|
|
this.arrow.element.css(style); |
|
|
|
|
this.arrowWrapper.element.css(wrapperStyle); |
|
|
|
|
this.placeholder.element.css(placeholderStyle); |
|
|
|
|