Browse Source

Merge branch 'master' into bugfix/BI-24627

# Conflicts:
#	dist/_fineui.min.js
#	dist/base.js
#	dist/bundle.js
#	dist/bundle.min.js
#	dist/fineui.js
#	dist/fineui.min.js
#	src/base/formula/formulaeditor.js
master
iapyang 7 years ago
parent
commit
a3f323f189
  1. 1
      demo/js/case/combo/demo.search_text_value_combo.js
  2. 2
      demo/js/widget/multiselect/demo.multi_select_combo.js
  3. 64
      dist/_fineui.min.js
  4. 28
      dist/base.js
  5. 66
      dist/bundle.js
  6. 62
      dist/bundle.min.js
  7. 2
      dist/case.js
  8. 3
      dist/demo.js
  9. 66
      dist/fineui.js
  10. 65
      dist/fineui.min.js
  11. 36
      dist/widget.js
  12. 1
      src/base/formula/formulaeditor.js
  13. 10
      src/base/single/button/buttons/button.js
  14. 7
      src/base/table/table.cell.js
  15. 8
      src/base/table/table.header.cell.js
  16. 2
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  17. 9
      src/widget/previewtable/previewtable.cell.js
  18. 9
      src/widget/previewtable/previewtable.header.cell.js
  19. 18
      src/widget/previewtable/previewtable.js

1
demo/js/case/combo/demo.search_text_value_combo.js

@ -14,6 +14,7 @@ Demo.SearchTextValueCombo = BI.inherit(BI.Widget, {
ref: function () { ref: function () {
combo = this; combo = this;
}, },
warningTitle: "111",
text: "默认值", text: "默认值",
value: 14, value: 14,
width: 300, width: 300,

2
demo/js/widget/multiselect/demo.multi_select_combo.js

@ -9,7 +9,7 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
_createMultiSelectCombo: function () { _createMultiSelectCombo: function () {
var self = this; var self = this;
var widget = BI.createWidget({ var widget = BI.createWidget({
type: "bi.multi_select_insert_no_bar_combo", type: "bi.multi_select_insert_combo",
itemsCreator: BI.bind(this._itemsCreator, this), itemsCreator: BI.bind(this._itemsCreator, this),
width: 200, width: 200,
value: { value: {

64
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

28
dist/base.js vendored

@ -14740,7 +14740,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
break; break;
} }
}); });
return value; return value;
}); });
return v.replaceAll("(\\$\\{.*?\\})\\s", "$1"); return v.replaceAll("(\\$\\{.*?\\})\\s", "$1");
@ -15412,7 +15411,7 @@ BI.Popover = BI.inherit(BI.Widget, {
items: [{ items: [{
el: BI.createWidget(o.body), el: BI.createWidget(o.body),
left: 20, left: 20,
top: 10, top: 20,
right: 20, right: 20,
bottom: 0 bottom: 0
}] }]
@ -16722,19 +16721,21 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
BI.Button.superclass._init.apply(this, arguments); BI.Button.superclass._init.apply(this, arguments);
var o = this.options, self = this; var o = this.options, self = this;
if (BI.isNumber(o.height) && !o.clear && !o.block) { if (BI.isNumber(o.height) && !o.clear && !o.block) {
this.element.css({height: o.height + "px", lineHeight: o.height + "px"}); this.element.css({height: o.height + "px", lineHeight: (o.height - 2) + "px"});
} else { } else {
this.element.css({lineHeight: o.height + "px"}); this.element.css({lineHeight: (o.height - 2) + "px"});
} }
if (BI.isKey(o.iconCls)) { if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon", type: "bi.icon",
width: 18 width: 18,
height: o.height - 2
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.label",
text: o.text, text: o.text,
value: o.value value: o.value,
height: o.height - 2
}); });
BI.createWidget({ BI.createWidget({
type: "bi.horizontal_auto", type: "bi.horizontal_auto",
@ -30090,15 +30091,18 @@ BI.TableCell = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
BI.TableCell.superclass._init.apply(this, arguments); BI.TableCell.superclass._init.apply(this, arguments);
var o = this.options;
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
whiteSpace: "nowrap", whiteSpace: o.whiteSpace || "nowrap",
textAlign: this.options.textAlign, textAlign: this.options.textAlign,
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value, value: this.options.value,
lgap: 5 lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });
@ -32104,13 +32108,17 @@ BI.TableHeaderCell = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
BI.TableHeaderCell.superclass._init.apply(this, arguments); BI.TableHeaderCell.superclass._init.apply(this, arguments);
var o = this.options;
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
textAlign: "center", textAlign: o.textAlign || "center",
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value value: this.options.value,
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });

