guy 6 years ago
parent
commit
bb5d7ec599
  1. 199
      dist/2.0/fineui.ie.js
  2. 62
      dist/2.0/fineui.ie.min.js
  3. 199
      dist/2.0/fineui.js
  4. 62
      dist/2.0/fineui.min.js
  5. 199
      dist/bundle.ie.js
  6. 62
      dist/bundle.ie.min.js
  7. 199
      dist/bundle.js
  8. 62
      dist/bundle.min.js
  9. 199
      dist/core.js
  10. 98
      dist/demo.js
  11. 199
      dist/fineui.ie.js
  12. 62
      dist/fineui.ie.min.js
  13. 199
      dist/fineui.js
  14. 62
      dist/fineui.min.js
  15. 199
      dist/fineui_without_jquery_polyfill.js
  16. 2
      dist/utils.min.js
  17. 4
      src/core/wrapper/layout/flex/flex.horizontal.center.js
  18. 4
      src/core/wrapper/layout/flex/flex.vertical.center.js
  19. 4
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.center.js
  20. 4
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js
  21. 3
      src/core/wrapper/layout/layout.border.js
  22. 7
      src/core/wrapper/layout/layout.division.js
  23. 4
      src/core/wrapper/layout/layout.grid.js
  24. 3
      src/core/wrapper/layout/layout.table.js
  25. 11
      src/core/wrapper/layout/layout.tape.js
  26. 3
      src/core/wrapper/layout/layout.td.js
  27. 3
      src/core/wrapper/layout/layout.window.js
  28. 37
      src/core/wrapper/layout/middle/middle.center.js
  29. 37
      src/core/wrapper/layout/middle/middle.float.center.js
  30. 37
      src/core/wrapper/layout/middle/middle.horizontal.js
  31. 38
      src/core/wrapper/layout/middle/middle.vertical.js

199
dist/2.0/fineui.ie.js vendored

@ -31429,6 +31429,10 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31558,6 +31562,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31728,6 +31736,10 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31861,6 +31873,10 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -32271,6 +32287,9 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
}
},
update: function (opt) {
},
populate: function (items) {
BI.BorderLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -32598,6 +32617,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
var o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var map = BI.makeArray(rows), widths = {}, heights = {};
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -32634,6 +32654,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
firstObject(item, row, col);
}
}
BI.each(map, function (i) {
map[i] = BI.makeArray(columns);
});
@ -32656,7 +32677,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
if (!map[i][j]) {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
@ -32693,6 +32714,9 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.DivisionLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -32902,6 +32926,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < rows; i++) {
els[i] = [];
}
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -32968,6 +32993,9 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.GridLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33404,6 +33432,9 @@ BI.TableLayout = BI.inherit(BI.Layout, {
return BI.TableLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TableLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33506,6 +33537,14 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
var updated;
BI.each(this._children, function (i, child) {
updated = child.update() || updated;
});
return updated;
},
populate: function (items) {
BI.HTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33611,6 +33650,9 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
},
populate: function (items) {
BI.VTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33753,6 +33795,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
return BI.TdLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TdLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34001,6 +34046,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.WindowLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34026,19 +34074,6 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
render: function () {
BI.CenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34066,18 +34101,32 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.CenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.center", BI.CenterLayout);/**
@ -34099,19 +34148,6 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.FloatCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [], width = 100 / items.length;
BI.each(items, function (i) {
@ -34141,16 +34177,30 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.left",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
items: list
});
};
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.FloatCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.float_center", BI.FloatCenterLayout);/**
@ -34172,19 +34222,6 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.HorizontalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34211,18 +34248,32 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.HorizontalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.horizontal_center", BI.HorizontalCenterLayout);/**
@ -34242,21 +34293,9 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
bgap: 0
});
},
render: function () {
BI.VerticalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34283,18 +34322,32 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: 1,
rows: list.length,
items: list
});
};
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.VerticalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.vertical_center", BI.VerticalCenterLayout);/**

