Browse Source

暂时先还原一下

es6
windy 6 years ago
parent
commit
596a2e7c37
  1. 297
      dist/bundle.ie.js
  2. 60
      dist/bundle.ie.min.js
  3. 197
      dist/bundle.js
  4. 60
      dist/bundle.min.js
  5. 195
      dist/core.js
  6. 297
      dist/fineui.ie.js
  7. 60
      dist/fineui.ie.min.js
  8. 197
      dist/fineui.js
  9. 60
      dist/fineui.min.js
  10. 197
      dist/fineui_without_jquery_polyfill.js
  11. 2
      dist/utils.min.js
  12. 2
      dist/widget.js
  13. 96
      src/core/wrapper/layout/adapt/adapt.center.js
  14. 99
      src/core/wrapper/layout/adapt/adapt.vertical.js
  15. 2
      src/widget/date/calendar/picker.date.js

297
dist/bundle.ie.js vendored

@ -30415,7 +30415,6 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-center-adapt-layout", baseCls: "bi-center-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -30425,33 +30424,92 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
}); });
}, },
render: function () { render: function () {
var o = this.options, self = this;
BI.CenterAdaptLayout.superclass.render.apply(this, arguments); BI.CenterAdaptLayout.superclass.render.apply(this, arguments);
return { this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
type: "bi.horizontal", position: "relative",
verticalAlign: BI.VerticalAlign.Middle, width: "100%",
horizontalAlign: BI.HorizontalAlign.Center, height: "100%",
columnSize: o.columnSize, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
items: o.items, border: "none",
ref: function (_ref) { "border-collapse": "separate"
self.layout = _ref; });
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
td.element.css({"max-width": o.columnSize[i]});
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
}, },
resize: function () { resize: function () {
// console.log("center_adapt布局不需要resize"); // console.log("center_adapt布局不需要resize");
}, },
_getWrapper: function () {
return this.$tr;
},
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.CenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);/** BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);/**
@ -30723,6 +30781,106 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
} }
}); });
BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);/** 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 * @class BI.VerticalAdaptLayout
* @extends BI.Layout * @extends BI.Layout
@ -30731,7 +30889,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
props: { props: {
baseCls: "bi-vertical-adapt-layout", baseCls: "bi-vertical-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false, horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -30739,27 +30897,85 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
tgap: 0, tgap: 0,
bgap: 0 bgap: 0
}, },
render: function () { render: function () {
var self = this, o = this.options;
BI.VerticalAdaptLayout.superclass.render.apply(this, arguments); BI.VerticalAdaptLayout.superclass.render.apply(this, arguments);
return { var o = this.options;
type: "bi.horizontal", this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
verticalAlign: BI.VerticalAlign.Middle, position: "relative",
horizontalAlign: BI.HorizontalAlign.Left, width: o.horizontalAlign === BI.HorizontalAlign.Stretch ? "100%" : "auto",
columnSize: o.columnSize, height: "100%",
items: o.items, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
ref: function (_ref) { border: "none",
self.layout = _ref; "border-collapse": "separate"
});
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
},
_getWrapper: function () {
return this.$tr;
}, },
resize: function () { resize: function () {
@ -30767,7 +30983,8 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
}, },
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.VerticalAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);/** BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);/**
@ -58403,7 +58620,7 @@ BI.DatePicker = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.horizontal", type: "bi.horizontal",
width: 110, width: 120,
rgap: 10, rgap: 10,
items: [{ items: [{
el: this.year, el: this.year,

60
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

197
dist/bundle.js vendored

@ -30415,7 +30415,6 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-center-adapt-layout", baseCls: "bi-center-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -30425,33 +30424,92 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
}); });
}, },
render: function () { render: function () {
var o = this.options, self = this;
BI.CenterAdaptLayout.superclass.render.apply(this, arguments); BI.CenterAdaptLayout.superclass.render.apply(this, arguments);
return { this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
type: "bi.horizontal", position: "relative",
verticalAlign: BI.VerticalAlign.Middle, width: "100%",
horizontalAlign: BI.HorizontalAlign.Center, height: "100%",
columnSize: o.columnSize, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
items: o.items, border: "none",
ref: function (_ref) { "border-collapse": "separate"
self.layout = _ref; });
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
td.element.css({"max-width": o.columnSize[i]});
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
}, },
resize: function () { resize: function () {
// console.log("center_adapt布局不需要resize"); // console.log("center_adapt布局不需要resize");
}, },
_getWrapper: function () {
return this.$tr;
},
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.CenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);/** BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);/**
@ -30831,7 +30889,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
props: { props: {
baseCls: "bi-vertical-adapt-layout", baseCls: "bi-vertical-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false, horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -30839,27 +30897,85 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
tgap: 0, tgap: 0,
bgap: 0 bgap: 0
}, },
render: function () { render: function () {
var self = this, o = this.options;
BI.VerticalAdaptLayout.superclass.render.apply(this, arguments); BI.VerticalAdaptLayout.superclass.render.apply(this, arguments);
return { var o = this.options;
type: "bi.horizontal", this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
verticalAlign: BI.VerticalAlign.Middle, position: "relative",
horizontalAlign: BI.HorizontalAlign.Left, width: o.horizontalAlign === BI.HorizontalAlign.Stretch ? "100%" : "auto",
columnSize: o.columnSize, height: "100%",
items: o.items, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
ref: function (_ref) { border: "none",
self.layout = _ref; "border-collapse": "separate"
});
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
},
_getWrapper: function () {
return this.$tr;
}, },
resize: function () { resize: function () {
@ -30867,7 +30983,8 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
}, },
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.VerticalAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);/** BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);/**
@ -58907,7 +59024,7 @@ BI.DatePicker = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.horizontal", type: "bi.horizontal",
width: 110, width: 120,
rgap: 10, rgap: 10,
items: [{ items: [{
el: this.year, el: this.year,

60
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

195
dist/core.js vendored

@ -30415,7 +30415,6 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-center-adapt-layout", baseCls: "bi-center-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -30425,33 +30424,92 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
}); });
}, },
render: function () { render: function () {
var o = this.options, self = this;
BI.CenterAdaptLayout.superclass.render.apply(this, arguments); BI.CenterAdaptLayout.superclass.render.apply(this, arguments);
return { this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
type: "bi.horizontal", position: "relative",
verticalAlign: BI.VerticalAlign.Middle, width: "100%",
horizontalAlign: BI.HorizontalAlign.Center, height: "100%",
columnSize: o.columnSize, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
items: o.items, border: "none",
ref: function (_ref) { "border-collapse": "separate"
self.layout = _ref; });
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
td.element.css({"max-width": o.columnSize[i]});
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
}, },
resize: function () { resize: function () {
// console.log("center_adapt布局不需要resize"); // console.log("center_adapt布局不需要resize");
}, },
_getWrapper: function () {
return this.$tr;
},
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.CenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);/** BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);/**
@ -30831,7 +30889,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
props: { props: {
baseCls: "bi-vertical-adapt-layout", baseCls: "bi-vertical-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false, horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -30839,27 +30897,85 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
tgap: 0, tgap: 0,
bgap: 0 bgap: 0
}, },
render: function () { render: function () {
var self = this, o = this.options;
BI.VerticalAdaptLayout.superclass.render.apply(this, arguments); BI.VerticalAdaptLayout.superclass.render.apply(this, arguments);
return { var o = this.options;
type: "bi.horizontal", this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
verticalAlign: BI.VerticalAlign.Middle, position: "relative",
horizontalAlign: BI.HorizontalAlign.Left, width: o.horizontalAlign === BI.HorizontalAlign.Stretch ? "100%" : "auto",
columnSize: o.columnSize, height: "100%",
items: o.items, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
ref: function (_ref) { border: "none",
self.layout = _ref; "border-collapse": "separate"
});
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
},
_getWrapper: function () {
return this.$tr;
}, },
resize: function () { resize: function () {
@ -30867,7 +30983,8 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
}, },
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.VerticalAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);/** BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);/**

297
dist/fineui.ie.js vendored

@ -30657,7 +30657,6 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-center-adapt-layout", baseCls: "bi-center-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -30667,33 +30666,92 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
}); });
}, },
render: function () { render: function () {
var o = this.options, self = this;
BI.CenterAdaptLayout.superclass.render.apply(this, arguments); BI.CenterAdaptLayout.superclass.render.apply(this, arguments);
return { this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
type: "bi.horizontal", position: "relative",
verticalAlign: BI.VerticalAlign.Middle, width: "100%",
horizontalAlign: BI.HorizontalAlign.Center, height: "100%",
columnSize: o.columnSize, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
items: o.items, border: "none",
ref: function (_ref) { "border-collapse": "separate"
self.layout = _ref; });
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
td.element.css({"max-width": o.columnSize[i]});
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
}, },
resize: function () { resize: function () {
// console.log("center_adapt布局不需要resize"); // console.log("center_adapt布局不需要resize");
}, },
_getWrapper: function () {
return this.$tr;
},
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.CenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);/** BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);/**
@ -30965,6 +31023,106 @@ BI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {
} }
}); });
BI.shortcut("bi.right_vertical_adapt", BI.RightVerticalAdaptLayout);/** 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 * @class BI.VerticalAdaptLayout
* @extends BI.Layout * @extends BI.Layout
@ -30973,7 +31131,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
props: { props: {
baseCls: "bi-vertical-adapt-layout", baseCls: "bi-vertical-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false, horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -30981,27 +31139,85 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
tgap: 0, tgap: 0,
bgap: 0 bgap: 0
}, },
render: function () { render: function () {
var self = this, o = this.options;
BI.VerticalAdaptLayout.superclass.render.apply(this, arguments); BI.VerticalAdaptLayout.superclass.render.apply(this, arguments);
return { var o = this.options;
type: "bi.horizontal", this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
verticalAlign: BI.VerticalAlign.Middle, position: "relative",
horizontalAlign: BI.HorizontalAlign.Left, width: o.horizontalAlign === BI.HorizontalAlign.Stretch ? "100%" : "auto",
columnSize: o.columnSize, height: "100%",
items: o.items, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
ref: function (_ref) { border: "none",
self.layout = _ref; "border-collapse": "separate"
});
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
},
_getWrapper: function () {
return this.$tr;
}, },
resize: function () { resize: function () {
@ -31009,7 +31225,8 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
}, },
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.VerticalAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);/** BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);/**
@ -58645,7 +58862,7 @@ BI.DatePicker = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.horizontal", type: "bi.horizontal",
width: 110, width: 120,
rgap: 10, rgap: 10,
items: [{ items: [{
el: this.year, el: this.year,

60
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

197
dist/fineui.js vendored

@ -30657,7 +30657,6 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-center-adapt-layout", baseCls: "bi-center-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -30667,33 +30666,92 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
}); });
}, },
render: function () { render: function () {
var o = this.options, self = this;
BI.CenterAdaptLayout.superclass.render.apply(this, arguments); BI.CenterAdaptLayout.superclass.render.apply(this, arguments);
return { this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
type: "bi.horizontal", position: "relative",
verticalAlign: BI.VerticalAlign.Middle, width: "100%",
horizontalAlign: BI.HorizontalAlign.Center, height: "100%",
columnSize: o.columnSize, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
items: o.items, border: "none",
ref: function (_ref) { "border-collapse": "separate"
self.layout = _ref; });
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
td.element.css({"max-width": o.columnSize[i]});
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
}, },
resize: function () { resize: function () {
// console.log("center_adapt布局不需要resize"); // console.log("center_adapt布局不需要resize");
}, },
_getWrapper: function () {
return this.$tr;
},
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.CenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);/** BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);/**
@ -31073,7 +31131,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
props: { props: {
baseCls: "bi-vertical-adapt-layout", baseCls: "bi-vertical-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false, horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -31081,27 +31139,85 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
tgap: 0, tgap: 0,
bgap: 0 bgap: 0
}, },
render: function () { render: function () {
var self = this, o = this.options;
BI.VerticalAdaptLayout.superclass.render.apply(this, arguments); BI.VerticalAdaptLayout.superclass.render.apply(this, arguments);
return { var o = this.options;
type: "bi.horizontal", this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
verticalAlign: BI.VerticalAlign.Middle, position: "relative",
horizontalAlign: BI.HorizontalAlign.Left, width: o.horizontalAlign === BI.HorizontalAlign.Stretch ? "100%" : "auto",
columnSize: o.columnSize, height: "100%",
items: o.items, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
ref: function (_ref) { border: "none",
self.layout = _ref; "border-collapse": "separate"
});
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
},
_getWrapper: function () {
return this.$tr;
}, },
resize: function () { resize: function () {
@ -31109,7 +31225,8 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
}, },
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.VerticalAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);/** BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);/**
@ -59149,7 +59266,7 @@ BI.DatePicker = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.horizontal", type: "bi.horizontal",
width: 110, width: 120,
rgap: 10, rgap: 10,
items: [{ items: [{
el: this.year, el: this.year,

60
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

197
dist/fineui_without_jquery_polyfill.js vendored

@ -19426,7 +19426,6 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-center-adapt-layout", baseCls: "bi-center-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -19436,33 +19435,92 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
}); });
}, },
render: function () { render: function () {
var o = this.options, self = this;
BI.CenterAdaptLayout.superclass.render.apply(this, arguments); BI.CenterAdaptLayout.superclass.render.apply(this, arguments);
return { this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
type: "bi.horizontal", position: "relative",
verticalAlign: BI.VerticalAlign.Middle, width: "100%",
horizontalAlign: BI.HorizontalAlign.Center, height: "100%",
columnSize: o.columnSize, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
items: o.items, border: "none",
ref: function (_ref) { "border-collapse": "separate"
self.layout = _ref; });
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
td.element.css({"max-width": o.columnSize[i]});
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
}, },
resize: function () { resize: function () {
// console.log("center_adapt布局不需要resize"); // console.log("center_adapt布局不需要resize");
}, },
_getWrapper: function () {
return this.$tr;
},
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.CenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);/** BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);/**
@ -19842,7 +19900,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
props: { props: {
baseCls: "bi-vertical-adapt-layout", baseCls: "bi-vertical-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false, horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -19850,27 +19908,85 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
tgap: 0, tgap: 0,
bgap: 0 bgap: 0
}, },
render: function () { render: function () {
var self = this, o = this.options;
BI.VerticalAdaptLayout.superclass.render.apply(this, arguments); BI.VerticalAdaptLayout.superclass.render.apply(this, arguments);
return { var o = this.options;
type: "bi.horizontal", this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
verticalAlign: BI.VerticalAlign.Middle, position: "relative",
horizontalAlign: BI.HorizontalAlign.Left, width: o.horizontalAlign === BI.HorizontalAlign.Stretch ? "100%" : "auto",
columnSize: o.columnSize, height: "100%",
items: o.items, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
ref: function (_ref) { border: "none",
self.layout = _ref; "border-collapse": "separate"
});
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
},
_getWrapper: function () {
return this.$tr;
}, },
resize: function () { resize: function () {
@ -19878,7 +19994,8 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
}, },
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.VerticalAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);/** BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);/**
@ -42028,7 +42145,7 @@ BI.DatePicker = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.horizontal", type: "bi.horizontal",
width: 110, width: 120,
rgap: 10, rgap: 10,
items: [{ items: [{
el: this.year, el: this.year,

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/widget.js vendored

@ -246,7 +246,7 @@ BI.DatePicker = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.horizontal", type: "bi.horizontal",
width: 110, width: 120,
rgap: 10, rgap: 10,
items: [{ items: [{
el: this.year, el: this.year,

96
src/core/wrapper/layout/adapt/adapt.center.js

@ -8,7 +8,6 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-center-adapt-layout", baseCls: "bi-center-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -18,33 +17,92 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
}); });
}, },
render: function () { render: function () {
var o = this.options, self = this;
BI.CenterAdaptLayout.superclass.render.apply(this, arguments); BI.CenterAdaptLayout.superclass.render.apply(this, arguments);
return { this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
type: "bi.horizontal", position: "relative",
verticalAlign: BI.VerticalAlign.Middle, width: "100%",
horizontalAlign: BI.HorizontalAlign.Center, height: "100%",
columnSize: o.columnSize, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
items: o.items, border: "none",
ref: function (_ref) { "border-collapse": "separate"
self.layout = _ref; });
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
this.populate(this.options.items);
}, },
hgap: o.hgap,
vgap: o.vgap, _addElement: function (i, item) {
lgap: o.lgap, var o = this.options;
rgap: o.rgap, var td;
tgap: o.tgap, var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : o.columnSize[i];
bgap: o.bgap 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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
td.element.css({"max-width": o.columnSize[i]});
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
}, },
resize: function () { resize: function () {
// console.log("center_adapt布局不需要resize"); // console.log("center_adapt布局不需要resize");
}, },
_getWrapper: function () {
return this.$tr;
},
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.CenterAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout); BI.shortcut("bi.center_adapt", BI.CenterAdaptLayout);

99
src/core/wrapper/layout/adapt/adapt.vertical.js

@ -7,7 +7,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
props: { props: {
baseCls: "bi-vertical-adapt-layout", baseCls: "bi-vertical-adapt-layout",
columnSize: [], columnSize: [],
scrollx: false, horizontalAlign: BI.HorizontalAlign.Left,
hgap: 0, hgap: 0,
vgap: 0, vgap: 0,
lgap: 0, lgap: 0,
@ -15,27 +15,85 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
tgap: 0, tgap: 0,
bgap: 0 bgap: 0
}, },
render: function () { render: function () {
var self = this, o = this.options;
BI.VerticalAdaptLayout.superclass.render.apply(this, arguments); BI.VerticalAdaptLayout.superclass.render.apply(this, arguments);
return { var o = this.options;
type: "bi.horizontal", this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({
verticalAlign: BI.VerticalAlign.Middle, position: "relative",
horizontalAlign: BI.HorizontalAlign.Left, width: o.horizontalAlign === BI.HorizontalAlign.Stretch ? "100%" : "auto",
columnSize: o.columnSize, height: "100%",
items: o.items, "white-space": "nowrap",
scrollx: o.scrollx, "border-spacing": "0px",
ref: function (_ref) { border: "none",
self.layout = _ref; "border-collapse": "separate"
});
this.$tr = BI.Widget._renderEngine.createElement("<tr>");
this.$tr.appendTo(this.$table);
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",
tagName: "td",
attributes: {
width: width
},
items: [w]
});
this.addWidget(this._getChildName(i), td);
} else {
td = this.getWidgetByName(this._getChildName(i));
td.element.attr("width", width);
}
if (i === 0) {
td.element.addClass("first-element");
}
td.element.css({
position: "relative",
height: "100%",
"vertical-align": "middle",
margin: "0",
padding: "0",
border: "none"
});
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.$tr.append(frag);
this.element.append(this.$table);
}, },
hgap: o.hgap,
vgap: o.vgap, _getWrapper: function () {
lgap: o.lgap, return this.$tr;
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap
};
}, },
resize: function () { resize: function () {
@ -43,7 +101,8 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
}, },
populate: function (items) { populate: function (items) {
this.layout.populate.apply(this, arguments); BI.VerticalAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
} }
}); });
BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout); BI.shortcut("bi.vertical_adapt", BI.VerticalAdaptLayout);

2
src/widget/date/calendar/picker.date.js

@ -105,7 +105,7 @@ BI.DatePicker = BI.inherit(BI.Widget, {
items: [{ items: [{
el: { el: {
type: "bi.horizontal", type: "bi.horizontal",
width: 110, width: 120,
rgap: 10, rgap: 10,
items: [{ items: [{
el: this.year, el: this.year,

Loading…
Cancel
Save