66
dist/bundle.js vendored

@ -50510,7 +50510,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
break; break;
} }
}); });
return value; return value;
}); });
return v.replaceAll("(\\$\\{.*?\\})\\s", "$1"); return v.replaceAll("(\\$\\{.*?\\})\\s", "$1");
@ -51182,7 +51181,7 @@ BI.Popover = BI.inherit(BI.Widget, {
items: [{ items: [{
el: BI.createWidget(o.body), el: BI.createWidget(o.body),
left: 20, left: 20,
top: 10, top: 20,
right: 20, right: 20,
bottom: 0 bottom: 0
}] }]
@ -52492,19 +52491,21 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
BI.Button.superclass._init.apply(this, arguments); BI.Button.superclass._init.apply(this, arguments);
var o = this.options, self = this; var o = this.options, self = this;
if (BI.isNumber(o.height) && !o.clear && !o.block) { if (BI.isNumber(o.height) && !o.clear && !o.block) {
this.element.css({height: o.height + "px", lineHeight: o.height + "px"}); this.element.css({height: o.height + "px", lineHeight: (o.height - 2) + "px"});
} else { } else {
this.element.css({lineHeight: o.height + "px"}); this.element.css({lineHeight: (o.height - 2) + "px"});
} }
if (BI.isKey(o.iconCls)) { if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon", type: "bi.icon",
width: 18 width: 18,
height: o.height - 2
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.label",
text: o.text, text: o.text,
value: o.value value: o.value,
height: o.height - 2
}); });
BI.createWidget({ BI.createWidget({
type: "bi.horizontal_auto", type: "bi.horizontal_auto",
@ -65860,15 +65861,18 @@ BI.TableCell = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
BI.TableCell.superclass._init.apply(this, arguments); BI.TableCell.superclass._init.apply(this, arguments);
var o = this.options;
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
whiteSpace: "nowrap", whiteSpace: o.whiteSpace || "nowrap",
textAlign: this.options.textAlign, textAlign: this.options.textAlign,
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value, value: this.options.value,
lgap: 5 lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });
@ -67874,13 +67878,17 @@ BI.TableHeaderCell = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
BI.TableHeaderCell.superclass._init.apply(this, arguments); BI.TableHeaderCell.superclass._init.apply(this, arguments);
var o = this.options;
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
textAlign: "center", textAlign: o.textAlign || "center",
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value value: this.options.value,
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });
@ -78634,8 +78642,10 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
}); });
if (BI.isNull(result)) { if (BI.isNull(result)) {
this.element.removeClass("combo-error").addClass("combo-error"); this.element.removeClass("combo-error").addClass("combo-error");
this.trigger.attr("tipType", "warning");
} else { } else {
this.element.removeClass("combo-error"); this.element.removeClass("combo-error");
this.trigger.attr("tipType", "success");
} }
} }
}, },
@ -103461,11 +103471,14 @@ BI.PreviewTableCell = BI.inherit(BI.Widget, {
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
textAlign: "left", textAlign: o.textAlign || "left",
whiteSpace: "normal", whiteSpace: o.whiteSpace || "normal",
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value value: this.options.value,
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });
@ -103492,11 +103505,14 @@ BI.PreviewTableHeaderCell = BI.inherit(BI.Widget, {
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
textAlign: "left", textAlign: o.textAlign || "left",
whiteSpace: "normal", whiteSpace: o.whiteSpace || "normal",
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value value: this.options.value,
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });
@ -103699,6 +103715,24 @@ BI.PreviewTable = BI.inherit(BI.Widget, {
}, },
populate: function (items, header) { populate: function (items, header) {
if (items) {
items = BI.map(items, function (i, items) {
return BI.map(items, function (j, item) {
return BI.extend({
type: "bi.preview_table_cell"
}, item);
});
});
}
if (header) {
header = BI.map(header, function (i, items) {
return BI.map(items, function (j, item) {
return BI.extend({
type: "bi.preview_table_header_cell"
}, item);
});
});
}
this.table.populate(items, header); this.table.populate(items, header);
this._adjustColumns(); this._adjustColumns();
} }