62
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

199
dist/2.0/fineui.js vendored

@ -31429,6 +31429,10 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31558,6 +31562,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31728,6 +31736,10 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31861,6 +31873,10 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -32271,6 +32287,9 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
}
},
update: function (opt) {
},
populate: function (items) {
BI.BorderLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -32598,6 +32617,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
var o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var map = BI.makeArray(rows), widths = {}, heights = {};
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -32634,6 +32654,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
firstObject(item, row, col);
}
}
BI.each(map, function (i) {
map[i] = BI.makeArray(columns);
});
@ -32656,7 +32677,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
if (!map[i][j]) {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
@ -32693,6 +32714,9 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.DivisionLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -32902,6 +32926,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < rows; i++) {
els[i] = [];
}
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -32968,6 +32993,9 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.GridLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33404,6 +33432,9 @@ BI.TableLayout = BI.inherit(BI.Layout, {
return BI.TableLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TableLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33506,6 +33537,14 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
var updated;
BI.each(this._children, function (i, child) {
updated = child.update() || updated;
});
return updated;
},
populate: function (items) {
BI.HTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33611,6 +33650,9 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
},
populate: function (items) {
BI.VTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33753,6 +33795,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
return BI.TdLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TdLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34001,6 +34046,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.WindowLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34026,19 +34074,6 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
render: function () {
BI.CenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34066,18 +34101,32 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.CenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.center", BI.CenterLayout);/**
@ -34099,19 +34148,6 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.FloatCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [], width = 100 / items.length;
BI.each(items, function (i) {
@ -34141,16 +34177,30 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.left",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
items: list
});
};
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.FloatCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.float_center", BI.FloatCenterLayout);/**
@ -34172,19 +34222,6 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.HorizontalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34211,18 +34248,32 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.HorizontalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.horizontal_center", BI.HorizontalCenterLayout);/**
@ -34242,21 +34293,9 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
bgap: 0
});
},
render: function () {
BI.VerticalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34283,18 +34322,32 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: 1,
rows: list.length,
items: list
});
};
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.VerticalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.vertical_center", BI.VerticalCenterLayout);/**

62
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

199
dist/bundle.ie.js vendored

@ -31429,6 +31429,10 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31558,6 +31562,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31728,6 +31736,10 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31861,6 +31873,10 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -32271,6 +32287,9 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
}
},
update: function (opt) {
},
populate: function (items) {
BI.BorderLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -32598,6 +32617,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
var o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var map = BI.makeArray(rows), widths = {}, heights = {};
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -32634,6 +32654,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
firstObject(item, row, col);
}
}
BI.each(map, function (i) {
map[i] = BI.makeArray(columns);
});
@ -32656,7 +32677,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
if (!map[i][j]) {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
@ -32693,6 +32714,9 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.DivisionLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -32902,6 +32926,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < rows; i++) {
els[i] = [];
}
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -32968,6 +32993,9 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.GridLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33404,6 +33432,9 @@ BI.TableLayout = BI.inherit(BI.Layout, {
return BI.TableLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TableLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33506,6 +33537,14 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
var updated;
BI.each(this._children, function (i, child) {
updated = child.update() || updated;
});
return updated;
},
populate: function (items) {
BI.HTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33611,6 +33650,9 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
},
populate: function (items) {
BI.VTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33753,6 +33795,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
return BI.TdLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TdLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34001,6 +34046,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.WindowLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34026,19 +34074,6 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
render: function () {
BI.CenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34066,18 +34101,32 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.CenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.center", BI.CenterLayout);/**
@ -34099,19 +34148,6 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.FloatCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [], width = 100 / items.length;
BI.each(items, function (i) {
@ -34141,16 +34177,30 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.left",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
items: list
});
};
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.FloatCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.float_center", BI.FloatCenterLayout);/**
@ -34172,19 +34222,6 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.HorizontalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34211,18 +34248,32 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.HorizontalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.horizontal_center", BI.HorizontalCenterLayout);/**
@ -34242,21 +34293,9 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
bgap: 0
});
},
render: function () {
BI.VerticalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34283,18 +34322,32 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: 1,
rows: list.length,
items: list
});
};
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.VerticalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.vertical_center", BI.VerticalCenterLayout);/**

