|
|
|
@ -30723,106 +30723,6 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);/** |
|
|
|
|
* 使用display:table和display:table-cell实现的horizontal布局 |
|
|
|
|
* @class BI.TableAdaptLayout |
|
|
|
|
* @extends BI.Layout |
|
|
|
|
*/ |
|
|
|
|
BI.TableAdaptLayout = BI.inherit(BI.Layout, { |
|
|
|
|
props: function () { |
|
|
|
|
return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), { |
|
|
|
|
baseCls: "bi-table-center-adapt-layout", |
|
|
|
|
columnSize: [], |
|
|
|
|
verticalAlign: BI.VerticalAlign.Top, |
|
|
|
|
horizontalAlign: BI.HorizontalAlign.Left, |
|
|
|
|
hgap: 0, |
|
|
|
|
vgap: 0, |
|
|
|
|
lgap: 0, |
|
|
|
|
rgap: 0, |
|
|
|
|
tgap: 0, |
|
|
|
|
bgap: 0 |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
render: function () { |
|
|
|
|
var o = this.options; |
|
|
|
|
BI.TableAdaptLayout.superclass.render.apply(this, arguments); |
|
|
|
|
this.$table = BI.Widget._renderEngine.createElement("<div>").css({ |
|
|
|
|
position: "relative", |
|
|
|
|
display: "table", |
|
|
|
|
height: o.verticalAlign === BI.VerticalAlign.Middle ? "100%" : "auto", |
|
|
|
|
width: o.horizontalAlign === BI.HorizontalAlign.Center ? "100%" : "auto", |
|
|
|
|
"white-space": "nowrap" |
|
|
|
|
}); |
|
|
|
|
this.populate(this.options.items); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_addElement: function (i, item) { |
|
|
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
|
var td; |
|
|
|
|
var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i]; |
|
|
|
|
if (!this.hasWidget(this._getChildName(i))) { |
|
|
|
|
var w = BI.createWidget(item); |
|
|
|
|
w.element.css({position: "relative", top: "0", left: "0", margin: "0px auto"}); |
|
|
|
|
td = BI.createWidget({ |
|
|
|
|
type: "bi.default", |
|
|
|
|
width: width, |
|
|
|
|
items: [w] |
|
|
|
|
}); |
|
|
|
|
this.addWidget(this._getChildName(i), td); |
|
|
|
|
} else { |
|
|
|
|
td = this.getWidgetByName(this._getChildName(i)); |
|
|
|
|
td.element.width(width); |
|
|
|
|
} |
|
|
|
|
td.element.css({"max-width": o.columnSize[i] + "px"}); |
|
|
|
|
if (i === 0) { |
|
|
|
|
td.element.addClass("first-element"); |
|
|
|
|
} |
|
|
|
|
td.element.css({ |
|
|
|
|
position: "relative", |
|
|
|
|
display: "table-cell", |
|
|
|
|
"vertical-align": "middle", |
|
|
|
|
margin: "0", |
|
|
|
|
padding: "0", |
|
|
|
|
height: "100%" |
|
|
|
|
}); |
|
|
|
|
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { |
|
|
|
|
w.element.css({ |
|
|
|
|
"margin-top": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px" |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) { |
|
|
|
|
w.element.css({ |
|
|
|
|
"margin-left": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + "px" |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) { |
|
|
|
|
w.element.css({ |
|
|
|
|
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px" |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) { |
|
|
|
|
w.element.css({ |
|
|
|
|
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px" |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
return td; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
appendFragment: function (frag) { |
|
|
|
|
this.$table.append(frag); |
|
|
|
|
this.element.append(this.$table); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
resize: function () { |
|
|
|
|
// console.log("center_adapt布局不需要resize");
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
|
BI.TableAdaptLayout.superclass.populate.apply(this, arguments); |
|
|
|
|
this._mount(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
BI.shortcut("bi.table_adapt", BI.TableAdaptLayout);/** |
|
|
|
|
* 垂直方向居中容器 |
|
|
|
|
* @class BI.VerticalAdaptLayout |
|
|
|
|
* @extends BI.Layout |
|
|
|
@ -52898,7 +52798,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
|
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
extraCls: "bi-bubble-bar-popup-view", |
|
|
|
|
buttons: [{value: BI.i18nText("BI-Basic_Cancel"), ghost: true}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] |
|
|
|
|
buttons: [{ |
|
|
|
|
value: BI.i18nText("BI-Basic_Cancel"), |
|
|
|
|
ghost: true |
|
|
|
|
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
_init: function () { |
|
|
|
@ -52941,14 +52844,37 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
|
|
|
|
|
*/ |
|
|
|
|
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
props: function () { |
|
|
|
|
return { |
|
|
|
|
baseCls: "bi-text-bubble-bar-popup-view", |
|
|
|
|
text: "", |
|
|
|
|
width: 250 |
|
|
|
|
width: 250, |
|
|
|
|
buttons: [{ |
|
|
|
|
level: "ignore", |
|
|
|
|
value: false, |
|
|
|
|
text: BI.i18nText("BI-Basic_Cancel") |
|
|
|
|
}, { |
|
|
|
|
value: true, |
|
|
|
|
text: BI.i18nText("BI-Basic_Sure") |
|
|
|
|
}] |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
var buttons = BI.map(o.buttons, function (index, buttonOpt) { |
|
|
|
|
if (BI.isWidget(buttonOpt)) { |
|
|
|
|
return buttonOpt; |
|
|
|
|
} |
|
|
|
|
return BI.extend({ |
|
|
|
|
type: "bi.button", |
|
|
|
|
height: 24, |
|
|
|
|
handler: function (v) { |
|
|
|
|
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); |
|
|
|
|
} |
|
|
|
|
}, buttonOpt); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
return { |
|
|
|
|
type: "bi.bubble_bar_popup_view", |
|
|
|
|
ref: function () { |
|
|
|
@ -52969,22 +52895,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
|
|
|
|
|
tgap: 25, |
|
|
|
|
bgap: 10 |
|
|
|
|
}, |
|
|
|
|
buttons: [{ |
|
|
|
|
type: "bi.button", |
|
|
|
|
value: BI.i18nText("BI-Basic_Cancel"), |
|
|
|
|
level: "ignore", |
|
|
|
|
height: 24, |
|
|
|
|
handler: function () { |
|
|
|
|
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
type: "bi.button", |
|
|
|
|
value: BI.i18nText("BI-Basic_Sure"), |
|
|
|
|
height: 24, |
|
|
|
|
handler: function () { |
|
|
|
|
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true); |
|
|
|
|
} |
|
|
|
|
}] |
|
|
|
|
buttons: buttons |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|