|
|
@ -3,12 +3,19 @@ |
|
|
|
* @class BI.PopupView |
|
|
|
* @class BI.PopupView |
|
|
|
* @extends BI.Widget |
|
|
|
* @extends BI.Widget |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
_const: { |
|
|
|
import { shortcut } from "../../core/decorator"; |
|
|
|
|
|
|
|
@shortcut() |
|
|
|
|
|
|
|
export class PopupView extends BI.Widget { |
|
|
|
|
|
|
|
_const = { |
|
|
|
TRIANGLE_LENGTH: 12, |
|
|
|
TRIANGLE_LENGTH: 12, |
|
|
|
}, |
|
|
|
} |
|
|
|
_defaultConfig: function (props) { |
|
|
|
|
|
|
|
return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
static xtype = "bi.popup_view"; |
|
|
|
|
|
|
|
static EVENT_CHANGE = "EVENT_CHANGE"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_defaultConfig(props) { |
|
|
|
|
|
|
|
return BI.extend(super._defaultConfig(arguments), { |
|
|
|
_baseCls: "bi-popup-view" + (props.primary ? " bi-primary" : ""), |
|
|
|
_baseCls: "bi-popup-view" + (props.primary ? " bi-primary" : ""), |
|
|
|
// 品牌色
|
|
|
|
// 品牌色
|
|
|
|
primary: false, |
|
|
|
primary: false, |
|
|
@ -46,10 +53,10 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
render() { |
|
|
|
render: function () { |
|
|
|
const { minWidth, maxWidth, stopPropagation, stopEvent, |
|
|
|
var self = this, o = this.options; |
|
|
|
direction, logic, lgap, rgap, tgap, bgap, vgap, hgap, primary, showArrow } = this.options; |
|
|
|
function fn (e) { |
|
|
|
function fn (e) { |
|
|
|
e.stopPropagation(); |
|
|
|
e.stopPropagation(); |
|
|
|
} |
|
|
|
} |
|
|
@ -60,44 +67,47 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
} |
|
|
|
} |
|
|
|
this.element.css({ |
|
|
|
this.element.css({ |
|
|
|
"z-index": BI.zIndex_popup, |
|
|
|
"z-index": BI.zIndex_popup, |
|
|
|
"min-width": BI.pixFormat(o.minWidth), |
|
|
|
"min-width": BI.pixFormat(minWidth), |
|
|
|
"max-width": BI.pixFormat(o.maxWidth), |
|
|
|
"max-width": BI.pixFormat(maxWidth), |
|
|
|
}).bind({ click: fn }); |
|
|
|
}).bind({ click: fn }); |
|
|
|
|
|
|
|
|
|
|
|
this.element.bind("mousewheel", fn); |
|
|
|
this.element.bind("mousewheel", fn); |
|
|
|
|
|
|
|
|
|
|
|
o.stopPropagation && this.element.bind({ mousedown: fn, mouseup: fn, mouseover: fn }); |
|
|
|
stopPropagation && this.element.bind({ mousedown: fn, mouseup: fn, mouseover: fn }); |
|
|
|
o.stopEvent && this.element.bind({ mousedown: stop, mouseup: stop, mouseover: stop }); |
|
|
|
stopEvent && this.element.bind({ mousedown: stop, mouseup: stop, mouseover: stop }); |
|
|
|
this.tool = this._createTool(); |
|
|
|
this.tool = this._createTool(); |
|
|
|
this.tab = this._createTab(); |
|
|
|
this.tab = this._createTab(); |
|
|
|
this.view = this._createView(); |
|
|
|
this.view = this._createView(); |
|
|
|
this.toolbar = this._createToolBar(); |
|
|
|
this.toolbar = this._createToolBar(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const self = this; |
|
|
|
|
|
|
|
// TODO:这里需要调整转化方式,仍然采用原来的self
|
|
|
|
this.view.on(BI.Controller.EVENT_CHANGE, function (type) { |
|
|
|
this.view.on(BI.Controller.EVENT_CHANGE, function (type) { |
|
|
|
|
|
|
|
// 箭头函数没有自己的arguments,只会获取外层的,若要获取自己的,需通过剩余参数写法,但这样得到的仍然不是类数组
|
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
self.fireEvent(BI.PopupView.EVENT_CHANGE); |
|
|
|
self.fireEvent(PopupView.EVENT_CHANGE); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
BI.createWidget(BI.extend({ |
|
|
|
BI.createWidget(BI.extend({ |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { |
|
|
|
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(direction), BI.extend({}, logic, { |
|
|
|
scrolly: false, |
|
|
|
scrolly: false, |
|
|
|
lgap: o.lgap, |
|
|
|
lgap, |
|
|
|
rgap: o.rgap, |
|
|
|
rgap, |
|
|
|
tgap: o.tgap, |
|
|
|
tgap, |
|
|
|
bgap: o.bgap, |
|
|
|
bgap, |
|
|
|
vgap: o.vgap, |
|
|
|
vgap, |
|
|
|
hgap: o.hgap, |
|
|
|
hgap, |
|
|
|
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, BI.extend({ |
|
|
|
items: BI.LogicFactory.createLogicItemsByDirection(direction, BI.extend({ |
|
|
|
cls: "list-view-outer bi-card list-view-shadow" + (o.primary ? " bi-primary" : ""), |
|
|
|
cls: "list-view-outer bi-card list-view-shadow" + (primary ? " bi-primary" : ""), |
|
|
|
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, { |
|
|
|
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(direction), BI.extend({}, logic, { |
|
|
|
items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tool, this.tab, this.view, this.toolbar), |
|
|
|
items: BI.LogicFactory.createLogicItemsByDirection(direction, this.tool, this.tab, this.view, this.toolbar), |
|
|
|
}))) |
|
|
|
}))) |
|
|
|
), |
|
|
|
), |
|
|
|
})))); |
|
|
|
})))); |
|
|
|
if (o.showArrow) { |
|
|
|
if (showArrow) { |
|
|
|
this.arrow = BI.createWidget({ |
|
|
|
this.arrow = BI.createWidget({ |
|
|
|
type: "bi.absolute", |
|
|
|
type: "bi.absolute", |
|
|
|
cls: "bi-bubble-arrow", |
|
|
|
cls: "bi-bubble-arrow", |
|
|
@ -129,34 +139,33 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
}], |
|
|
|
}], |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
_createView() { |
|
|
|
_createView: function () { |
|
|
|
const { el, value, minHeight, innerVgap, innerHgap } = this.options; |
|
|
|
var o = this.options; |
|
|
|
this.button_group = BI.createWidget(el, { type: "bi.button_group", value: value }); |
|
|
|
this.button_group = BI.createWidget(o.el, { type: "bi.button_group", value: o.value }); |
|
|
|
|
|
|
|
this.button_group.element.css({ |
|
|
|
this.button_group.element.css({ |
|
|
|
"min-height": BI.pixFormat(o.minHeight), |
|
|
|
"min-height": BI.pixFormat(minHeight), |
|
|
|
"padding-top": BI.pixFormat(o.innerVgap), |
|
|
|
"padding-top": BI.pixFormat(innerVgap), |
|
|
|
"padding-bottom": BI.pixFormat(o.innerVgap), |
|
|
|
"padding-bottom": BI.pixFormat(innerVgap), |
|
|
|
"padding-left": BI.pixFormat(o.innerHgap), |
|
|
|
"padding-left": BI.pixFormat(innerHgap), |
|
|
|
"padding-right": BI.pixFormat(o.innerHgap), |
|
|
|
"padding-right": BI.pixFormat(innerHgap), |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return this.button_group; |
|
|
|
return this.button_group; |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_createTool: function () { |
|
|
|
_createTool() { |
|
|
|
var o = this.options; |
|
|
|
const { tool } = this.options; |
|
|
|
if (false === o.tool) { |
|
|
|
if (false === tool) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return BI.createWidget(o.tool); |
|
|
|
return BI.createWidget(tool); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_createTab: function () { |
|
|
|
_createTab() { |
|
|
|
var o = this.options; |
|
|
|
const { tabs, value } = this.options; |
|
|
|
if (o.tabs.length === 0) { |
|
|
|
if (tabs.length === 0) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -164,14 +173,14 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
type: "bi.center", |
|
|
|
type: "bi.center", |
|
|
|
cls: "list-view-tab", |
|
|
|
cls: "list-view-tab", |
|
|
|
height: 25, |
|
|
|
height: 25, |
|
|
|
items: o.tabs, |
|
|
|
items: tabs, |
|
|
|
value: o.value, |
|
|
|
value: value, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_createToolBar: function () { |
|
|
|
_createToolBar() { |
|
|
|
var o = this.options; |
|
|
|
const { buttons } = this.options; |
|
|
|
if (o.buttons.length === 0) { |
|
|
|
if (buttons.length === 0) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -179,38 +188,38 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
type: "bi.center", |
|
|
|
type: "bi.center", |
|
|
|
cls: "list-view-toolbar bi-high-light bi-split-top", |
|
|
|
cls: "list-view-toolbar bi-high-light bi-split-top", |
|
|
|
height: 24, |
|
|
|
height: 24, |
|
|
|
items: BI.createItems(o.buttons, { |
|
|
|
items: BI.createItems(buttons, { |
|
|
|
once: false, |
|
|
|
once: false, |
|
|
|
shadow: true, |
|
|
|
shadow: true, |
|
|
|
isShadowShowingOnSelected: true, |
|
|
|
isShadowShowingOnSelected: true, |
|
|
|
}), |
|
|
|
}), |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setDirection: function (direction, position) { |
|
|
|
setDirection(direction, position) { |
|
|
|
var o = this.options; |
|
|
|
const { showArrow, tgap, vgap, bgap, rgap, hgap, lgap } = this.options; |
|
|
|
if (o.showArrow) { |
|
|
|
if (showArrow) { |
|
|
|
var style = {}, wrapperStyle = {}, placeholderStyle = {}; |
|
|
|
let style = {}, wrapperStyle = {}, placeholderStyle = {}; |
|
|
|
var adjustXOffset = position.adjustXOffset || 0; |
|
|
|
const adjustXOffset = position.adjustXOffset || 0; |
|
|
|
var adjustYOffset = position.adjustYOffset || 0; |
|
|
|
const adjustYOffset = position.adjustYOffset || 0; |
|
|
|
var bodyBounds = BI.Widget._renderEngine.createElement("body").bounds(); |
|
|
|
const bodyBounds = BI.Widget._renderEngine.createElement("body").bounds(); |
|
|
|
var bodyWidth = bodyBounds.width; |
|
|
|
const bodyWidth = bodyBounds.width; |
|
|
|
var bodyHeight = bodyBounds.height; |
|
|
|
const bodyHeight = bodyBounds.height; |
|
|
|
var popupWidth = this.element.outerWidth(); |
|
|
|
const popupWidth = this.element.outerWidth(); |
|
|
|
var popupHeight = this.element.outerHeight(); |
|
|
|
const popupHeight = this.element.outerHeight(); |
|
|
|
var offset = position.offset; |
|
|
|
const offset = position.offset; |
|
|
|
var offsetStyle = position.offsetStyle; |
|
|
|
const offsetStyle = position.offsetStyle; |
|
|
|
var middle = offsetStyle === "center" || offsetStyle === "middle"; |
|
|
|
const middle = offsetStyle === "center" || offsetStyle === "middle"; |
|
|
|
|
|
|
|
|
|
|
|
var minLeft = Math.max(4, offset.left + 4 + popupWidth - bodyWidth); |
|
|
|
const minLeft = Math.max(4, offset.left + 4 + popupWidth - bodyWidth); |
|
|
|
var minRight = Math.max(4, popupWidth - (offset.left + 4)); |
|
|
|
const minRight = Math.max(4, popupWidth - (offset.left + 4)); |
|
|
|
var minTop = Math.max(4, offset.top + 4 + popupHeight - bodyHeight); |
|
|
|
const minTop = Math.max(4, offset.top + 4 + popupHeight - bodyHeight); |
|
|
|
var minBottom = Math.max(4, popupHeight - (offset.top + 4)); |
|
|
|
const minBottom = Math.max(4, popupHeight - (offset.top + 4)); |
|
|
|
|
|
|
|
|
|
|
|
var maxLeft = Math.min(popupWidth - 16 - 4, offset.left + position.width - 16 - 4); |
|
|
|
const maxLeft = Math.min(popupWidth - 16 - 4, offset.left + position.width - 16 - 4); |
|
|
|
var maxRight = Math.min(popupWidth - 16 - 4, bodyWidth - (offset.left + position.width - 16 - 4)); |
|
|
|
const maxRight = Math.min(popupWidth - 16 - 4, bodyWidth - (offset.left + position.width - 16 - 4)); |
|
|
|
var maxTop = Math.min(popupHeight - 16 - 4, offset.top + position.height - 16 - 4); |
|
|
|
const maxTop = Math.min(popupHeight - 16 - 4, offset.top + position.height - 16 - 4); |
|
|
|
var maxBottom = Math.min(popupHeight - 16 - 4, bodyHeight - (offset.top + position.height - 16 - 4)); |
|
|
|
const maxBottom = Math.min(popupHeight - 16 - 4, bodyHeight - (offset.top + position.height - 16 - 4)); |
|
|
|
switch (direction) { |
|
|
|
switch (direction) { |
|
|
|
case "bottom": |
|
|
|
case "bottom": |
|
|
|
case "bottom,right": |
|
|
|
case "bottom,right": |
|
|
@ -220,7 +229,7 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 8, minLeft, maxLeft), |
|
|
|
left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 8, minLeft, maxLeft), |
|
|
|
}; |
|
|
|
}; |
|
|
|
wrapperStyle = { |
|
|
|
wrapperStyle = { |
|
|
|
top: o.tgap + o.vgap, |
|
|
|
top: tgap + vgap, |
|
|
|
left: 0, |
|
|
|
left: 0, |
|
|
|
right: "", |
|
|
|
right: "", |
|
|
|
bottom: "", |
|
|
|
bottom: "", |
|
|
@ -239,7 +248,7 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 8, minRight, maxRight), |
|
|
|
right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 8, minRight, maxRight), |
|
|
|
}; |
|
|
|
}; |
|
|
|
wrapperStyle = { |
|
|
|
wrapperStyle = { |
|
|
|
top: o.bgap + o.vgap, |
|
|
|
top: bgap + vgap, |
|
|
|
left: "", |
|
|
|
left: "", |
|
|
|
right: 0, |
|
|
|
right: 0, |
|
|
|
bottom: "", |
|
|
|
bottom: "", |
|
|
@ -259,7 +268,7 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 8, minLeft, maxLeft), |
|
|
|
left: BI.clamp(((middle ? popupWidth : position.width) - adjustXOffset) / 2 - 8, minLeft, maxLeft), |
|
|
|
}; |
|
|
|
}; |
|
|
|
wrapperStyle = { |
|
|
|
wrapperStyle = { |
|
|
|
bottom: o.bgap + o.vgap, |
|
|
|
bottom: bgap + vgap, |
|
|
|
left: 0, |
|
|
|
left: 0, |
|
|
|
right: "", |
|
|
|
right: "", |
|
|
|
top: "", |
|
|
|
top: "", |
|
|
@ -278,7 +287,7 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 8, minRight, maxRight), |
|
|
|
right: BI.clamp(((middle ? popupWidth : position.width) + adjustXOffset) / 2 - 8, minRight, maxRight), |
|
|
|
}; |
|
|
|
}; |
|
|
|
wrapperStyle = { |
|
|
|
wrapperStyle = { |
|
|
|
bottom: o.bgap + o.vgap, |
|
|
|
bottom: bgap + vgap, |
|
|
|
right: 0, |
|
|
|
right: 0, |
|
|
|
left: "", |
|
|
|
left: "", |
|
|
|
top: "", |
|
|
|
top: "", |
|
|
@ -298,7 +307,7 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 8, minTop, maxTop), |
|
|
|
top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 8, minTop, maxTop), |
|
|
|
}; |
|
|
|
}; |
|
|
|
wrapperStyle = { |
|
|
|
wrapperStyle = { |
|
|
|
right: o.rgap + o.hgap, |
|
|
|
right: rgap + hgap, |
|
|
|
top: 0, |
|
|
|
top: 0, |
|
|
|
bottom: "", |
|
|
|
bottom: "", |
|
|
|
left: "", |
|
|
|
left: "", |
|
|
@ -317,7 +326,7 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 8, minBottom, maxBottom), |
|
|
|
bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 8, minBottom, maxBottom), |
|
|
|
}; |
|
|
|
}; |
|
|
|
wrapperStyle = { |
|
|
|
wrapperStyle = { |
|
|
|
right: o.rgap + o.hgap, |
|
|
|
right: rgap + hgap, |
|
|
|
bottom: 0, |
|
|
|
bottom: 0, |
|
|
|
top: "", |
|
|
|
top: "", |
|
|
|
left: "", |
|
|
|
left: "", |
|
|
@ -337,7 +346,7 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 8, minTop, maxTop), |
|
|
|
top: BI.clamp(((middle ? popupHeight : position.height) - adjustYOffset) / 2 - 8, minTop, maxTop), |
|
|
|
}; |
|
|
|
}; |
|
|
|
wrapperStyle = { |
|
|
|
wrapperStyle = { |
|
|
|
left: o.lgap + o.hgap, |
|
|
|
left: lgap + hgap, |
|
|
|
top: 0, |
|
|
|
top: 0, |
|
|
|
bottom: "", |
|
|
|
bottom: "", |
|
|
|
right: "", |
|
|
|
right: "", |
|
|
@ -356,7 +365,7 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 8, minBottom, maxBottom), |
|
|
|
bottom: BI.clamp(((middle ? popupHeight : position.height) + adjustYOffset) / 2 - 8, minBottom, maxBottom), |
|
|
|
}; |
|
|
|
}; |
|
|
|
wrapperStyle = { |
|
|
|
wrapperStyle = { |
|
|
|
left: o.lgap + o.hgap, |
|
|
|
left: lgap + hgap, |
|
|
|
bottom: 0, |
|
|
|
bottom: 0, |
|
|
|
top: "", |
|
|
|
top: "", |
|
|
|
right: "", |
|
|
|
right: "", |
|
|
@ -390,38 +399,39 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
this.arrowWrapper.element.css(wrapperStyle); |
|
|
|
this.arrowWrapper.element.css(wrapperStyle); |
|
|
|
this.placeholder.element.css(placeholderStyle); |
|
|
|
this.placeholder.element.css(placeholderStyle); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getView: function () { |
|
|
|
getView() { |
|
|
|
return this.view; |
|
|
|
return this.view; |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
populate(items) { |
|
|
|
this.view.populate.apply(this.view, arguments); |
|
|
|
this.view.populate.apply(this.view, arguments); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
resetWidth: function (w) { |
|
|
|
resetWidth(w) { |
|
|
|
this.options.width = w; |
|
|
|
this.options.width = w; |
|
|
|
this.element.width(w); |
|
|
|
this.element.width(w); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
resetHeight: function (h) { |
|
|
|
resetHeight(h) { |
|
|
|
var tbHeight = this.toolbar ? (this.toolbar.attr("height") || 24) : 0, |
|
|
|
const tbHeight = this.toolbar ? (this.toolbar.attr("height") || 24) : 0, |
|
|
|
tabHeight = this.tab ? (this.tab.attr("height") || 24) : 0, |
|
|
|
tabHeight = this.tab ? (this.tab.attr("height") || 24) : 0, |
|
|
|
toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); |
|
|
|
toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); |
|
|
|
var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVgap; |
|
|
|
const resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVgap; |
|
|
|
this.view.resetHeight ? this.view.resetHeight(resetHeight) : |
|
|
|
this.view.resetHeight ? this.view.resetHeight(resetHeight) : |
|
|
|
this.view.element.css({ "max-height": BI.pixFormat(resetHeight) }); |
|
|
|
this.view.element.css({ "max-height": BI.pixFormat(resetHeight) }); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setValue: function (selectedValues) { |
|
|
|
setValue(selectedValues) { |
|
|
|
this.tab && this.tab.setValue(selectedValues); |
|
|
|
this.tab && this.tab.setValue(selectedValues); |
|
|
|
this.view.setValue(selectedValues); |
|
|
|
this.view.setValue(selectedValues); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
getValue() { |
|
|
|
return this.view.getValue(); |
|
|
|
return this.view.getValue(); |
|
|
|
}, |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE"; |
|
|
|
} |
|
|
|
BI.shortcut("bi.popup_view", BI.PopupView); |
|
|
|
|
|
|
|
|
|
|
|
BI.extend(BI, { PopupView }); |
|
|
|