62
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

199
dist/bundle.js vendored

@ -31429,6 +31429,10 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31558,6 +31562,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31728,6 +31736,10 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31861,6 +31873,10 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -32271,6 +32287,9 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
}
},
update: function (opt) {
},
populate: function (items) {
BI.BorderLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -32598,6 +32617,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
var o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var map = BI.makeArray(rows), widths = {}, heights = {};
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -32634,6 +32654,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
firstObject(item, row, col);
}
}
BI.each(map, function (i) {
map[i] = BI.makeArray(columns);
});
@ -32656,7 +32677,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
if (!map[i][j]) {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
@ -32693,6 +32714,9 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.DivisionLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -32902,6 +32926,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < rows; i++) {
els[i] = [];
}
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -32968,6 +32993,9 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.GridLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33404,6 +33432,9 @@ BI.TableLayout = BI.inherit(BI.Layout, {
return BI.TableLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TableLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33506,6 +33537,14 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
var updated;
BI.each(this._children, function (i, child) {
updated = child.update() || updated;
});
return updated;
},
populate: function (items) {
BI.HTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33611,6 +33650,9 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
},
populate: function (items) {
BI.VTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33753,6 +33795,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
return BI.TdLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TdLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34001,6 +34046,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.WindowLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34026,19 +34074,6 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
render: function () {
BI.CenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34066,18 +34101,32 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.CenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.center", BI.CenterLayout);/**
@ -34099,19 +34148,6 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.FloatCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [], width = 100 / items.length;
BI.each(items, function (i) {
@ -34141,16 +34177,30 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.left",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
items: list
});
};
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.FloatCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.float_center", BI.FloatCenterLayout);/**
@ -34172,19 +34222,6 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.HorizontalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34211,18 +34248,32 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.HorizontalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.horizontal_center", BI.HorizontalCenterLayout);/**
@ -34242,21 +34293,9 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
bgap: 0
});
},
render: function () {
BI.VerticalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34283,18 +34322,32 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: 1,
rows: list.length,
items: list
});
};
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.VerticalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.vertical_center", BI.VerticalCenterLayout);/**

62
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

199
dist/core.js vendored

@ -31429,6 +31429,10 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31558,6 +31562,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31728,6 +31736,10 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31861,6 +31873,10 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -32271,6 +32287,9 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
}
},
update: function (opt) {
},
populate: function (items) {
BI.BorderLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -32598,6 +32617,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
var o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var map = BI.makeArray(rows), widths = {}, heights = {};
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -32634,6 +32654,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
firstObject(item, row, col);
}
}
BI.each(map, function (i) {
map[i] = BI.makeArray(columns);
});
@ -32656,7 +32677,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
if (!map[i][j]) {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
@ -32693,6 +32714,9 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.DivisionLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -32902,6 +32926,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < rows; i++) {
els[i] = [];
}
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -32968,6 +32993,9 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.GridLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33404,6 +33432,9 @@ BI.TableLayout = BI.inherit(BI.Layout, {
return BI.TableLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TableLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33506,6 +33537,14 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
var updated;
BI.each(this._children, function (i, child) {
updated = child.update() || updated;
});
return updated;
},
populate: function (items) {
BI.HTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33611,6 +33650,9 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
},
populate: function (items) {
BI.VTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33753,6 +33795,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
return BI.TdLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TdLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34001,6 +34046,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.WindowLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34026,19 +34074,6 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
render: function () {
BI.CenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34066,18 +34101,32 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.CenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.center", BI.CenterLayout);/**
@ -34099,19 +34148,6 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.FloatCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [], width = 100 / items.length;
BI.each(items, function (i) {
@ -34141,16 +34177,30 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.left",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
items: list
});
};
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.FloatCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.float_center", BI.FloatCenterLayout);/**
@ -34172,19 +34222,6 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.HorizontalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34211,18 +34248,32 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.HorizontalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.horizontal_center", BI.HorizontalCenterLayout);/**
@ -34242,21 +34293,9 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
bgap: 0
});
},
render: function () {
BI.VerticalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34283,18 +34322,32 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: 1,
rows: list.length,
items: list
});
};
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.VerticalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.vertical_center", BI.VerticalCenterLayout);/**