62
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/case.js vendored

@ -6163,8 +6163,10 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
}); });
if (BI.isNull(result)) { if (BI.isNull(result)) {
this.element.removeClass("combo-error").addClass("combo-error"); this.element.removeClass("combo-error").addClass("combo-error");
this.trigger.attr("tipType", "warning");
} else { } else {
this.element.removeClass("combo-error"); this.element.removeClass("combo-error");
this.trigger.attr("tipType", "success");
} }
} }
}, },

3
dist/demo.js vendored

@ -2068,6 +2068,7 @@ Demo.SearchTextValueCombo = BI.inherit(BI.Widget, {
ref: function () { ref: function () {
combo = this; combo = this;
}, },
warningTitle: "111",
text: "默认值", text: "默认值",
value: 14, value: 14,
width: 300, width: 300,
@ -12762,7 +12763,7 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
_createMultiSelectCombo: function () { _createMultiSelectCombo: function () {
var self = this; var self = this;
var widget = BI.createWidget({ var widget = BI.createWidget({
type: "bi.multi_select_insert_no_bar_combo", type: "bi.multi_select_insert_combo",
itemsCreator: BI.bind(this._itemsCreator, this), itemsCreator: BI.bind(this._itemsCreator, this),
width: 200, width: 200,
value: { value: {

66
dist/fineui.js vendored

@ -50753,7 +50753,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
break; break;
} }
}); });
return value; return value;
}); });
return v.replaceAll("(\\$\\{.*?\\})\\s", "$1"); return v.replaceAll("(\\$\\{.*?\\})\\s", "$1");
@ -51425,7 +51424,7 @@ BI.Popover = BI.inherit(BI.Widget, {
items: [{ items: [{
el: BI.createWidget(o.body), el: BI.createWidget(o.body),
left: 20, left: 20,
top: 10, top: 20,
right: 20, right: 20,
bottom: 0 bottom: 0
}] }]
@ -52735,19 +52734,21 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
BI.Button.superclass._init.apply(this, arguments); BI.Button.superclass._init.apply(this, arguments);
var o = this.options, self = this; var o = this.options, self = this;
if (BI.isNumber(o.height) && !o.clear && !o.block) { if (BI.isNumber(o.height) && !o.clear && !o.block) {
this.element.css({height: o.height + "px", lineHeight: o.height + "px"}); this.element.css({height: o.height + "px", lineHeight: (o.height - 2) + "px"});
} else { } else {
this.element.css({lineHeight: o.height + "px"}); this.element.css({lineHeight: (o.height - 2) + "px"});
} }
if (BI.isKey(o.iconCls)) { if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon", type: "bi.icon",
width: 18 width: 18,
height: o.height - 2
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.label",
text: o.text, text: o.text,
value: o.value value: o.value,
height: o.height - 2
}); });
BI.createWidget({ BI.createWidget({
type: "bi.horizontal_auto", type: "bi.horizontal_auto",
@ -66103,15 +66104,18 @@ BI.TableCell = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
BI.TableCell.superclass._init.apply(this, arguments); BI.TableCell.superclass._init.apply(this, arguments);
var o = this.options;
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
whiteSpace: "nowrap", whiteSpace: o.whiteSpace || "nowrap",
textAlign: this.options.textAlign, textAlign: this.options.textAlign,
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value, value: this.options.value,
lgap: 5 lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });
@ -68117,13 +68121,17 @@ BI.TableHeaderCell = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
BI.TableHeaderCell.superclass._init.apply(this, arguments); BI.TableHeaderCell.superclass._init.apply(this, arguments);
var o = this.options;
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
textAlign: "center", textAlign: o.textAlign || "center",
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value value: this.options.value,
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });
@ -78877,8 +78885,10 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
}); });
if (BI.isNull(result)) { if (BI.isNull(result)) {
this.element.removeClass("combo-error").addClass("combo-error"); this.element.removeClass("combo-error").addClass("combo-error");
this.trigger.attr("tipType", "warning");
} else { } else {
this.element.removeClass("combo-error"); this.element.removeClass("combo-error");
this.trigger.attr("tipType", "success");
} }
} }
}, },
@ -103704,11 +103714,14 @@ BI.PreviewTableCell = BI.inherit(BI.Widget, {
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
textAlign: "left", textAlign: o.textAlign || "left",
whiteSpace: "normal", whiteSpace: o.whiteSpace || "normal",
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value value: this.options.value,
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });
@ -103735,11 +103748,14 @@ BI.PreviewTableHeaderCell = BI.inherit(BI.Widget, {
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
textAlign: "left", textAlign: o.textAlign || "left",
whiteSpace: "normal", whiteSpace: o.whiteSpace || "normal",
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value value: this.options.value,
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });
@ -103942,6 +103958,24 @@ BI.PreviewTable = BI.inherit(BI.Widget, {
}, },
populate: function (items, header) { populate: function (items, header) {
if (items) {
items = BI.map(items, function (i, items) {
return BI.map(items, function (j, item) {
return BI.extend({
type: "bi.preview_table_cell"
}, item);
});
});
}
if (header) {
header = BI.map(header, function (i, items) {
return BI.map(items, function (j, item) {
return BI.extend({
type: "bi.preview_table_header_cell"
}, item);
});
});
}
this.table.populate(items, header); this.table.populate(items, header);
this._adjustColumns(); this._adjustColumns();
} }

