|
|
@ -24,33 +24,21 @@ BI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, { |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
BI.InlineCenterAdaptLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.InlineCenterAdaptLayout.superclass.render.apply(this, arguments); |
|
|
|
this.element.css({ |
|
|
|
this.element.css({ |
|
|
|
whiteSpace: "nowrap" |
|
|
|
whiteSpace: "nowrap", |
|
|
|
|
|
|
|
textAlign: "center" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.populate(this.options.items); |
|
|
|
this.populate(this.options.items); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_addElement: function (i, item, length) { |
|
|
|
_addElement: function (i, item, length) { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
if (!this.hasWidget(this.getName() + i)) { |
|
|
|
var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments); |
|
|
|
var t = BI.createWidget(item); |
|
|
|
|
|
|
|
t.element.css({ |
|
|
|
|
|
|
|
position: "relative" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
var w = BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.horizontal_auto", |
|
|
|
|
|
|
|
items: [t] |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.addWidget(this.getName() + i, w); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
var w = this.getWidgetByName(this.getName() + i); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
w.element.css({ |
|
|
|
w.element.css({ |
|
|
|
position: "relative", |
|
|
|
position: "relative", |
|
|
|
display: "inline-block", |
|
|
|
display: "inline-block", |
|
|
|
"vertical-align": "middle", |
|
|
|
"vertical-align": "middle", |
|
|
|
"*display": "inline", |
|
|
|
"*display": "inline", |
|
|
|
"*zoom": 1, |
|
|
|
"*zoom": 1 |
|
|
|
"min-width": 100 / length + "%" |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { |
|
|
|
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) { |
|
|
|
w.element.css({ |
|
|
|
w.element.css({ |
|
|
|