98
dist/demo.js vendored

@ -6183,103 +6183,7 @@ Demo.VtapeLayout = BI.inherit(BI.Widget, {
};
}
});
BI.shortcut("demo.vtape", Demo.VtapeLayout);// !(function () {
// BI.constant("bi.constant.report.server.param_setting", {
// TAB: [{
// text: BI.i18"分页预览设置",
// value: "SPLIT_PAGE_PREVIEW_SETTING"
// }, {
// text: "填报页面设置",
// value
// }, {
// text: "数据分析设置"
// }, {
// text: ""
// }, {
//
// }, {
//
// }]
// SPLIT_PAGE_PREVIEW_SETTING: 1,
// FORM_PAGE_SETTING: 2,
// DATA_ANALYSIS_SETTING: 3,
// IMPORT_CSS: 4,
// IMPORT_JS: 5,
// ERROR_TEMPLATE_DEFINE: 6,
// PRINT_SETTING: 7
// });
// })();// !(function () {
//
// var constants = {
// SPLIT_PAGE_PREVIEW_SETTING: 1,
// FORM_PAGE_SETTING: 2,
// DATA_ANALYSIS_SETTING: 3,
// IMPORT_CSS: 4,
// IMPORT_JS: 5,
// ERROR_TEMPLATE_DEFINE: 6,
// PRINT_SETTING: 7
// };
//
// var Tab = BI.inherit(BI.Widget, {
//
// props: {
// baseCls: "bi-report-server-param-setting"
// },
//
// render: function () {
// return {
// type: "bi.vtape",
// items: [{
// type: "bi.vertical_adapt",
// cls: "tab-group",
// items: [{
// type: "bi.button_group",
// items: [],
// layouts: [{
// type: "bi.left"
// }],
// listeners: [{
// eventName: BI.ButtonGroup.EVENT_CHANGE,
// action: function (v) {
//
// }
// }],
// ref: function (_ref) {
// // self.buttons = _ref;
// }
// }],
// height: 24
// }, {
// type: "bi.tab",
// cls: "bi-card",
// cardCreator: BI.bind(this._createCard, this),
// ref: function (ref) {
// // self.tableTab = ref;
// }
// }]
// };
// },
//
// _createTabItem: function() {
// return BI.map()
// },
//
// _createCard: function (v) {
// switch (v) {
// case SPLIT_PAGE_PREVIEW_SETTING:
// case FORM_PAGE_SETTING:
// case DATA_ANALYSIS_SETTING: 3,
// case IMPORT_CSS: 4,
// case IMPORT_JS: 5,
// case ERROR_TEMPLATE_DEFINE: 6,
// case PRINT_SETTING: 7
// }
// }
//
// });
//
// BI.shortcut("bi.report.server.param_setting", Tab);
/** })(); **//**
BI.shortcut("demo.vtape", Demo.VtapeLayout);/**
* Created by Windy on 2017/12/13.
*/
Demo.Func = BI.inherit(BI.Widget, {

199
dist/fineui.ie.js vendored

@ -31674,6 +31674,10 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31803,6 +31807,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31973,6 +31981,10 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -32106,6 +32118,10 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -32516,6 +32532,9 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
}
},
update: function (opt) {
},
populate: function (items) {
BI.BorderLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -32843,6 +32862,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
var o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var map = BI.makeArray(rows), widths = {}, heights = {};
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -32879,6 +32899,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
firstObject(item, row, col);
}
}
BI.each(map, function (i) {
map[i] = BI.makeArray(columns);
});
@ -32901,7 +32922,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
if (!map[i][j]) {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
@ -32938,6 +32959,9 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.DivisionLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33147,6 +33171,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < rows; i++) {
els[i] = [];
}
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -33213,6 +33238,9 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.GridLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33649,6 +33677,9 @@ BI.TableLayout = BI.inherit(BI.Layout, {
return BI.TableLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TableLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33751,6 +33782,14 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
var updated;
BI.each(this._children, function (i, child) {
updated = child.update() || updated;
});
return updated;
},
populate: function (items) {
BI.HTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33856,6 +33895,9 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
},
populate: function (items) {
BI.VTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33998,6 +34040,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
return BI.TdLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TdLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34246,6 +34291,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.WindowLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34271,19 +34319,6 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
render: function () {
BI.CenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34311,18 +34346,32 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.CenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.center", BI.CenterLayout);/**
@ -34344,19 +34393,6 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.FloatCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [], width = 100 / items.length;
BI.each(items, function (i) {
@ -34386,16 +34422,30 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.left",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
items: list
});
};
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.FloatCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.float_center", BI.FloatCenterLayout);/**
@ -34417,19 +34467,6 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.HorizontalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34456,18 +34493,32 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.HorizontalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.horizontal_center", BI.HorizontalCenterLayout);/**
@ -34487,21 +34538,9 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
bgap: 0
});
},
render: function () {
BI.VerticalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34528,18 +34567,32 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: 1,
rows: list.length,
items: list
});
};
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.VerticalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.vertical_center", BI.VerticalCenterLayout);/**