65
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

36
dist/widget.js vendored

@ -15847,11 +15847,14 @@ BI.PreviewTableCell = BI.inherit(BI.Widget, {
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
textAlign: "left", textAlign: o.textAlign || "left",
whiteSpace: "normal", whiteSpace: o.whiteSpace || "normal",
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value value: this.options.value,
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });
@ -15878,11 +15881,14 @@ BI.PreviewTableHeaderCell = BI.inherit(BI.Widget, {
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
textAlign: "left", textAlign: o.textAlign || "left",
whiteSpace: "normal", whiteSpace: o.whiteSpace || "normal",
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value value: this.options.value,
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });
@ -16085,6 +16091,24 @@ BI.PreviewTable = BI.inherit(BI.Widget, {
}, },
populate: function (items, header) { populate: function (items, header) {
if (items) {
items = BI.map(items, function (i, items) {
return BI.map(items, function (j, item) {
return BI.extend({
type: "bi.preview_table_cell"
}, item);
});
});
}
if (header) {
header = BI.map(header, function (i, items) {
return BI.map(items, function (j, item) {
return BI.extend({
type: "bi.preview_table_header_cell"
}, item);
});
});
}
this.table.populate(items, header); this.table.populate(items, header);
this._adjustColumns(); this._adjustColumns();
} }

1
src/base/formula/formulaeditor.js

@ -217,7 +217,6 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
break; break;
} }
}); });
return value; return value;
}); });
return v.replaceAll("(\\$\\{.*?\\})\\s", "$1"); return v.replaceAll("(\\$\\{.*?\\})\\s", "$1");

10
src/base/single/button/buttons/button.js

