|
|
@ -31262,7 +31262,7 @@ BI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.shortcut("bi.inline_vertical_adapt", BI.InlineVerticalAdaptLayout);/** |
|
|
|
BI.shortcut("bi.inline_vertical_adapt", BI.InlineVerticalAdaptLayout);/** |
|
|
|
* 自适应水平和垂直方向都居中容器 |
|
|
|
* 使用display:table和display:table-cell实现的horizontal布局 |
|
|
|
* @class BI.TableCenterAdaptLayout |
|
|
|
* @class BI.TableCenterAdaptLayout |
|
|
|
* @extends BI.Layout |
|
|
|
* @extends BI.Layout |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -31271,6 +31271,8 @@ BI.TableCenterAdaptLayout = BI.inherit(BI.Layout, { |
|
|
|
return BI.extend(BI.TableCenterAdaptLayout.superclass.props.apply(this, arguments), { |
|
|
|
return BI.extend(BI.TableCenterAdaptLayout.superclass.props.apply(this, arguments), { |
|
|
|
baseCls: "bi-table-center-adapt-layout", |
|
|
|
baseCls: "bi-table-center-adapt-layout", |
|
|
|
columnSize: [], |
|
|
|
columnSize: [], |
|
|
|
|
|
|
|
verticalAlign: BI.VerticalAlign.Top, |
|
|
|
|
|
|
|
horizontalAlign: BI.HorizontalAlign.Left, |
|
|
|
hgap: 0, |
|
|
|
hgap: 0, |
|
|
|
vgap: 0, |
|
|
|
vgap: 0, |
|
|
|
lgap: 0, |
|
|
|
lgap: 0, |
|
|
@ -31280,12 +31282,13 @@ BI.TableCenterAdaptLayout = BI.inherit(BI.Layout, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
BI.TableCenterAdaptLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.TableCenterAdaptLayout.superclass.render.apply(this, arguments); |
|
|
|
this.$table = BI.Widget._renderEngine.createElement("<div>").css({ |
|
|
|
this.$table = BI.Widget._renderEngine.createElement("<div>").css({ |
|
|
|
position: "relative", |
|
|
|
position: "relative", |
|
|
|
display: "table", |
|
|
|
display: "table", |
|
|
|
width: "100%", |
|
|
|
height: o.verticalAlign === BI.VerticalAlign.Middle ? "100%" : "auto", |
|
|
|
height: "100%", |
|
|
|
width: o.horizontalAlign === BI.HorizontalAlign.Center ? "100%" : "auto", |
|
|
|
"white-space": "nowrap" |
|
|
|
"white-space": "nowrap" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.populate(this.options.items); |
|
|
|
this.populate(this.options.items); |
|
|
@ -31309,7 +31312,7 @@ BI.TableCenterAdaptLayout = BI.inherit(BI.Layout, { |
|
|
|
td = this.getWidgetByName(this._getChildName(i)); |
|
|
|
td = this.getWidgetByName(this._getChildName(i)); |
|
|
|
td.element.width(width); |
|
|
|
td.element.width(width); |
|
|
|
} |
|
|
|
} |
|
|
|
td.element.css({"max-width": o.columnSize[i]}); |
|
|
|
td.element.css({"max-width": o.columnSize[i] + "px"}); |
|
|
|
if (i === 0) { |
|
|
|
if (i === 0) { |
|
|
|
td.element.addClass("first-element"); |
|
|
|
td.element.addClass("first-element"); |
|
|
|
} |
|
|
|
} |
|
|
@ -32748,8 +32751,8 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, { |
|
|
|
return BI.extend(BI.HorizontalLayout.superclass.props.apply(this, arguments), { |
|
|
|
return BI.extend(BI.HorizontalLayout.superclass.props.apply(this, arguments), { |
|
|
|
baseCls: "bi-horizontal-layout", |
|
|
|
baseCls: "bi-horizontal-layout", |
|
|
|
verticalAlign: BI.VerticalAlign.Top, |
|
|
|
verticalAlign: BI.VerticalAlign.Top, |
|
|
|
|
|
|
|
horizontalAlign: BI.HorizontalAlign.Left, |
|
|
|
columnSize: [], |
|
|
|
columnSize: [], |
|
|
|
scrollx: true, |
|
|
|
|
|
|
|
hgap: 0, |
|
|
|
hgap: 0, |
|
|
|
vgap: 0, |
|
|
|
vgap: 0, |
|
|
|
lgap: 0, |
|
|
|
lgap: 0, |
|
|
@ -32759,10 +32762,13 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
BI.HorizontalLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.HorizontalLayout.superclass.render.apply(this, arguments); |
|
|
|
this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({ |
|
|
|
this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({ |
|
|
|
position: "relative", |
|
|
|
position: "relative", |
|
|
|
"white-space": "nowrap", |
|
|
|
"white-space": "nowrap", |
|
|
|
|
|
|
|
height: o.verticalAlign === BI.VerticalAlign.Middle ? "100%" : "auto", |
|
|
|
|
|
|
|
width: o.horizontalAlign === BI.HorizontalAlign.Center ? "100%" : "auto", |
|
|
|
"border-spacing": "0px", |
|
|
|
"border-spacing": "0px", |
|
|
|
border: "none", |
|
|
|
border: "none", |
|
|
|
"border-collapse": "separate" |
|
|
|
"border-collapse": "separate" |
|
|
@ -32792,7 +32798,7 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, { |
|
|
|
td = this.getWidgetByName(this._getChildName(i)); |
|
|
|
td = this.getWidgetByName(this._getChildName(i)); |
|
|
|
td.element.attr("width", width); |
|
|
|
td.element.attr("width", width); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
td.element.css({"max-width": o.columnSize[i] + "px"}); |
|
|
|
if (i === 0) { |
|
|
|
if (i === 0) { |
|
|
|
td.element.addClass("first-element"); |
|
|
|
td.element.addClass("first-element"); |
|
|
|
} |
|
|
|
} |
|
|
|