62
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

199
dist/fineui.js vendored

@ -31674,6 +31674,10 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31803,6 +31807,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -31973,6 +31981,10 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -32106,6 +32118,10 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -32516,6 +32532,9 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
}
},
update: function (opt) {
},
populate: function (items) {
BI.BorderLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -32843,6 +32862,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
var o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var map = BI.makeArray(rows), widths = {}, heights = {};
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -32879,6 +32899,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
firstObject(item, row, col);
}
}
BI.each(map, function (i) {
map[i] = BI.makeArray(columns);
});
@ -32901,7 +32922,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
if (!map[i][j]) {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
@ -32938,6 +32959,9 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.DivisionLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33147,6 +33171,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < rows; i++) {
els[i] = [];
}
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -33213,6 +33238,9 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.GridLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33649,6 +33677,9 @@ BI.TableLayout = BI.inherit(BI.Layout, {
return BI.TableLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TableLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33751,6 +33782,14 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
var updated;
BI.each(this._children, function (i, child) {
updated = child.update() || updated;
});
return updated;
},
populate: function (items) {
BI.HTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33856,6 +33895,9 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
},
populate: function (items) {
BI.VTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -33998,6 +34040,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
return BI.TdLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TdLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34246,6 +34291,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.WindowLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -34271,19 +34319,6 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
render: function () {
BI.CenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34311,18 +34346,32 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.CenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.center", BI.CenterLayout);/**
@ -34344,19 +34393,6 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.FloatCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [], width = 100 / items.length;
BI.each(items, function (i) {
@ -34386,16 +34422,30 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.left",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
items: list
});
};
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.FloatCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.float_center", BI.FloatCenterLayout);/**
@ -34417,19 +34467,6 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.HorizontalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34456,18 +34493,32 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.HorizontalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.horizontal_center", BI.HorizontalCenterLayout);/**
@ -34487,21 +34538,9 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
bgap: 0
});
},
render: function () {
BI.VerticalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -34528,18 +34567,32 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: 1,
rows: list.length,
items: list
});
};
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.VerticalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.vertical_center", BI.VerticalCenterLayout);/**