@ -42,19 +42,21 @@
BI.Button.superclass._init.apply(this, arguments); BI.Button.superclass._init.apply(this, arguments);
var o = this.options, self = this; var o = this.options, self = this;
if (BI.isNumber(o.height) && !o.clear && !o.block) { if (BI.isNumber(o.height) && !o.clear && !o.block) {
this.element.css({height: o.height + "px", lineHeight: o.height + "px"}); this.element.css({height: o.height + "px", lineHeight: (o.height - 2) + "px"});
} else { } else {
this.element.css({lineHeight: o.height + "px"}); this.element.css({lineHeight: (o.height - 2) + "px"});
} }
if (BI.isKey(o.iconCls)) { if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon", type: "bi.icon",
width: 18 width: 18,
height: o.height - 2
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.label",
text: o.text, text: o.text,
value: o.value value: o.value,
height: o.height - 2
}); });
BI.createWidget({ BI.createWidget({
type: "bi.horizontal_auto", type: "bi.horizontal_auto",

7
src/base/table/table.cell.js

@ -17,15 +17,18 @@ BI.TableCell = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
BI.TableCell.superclass._init.apply(this, arguments); BI.TableCell.superclass._init.apply(this, arguments);
var o = this.options;
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
whiteSpace: "nowrap", whiteSpace: o.whiteSpace || "nowrap",
textAlign: this.options.textAlign, textAlign: this.options.textAlign,
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value, value: this.options.value,
lgap: 5 lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });

8
src/base/table/table.header.cell.js

@ -16,13 +16,17 @@ BI.TableHeaderCell = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
BI.TableHeaderCell.superclass._init.apply(this, arguments); BI.TableHeaderCell.superclass._init.apply(this, arguments);
var o = this.options;
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
textAlign: "center", textAlign: o.textAlign || "center",
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value value: this.options.value,
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });

2
src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js

@ -125,8 +125,10 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
}); });
if (BI.isNull(result)) { if (BI.isNull(result)) {
this.element.removeClass("combo-error").addClass("combo-error"); this.element.removeClass("combo-error").addClass("combo-error");
this.trigger.attr("tipType", "warning");
} else { } else {
this.element.removeClass("combo-error"); this.element.removeClass("combo-error");
this.trigger.attr("tipType", "success");
} }
} }
}, },

9
src/widget/previewtable/previewtable.cell.js

@ -21,11 +21,14 @@ BI.PreviewTableCell = BI.inherit(BI.Widget, {
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
textAlign: "left", textAlign: o.textAlign || "left",
whiteSpace: "normal", whiteSpace: o.whiteSpace || "normal",
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value value: this.options.value,
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });

9
src/widget/previewtable/previewtable.header.cell.js

@ -21,11 +21,14 @@ BI.PreviewTableHeaderCell = BI.inherit(BI.Widget, {
BI.createWidget({ BI.createWidget({
type: "bi.label", type: "bi.label",
element: this, element: this,
textAlign: "left", textAlign: o.textAlign || "left",
whiteSpace: "normal", whiteSpace: o.whiteSpace || "normal",
height: this.options.height, height: this.options.height,
text: this.options.text, text: this.options.text,
value: this.options.value value: this.options.value,
lgap: o.lgap,
rgap: o.rgap,
hgap: o.hgap || 5
}); });
} }
}); });

18
src/widget/previewtable/previewtable.js

@ -197,6 +197,24 @@ BI.PreviewTable = BI.inherit(BI.Widget, {
}, },
populate: function (items, header) { populate: function (items, header) {
if (items) {
items = BI.map(items, function (i, items) {
return BI.map(items, function (j, item) {
return BI.extend({
type: "bi.preview_table_cell"
}, item);
});
});
}
if (header) {
header = BI.map(header, function (i, items) {
return BI.map(items, function (j, item) {
return BI.extend({
type: "bi.preview_table_header_cell"
}, item);
});
});
}
this.table.populate(items, header); this.table.populate(items, header);
this._adjustColumns(); this._adjustColumns();
} }

Loading…
Cancel
Save