62
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

199
dist/fineui_without_jquery_polyfill.js vendored

@ -20319,6 +20319,10 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -20448,6 +20452,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -20618,6 +20626,10 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -20751,6 +20763,10 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}
@ -21161,6 +21177,9 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
}
},
update: function (opt) {
},
populate: function (items) {
BI.BorderLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -21488,6 +21507,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
var o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var map = BI.makeArray(rows), widths = {}, heights = {};
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -21524,6 +21544,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
firstObject(item, row, col);
}
}
BI.each(map, function (i) {
map[i] = BI.makeArray(columns);
});
@ -21546,7 +21567,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
if (!map[i][j]) {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
@ -21583,6 +21604,9 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.DivisionLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -21792,6 +21816,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < rows; i++) {
els[i] = [];
}
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -21858,6 +21883,9 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.GridLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -22294,6 +22322,9 @@ BI.TableLayout = BI.inherit(BI.Layout, {
return BI.TableLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TableLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -22396,6 +22427,14 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
var updated;
BI.each(this._children, function (i, child) {
updated = child.update() || updated;
});
return updated;
},
populate: function (items) {
BI.HTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -22501,6 +22540,9 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
},
populate: function (items) {
BI.VTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -22643,6 +22685,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
return BI.TdLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TdLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -22891,6 +22936,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.WindowLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -22916,19 +22964,6 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
render: function () {
BI.CenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -22956,18 +22991,32 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.CenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.center", BI.CenterLayout);/**
@ -22989,19 +23038,6 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.FloatCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [], width = 100 / items.length;
BI.each(items, function (i) {
@ -23031,16 +23067,30 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.left",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
items: list
});
};
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.FloatCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.float_center", BI.FloatCenterLayout);/**
@ -23062,19 +23112,6 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.HorizontalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -23101,18 +23138,32 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.HorizontalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.horizontal_center", BI.HorizontalCenterLayout);/**
@ -23132,21 +23183,9 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
bgap: 0
});
},
render: function () {
BI.VerticalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -23173,18 +23212,32 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: 1,
rows: list.length,
items: list
});
};
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.VerticalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.vertical_center", BI.VerticalCenterLayout);/**

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

4
src/core/wrapper/layout/flex/flex.horizontal.center.js

@ -46,6 +46,10 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}

4
src/core/wrapper/layout/flex/flex.vertical.center.js

@ -47,6 +47,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
// console.log("flex_vertical_center_adapt布局不需要resize");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}

4
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.center.js

@ -44,6 +44,10 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}

4
src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js

@ -44,6 +44,10 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
};
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
this.wrapper.populate(items);
}

3
src/core/wrapper/layout/layout.border.js

@ -124,6 +124,9 @@ BI.BorderLayout = BI.inherit(BI.Layout, {
}
},
update: function (opt) {
},
populate: function (items) {
BI.BorderLayout.superclass.populate.apply(this, arguments);
this._mount();

7
src/core/wrapper/layout/layout.division.js

@ -54,6 +54,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
var o = this.options;
var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);
var map = BI.makeArray(rows), widths = {}, heights = {};
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -90,6 +91,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
firstObject(item, row, col);
}
}
BI.each(map, function (i) {
map[i] = BI.makeArray(columns);
});
@ -112,7 +114,7 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
if (!map[i][j]) {
throw new Error("item be required");
}
if(!this.hasWidget(this.getName() + i + "_" + j)) {
if (!this.hasWidget(this.getName() + i + "_" + j)) {
var w = BI.createWidget(map[i][j]);
this.addWidget(this.getName() + i + "_" + j, w);
} else {
@ -149,6 +151,9 @@ BI.DivisionLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.DivisionLayout.superclass.populate.apply(this, arguments);
this._mount();

4
src/core/wrapper/layout/layout.grid.js

@ -52,6 +52,7 @@ BI.GridLayout = BI.inherit(BI.Layout, {
for (var i = 0; i < rows; i++) {
els[i] = [];
}
function firstElement (item, row, col) {
if (row === 0) {
item.addClass("first-row");
@ -118,6 +119,9 @@ BI.GridLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.GridLayout.superclass.populate.apply(this, arguments);
this._mount();

3
src/core/wrapper/layout/layout.table.js

@ -138,6 +138,9 @@ BI.TableLayout = BI.inherit(BI.Layout, {
return BI.TableLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TableLayout.superclass.populate.apply(this, arguments);
this._mount();

11
src/core/wrapper/layout/layout.tape.js

@ -95,6 +95,14 @@ BI.HTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
var updated;
BI.each(this._children, function (i, child) {
updated = child.update() || updated;
});
return updated;
},
populate: function (items) {
BI.HTapeLayout.superclass.populate.apply(this, arguments);
this._mount();
@ -200,6 +208,9 @@ BI.VTapeLayout = BI.inherit(BI.Layout, {
});
},
update: function () {
},
populate: function (items) {
BI.VTapeLayout.superclass.populate.apply(this, arguments);
this._mount();

3
src/core/wrapper/layout/layout.td.js

@ -135,6 +135,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
return BI.TdLayout.superclass.addItem.apply(this, arguments);
},
update: function () {
},
populate: function (items) {
BI.TdLayout.superclass.populate.apply(this, arguments);
this._mount();

3
src/core/wrapper/layout/layout.window.js

@ -180,6 +180,9 @@ BI.WindowLayout = BI.inherit(BI.Layout, {
}
},
update: function () {
},
populate: function (items) {
BI.WindowLayout.superclass.populate.apply(this, arguments);
this._mount();

37
src/core/wrapper/layout/middle/middle.center.js

@ -18,19 +18,6 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
render: function () {
BI.CenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -58,18 +45,32 @@ BI.CenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.CenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.center", BI.CenterLayout);

37
src/core/wrapper/layout/middle/middle.float.center.js

@ -17,19 +17,6 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.FloatCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [], width = 100 / items.length;
BI.each(items, function (i) {
@ -59,16 +46,30 @@ BI.FloatCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.left",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
items: list
});
};
},
resize: function () {
// console.log("floatcenter布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.FloatCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.float_center", BI.FloatCenterLayout);

37
src/core/wrapper/layout/middle/middle.horizontal.js

@ -17,19 +17,6 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
},
render: function () {
BI.HorizontalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -56,18 +43,32 @@ BI.HorizontalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: list.length,
rows: 1,
items: list
});
};
},
resize: function () {
// console.log("horizontal_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.HorizontalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.horizontal_center", BI.HorizontalCenterLayout);

38
src/core/wrapper/layout/middle/middle.vertical.js

@ -15,21 +15,9 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
bgap: 0
});
},
render: function () {
BI.VerticalCenterLayout.superclass.render.apply(this, arguments);
this.populate(this.options.items);
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
stroke: function (items) {
var self = this, o = this.options;
var list = [];
BI.each(items, function (i) {
@ -56,18 +44,32 @@ BI.VerticalCenterLayout = BI.inherit(BI.Layout, {
list[i].el.addItem(w);
}
});
BI.createWidget({
return {
type: "bi.grid",
element: this,
ref: function (_ref) {
self.wrapper = _ref;
},
columns: 1,
rows: list.length,
items: list
});
};
},
resize: function () {
// console.log("vertical_center布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("cannot be added");
},
update: function (opt) {
return this.wrapper.update(opt);
},
populate: function (items) {
BI.VerticalCenterLayout.superclass.populate.apply(this, arguments);
this._mount();
this.wrapper.populate.apply(this.wrapper, arguments);
}
});
BI.shortcut("bi.vertical_center", BI.VerticalCenterLayout);
Loading…
Cancel
Save