guy 7 years ago
parent
commit
851066c670
  1. 1
      bi/case.js
  2. 8
      bi/widget.css
  3. 356
      bi/widget.js
  4. 1537
      demo/config.js
  5. 48
      demo/js/base/demo.canvas.js
  6. 33
      demo/js/case/combo/demo.editor_icon_check_combo.js
  7. 8
      demo/js/case/combo/demo.icon_combo.js
  8. 30
      demo/js/case/combo/demo.text_value_combo.js
  9. 25
      demo/js/case/combo/demo.text_value_down_list_combo.js
  10. 2
      demo/js/case/combo/demo.text_vlaue_check_combo.js
  11. 20
      demo/js/case/demo.color_chooser_popup.js
  12. 28
      demo/js/case/demo.segment.js
  13. 59
      demo/js/case/editor/demo.shelter_editor.js
  14. 29
      demo/js/case/editor/demo.sign_editor.js
  15. 33
      demo/js/case/editor/demo.simple_state_editor.js
  16. 15
      demo/js/case/editor/demo.state_editor.js
  17. 22
      demo/js/case/item/demo.multi_select_item.js
  18. 25
      demo/js/case/item/demo.single_select_item.js
  19. 25
      demo/js/case/item/demo.single_select_radio_item.js
  20. 23
      demo/js/case/list/demo.lazy_loader.js
  21. 22
      demo/js/case/list/demo.select_list.js
  22. 25
      demo/js/case/pager/demo.all_count_pager.js
  23. 18
      demo/js/case/pager/demo.direction_pager.js
  24. 34
      demo/js/case/pane/demo.list_pane.js
  25. 39
      demo/js/case/pane/demo.multi_popup_view.js
  26. 28
      demo/js/case/pane/demo.panel.js
  27. 39
      demo/js/case/pane/demo.popup_panel.js
  28. 160
      demo/js/case/table/demo.adaptive_table.js
  29. 149
      demo/js/case/table/demo.layer_tree_table.js
  30. 149
      demo/js/case/table/demo.tree_table.js
  31. 24
      demo/js/case/triggers/demo.editor_trigger.js
  32. 24
      demo/js/case/triggers/demo.icon_trigger.js
  33. 25
      demo/js/case/triggers/demo.select_text_trigger.js
  34. 25
      demo/js/case/triggers/demo.text_trigger.js
  35. 16
      demo/js/config/case.js
  36. 22
      demo/js/config/core.js
  37. 38
      demo/js/config/widget.js
  38. 163
      demo/js/core/abstract/combination/demo.combo2.js
  39. 87
      demo/js/core/abstract/combination/demo.combo_group.js
  40. 41
      demo/js/core/abstract/combination/demo.expander.js
  41. 27
      demo/js/core/abstract/combination/demo.loader.js
  42. 35
      demo/js/core/abstract/combination/demo.navigation.js
  43. 100
      demo/js/core/abstract/combination/demo.sercher.js
  44. 59
      demo/js/core/abstract/combination/demo.switcher.js
  45. 69
      demo/js/core/abstract/combination/demo.tab.js
  46. 0
      demo/js/core/abstract/demo.custom_tree.js
  47. 3
      demo/js/widget/basewidget/demo.items.js
  48. 4
      demo/js/widget/date/demo.multidate_combo.js
  49. 34
      demo/js/widget/datetime/demo.datetime.js
  50. 27
      demo/js/widget/dialog/demo.dialog.js
  51. 28
      demo/js/widget/downlist/demo.downlist.js
  52. 40
      demo/js/widget/table/demo.excel_table.js
  53. 2
      demo/version.js
  54. 8
      dist/bundle.css
  55. 357
      dist/bundle.js
  56. 1
      dist/case.js
  57. 2
      dist/config.js
  58. 4096
      dist/demo.js
  59. 8
      dist/widget.css
  60. 356
      dist/widget.js
  61. 1
      src/case/colorchooser/colorchooser.popup.js
  62. 8
      src/css/widget/multidate/multidate.popup.css
  63. 1
      src/less/base/single/editor/editor.less
  64. 5
      src/less/base/single/editor/editor.shelter.less
  65. 5
      src/less/base/single/editor/editor.sign.less
  66. 8
      src/less/widget/multidate/multidate.popup.less
  67. 2
      src/widget/date/combo.date.js
  68. 1
      src/widget/datetime/datetime.combo.js
  69. 44
      src/widget/datetime/datetime.js
  70. 45
      src/widget/datetime/datetime.popup.js
  71. 31
      src/widget/exceltable/exceltable.cell.js
  72. 31
      src/widget/exceltable/exceltable.header.cell.js
  73. 205
      src/widget/exceltable/exceltable.js

1
bi/case.js

@ -3748,6 +3748,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-color-chooser-popup",
width: 200,
height: 145
})
},

8
bi/widget.css

@ -85,19 +85,19 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-multidate-popup .bi-multidate-popup-label {
.bi-multidate-popup .multidate-popup-label {
color: #3f8ce8;
font-size: 14px;
}
.bi-multidate-popup .bi-multidate-popup-item:active,
.bi-multidate-popup .bi-multidate-popup-item.active {
.bi-multidate-popup .multidate-popup-item:active,
.bi-multidate-popup .multidate-popup-item.active {
background-color: #3f8ce8;
color: #ffffff;
-webkit-border-radius: 2px 2px 0 0;
-moz-border-radius: 2px 2px 0 0;
border-radius: 2px 2px 0 0;
}
.bi-multidate-popup .bi-multidate-popup-button {
.bi-multidate-popup .multidate-popup-button {
color: #3f8ce8;
font-size: 14px;
}

356
bi/widget.js

@ -2268,7 +2268,7 @@ BI.DateCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-combo bi-border",
height: 30
height: 25
});
},
_init: function () {
@ -2768,6 +2768,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: 'bi-date-time-combo bi-border',
width: 200,
height: 24
});
},
@ -2883,50 +2884,6 @@ BI.DateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW = "BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW";
BI.shortcut('bi.date_time_combo', BI.DateTimeCombo);
/**
* Created by Urthur on 2017/7/14.
*/
BI.CustomDateTimeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.CustomDateTimeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-custom-date-time-combo"
})
},
_init: function () {
BI.CustomDateTimeCombo.superclass._init.apply(this, arguments);
var self = this;
this.DateTime = BI.createWidget({
type: "bi.date_time_combo",
element: this
});
this.DateTime.on(BI.DateTimeCombo.EVENT_CANCEL, function () {
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE);
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CANCEL);
});
this.DateTime.on(BI.DateTimeCombo.EVENT_CONFIRM, function () {
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE);
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CONFIRM);
});
this.DateTime.on(BI.DateTimeCombo.EVENT_CHANGE, function () {
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE);
});
},
getValue: function () {
return this.DateTime.getValue();
},
setValue: function (v) {
this.DateTime.setValue(v);
}
});
BI.CustomDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.CustomDateTimeCombo.EVENT_CANCEL = "EVENT_CANCEL";
BI.CustomDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.custom_date_time_combo", BI.CustomDateTimeCombo);
/**
* Created by Urthur on 2017/7/14.
*/
@ -2944,7 +2901,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.cancelButton = BI.createWidget({
type: 'bi.text_button',
forceCenter: true,
cls: 'bi-multidate-popup-button bi-border-top bi-border-right',
cls: 'multidate-popup-button bi-border-top bi-border-right',
shadow: true,
text: BI.i18nText("BI-Basic_Cancel")
});
@ -2955,7 +2912,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.okButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: 'bi-multidate-popup-button bi-border-top',
cls: 'multidate-popup-button bi-border-top',
shadow: true,
text: BI.i18nText("BI-Basic_OK")
});
@ -2973,55 +2930,64 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
});
this.dateSelect = BI.createWidget({
type: "bi.horizontal",
type: "bi.vertical_adapt",
cls: "bi-border-top",
items: [{
type: "bi.label",
text: BI.i18nText("BI-Basic_Time"),
width: 45
},{
}, {
type: "bi.date_time_select",
max: 23,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.hour = _ref;
self.hour.on(BI.DateTimeSelect.EVENT_CONFIRM, function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
}
},{
}, {
type: "bi.label",
text: ":",
width: 15
},{
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.minute = _ref;
self.minute.on(BI.DateTimeSelect.EVENT_CONFIRM, function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
}
},{
}, {
type: "bi.label",
text: ":",
width: 15
},{
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.second = _ref;
self.second.on(BI.DateTimeSelect.EVENT_CONFIRM, function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
}
}]
});
@ -3048,7 +3014,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
}, {
el: this.dateSelect,
height: 50
},{
}, {
el: this.dateButton,
height: 30
}]
@ -4447,270 +4413,6 @@ BI.SmallTextEditor = BI.inherit(BI.TextEditor, {
}
});
BI.shortcut("bi.small_text_editor", BI.SmallTextEditor);/**
*
* Created by GUY on 2016/3/28.
* @class BI.ExcelTableCell
* @extends BI.Widget
*/
BI.ExcelTableCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ExcelTableCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-excel-table-cell",
text: ""
});
},
_init: function () {
BI.ExcelTableCell.superclass._init.apply(this, arguments);
var self = this, o = this.options;
BI.createWidget({
type: "bi.label",
element: this,
textAlign: "left",
whiteSpace: "normal",
height: this.options.height,
text: this.options.text,
value: this.options.value
})
}
});
BI.shortcut('bi.excel_table_cell', BI.ExcelTableCell);/**
*
* Created by GUY on 2016/3/28.
* @class BI.ExcelTableHeaderCell
* @extends BI.Widget
*/
BI.ExcelTableHeaderCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ExcelTableHeaderCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-excel-table-header-cell bi-background",
text: ""
});
},
_init: function () {
BI.ExcelTableHeaderCell.superclass._init.apply(this, arguments);
var self = this, o = this.options;
BI.createWidget({
type: "bi.label",
element: this,
textAlign: BI.HorizontalAlign.Center,
whiteSpace: "normal",
height: this.options.height,
text: this.options.text,
value: this.options.value
})
}
});
BI.shortcut('bi.excel_table_header_cell', BI.ExcelTableHeaderCell);/**
* Excel表格
*
* Created by GUY on 2016/3/28.
* @class BI.ExcelTable
* @extends BI.Widget
*/
BI.ExcelTable = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ExcelTable.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-excel-table",
el: {
type: "bi.responsive_table"
},
isNeedResize: false,
isResizeAdapt: true,
isNeedMerge: false,//是否需要合并单元格
mergeCols: [], //合并的单元格列号
mergeRule: function (row1, row2) { //合并规则, 默认相等时合并
return BI.isEqual(row1, row2);
},
columnSize: [],
headerRowSize: 37,
footerRowSize: 37,
rowSize: 37,
regionColumnSize: false,
items: [] //二维数组
});
},
_init: function () {
BI.ExcelTable.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var mergeCols = [];
BI.each(o.mergeCols, function (i, col) {
mergeCols.push(col + 1);
});
this.table = BI.createWidget(o.el, {
type: "bi.table_view",
element: this,
isNeedFreeze: false,
isNeedMerge: o.isNeedMerge,
mergeCols: mergeCols,
mergeRule: o.mergeRule,
columnSize: [""].concat(o.columnSize),
headerRowSize: 18,
rowSize: o.rowSize,
regionColumnSize: o.regionColumnSize || [82, ""]
});
if (BI.isNotEmptyArray(o.items)) {
this.populate(o.items);
}
BI.nextTick(function () {
self.setRegionColumnSize(o.regionColumnSize || [82, ""]);
});
},
resize: function () {
this.table.resize();
},
setColumnSize: function (columnSize) {
this.table.setColumnSize(columnSize);
},
getColumnSize: function () {
return this.table.getColumnSize();
},
getCalculateColumnSize: function () {
return this.table.getCalculateColumnSize();
},
setHeaderColumnSize: function (columnSize) {
this.table.setHeaderColumnSize(columnSize);
},
setRegionColumnSize: function (columnSize) {
this.table.setRegionColumnSize(columnSize);
},
getRegionColumnSize: function () {
return this.table.getRegionColumnSize();
},
getCalculateRegionColumnSize: function () {
return this.table.getCalculateRegionColumnSize();
},
getCalculateRegionRowSize: function () {
return this.table.getCalculateRegionRowSize();
},
getClientRegionColumnSize: function () {
return this.table.getClientRegionColumnSize();
},
getScrollRegionColumnSize: function () {
return this.table.getScrollRegionColumnSize();
},
getScrollRegionRowSize: function () {
return this.table.getScrollRegionRowSize();
},
hasVerticalScroll: function () {
return this.table.hasVerticalScroll();
},
setVerticalScroll: function (scrollTop) {
this.table.setVerticalScroll(scrollTop);
},
setLeftHorizontalScroll: function (scrollLeft) {
this.table.setLeftHorizontalScroll(scrollLeft);
},
setRightHorizontalScroll: function (scrollLeft) {
this.table.setRightHorizontalScroll(scrollLeft);
},
getVerticalScroll: function () {
return this.table.getVerticalScroll();
},
getLeftHorizontalScroll: function () {
return this.table.getLeftHorizontalScroll();
},
getRightHorizontalScroll: function () {
return this.table.getRightHorizontalScroll();
},
getColumns: function () {
return this.table.getColumns();
},
resizeHeader: function () {
this.table.resize();
this.table._resizeHeader && this.table._resizeHeader();
},
attr: function (key,value) {
var self = this;
if (BI.isObject(key)) {
BI.each(key, function (k, v) {
self.attr(k, v);
});
return;
}
BI.ExcelTable.superclass.attr.apply(this, arguments);
switch (key){
case "mergeCols":
var mCols = [];
BI.each(value, function (i, col) {
mCols.push(col + 1);
});
value=mCols;
break;
}
this.table.attr.apply(this.table, arguments);
},
populate: function (rows) {
var self = this;
var columnSize = this.getColumnSize();
var items = [];
var header = [{
type: "bi.excel_table_header_cell"
}];
if (BI.isNotNull(rows)) {
BI.each(columnSize, function (i, size) {
header.push({
type: "bi.excel_table_header_cell",
text: BI.int2Abc(i + 1)
});
});
BI.each(rows, function (i, row) {
items.push([{
type: "bi.excel_table_header_cell",
text: (i + 1)
}].concat(row));
});
}
this.table.populate(items, [header]);
},
destroy: function () {
this.table.destroy();
BI.ExcelTable.superclass.destroy.apply(this, arguments);
}
});
BI.shortcut('bi.excel_table', BI.ExcelTable);/**
* 文件管理控件组
*
* Created by GUY on 2015/12/11.

1537
demo/config.js

File diff suppressed because one or more lines are too long

48
demo/js/base/demo.canvas.js

@ -0,0 +1,48 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var canvas = BI.createWidget({
type: "bi.canvas",
width: 500,
height: 600
});
canvas.rect(0, 0, 80, 100, "#7dbd2f");
canvas.line(80, 0, 100, 100, 200, 100, 300, 0, {
strokeStyle: "red",
lineWidth: 2
});
canvas.circle(150, 50, 20, "green");
//渐变矩形
canvas.rect(0, 120, 80, 100, canvas.gradient(0, 120, 80, 220, "#FF0000", "#00FF00"));
//空心图形
canvas.hollow(100, 120, 100, 220, 200, 120, {
strokeStyle: "blue"
});
//实心图形
canvas.solid(100, 240, 200, 240, 150, 280, 200, 320, 100, 320, {
strokeStyle: "yellow",
fillStyle: "pink"
});
canvas.stroke();
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: canvas,
left: 100,
top: 50
}]
})
}
});
BI.shortcut("demo.canvas", Demo.Func);

33
demo/js/case/combo/demo.editor_icon_check_combo.js

@ -0,0 +1,33 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.TextValueCombo = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.editor_icon_check_combo",
watermark: "默认值",
width: 200,
height: 30,
items: [{
//text: "MVC-1",
value: "1"
}, {
//text: "MVC-2",
value: "2"
}, {
//text: "MVC-3",
value: "3"
}]
}],
vgap: 20
}
}
})
BI.shortcut("demo.editor_icon_check_combo", Demo.TextValueCombo);

8
demo/js/case/combo/demo.icon_combo.js

@ -18,16 +18,16 @@ Demo.IconCombo = BI.inherit(BI.Widget, {
ref:function(_ref){
self.refs=_ref;
},
// iconClass: "pull-down-ha-font",
iconClass: "search-font",
items: [{
value: "第一项",
iconClass: "delete-font"
iconClass: "close-font"
}, {
value: "第二项",
iconClass: "rename-font"
iconClass: "search-font"
}, {
value: "第三项",
iconClass: "move-font"
iconClass: "copy-font"
}]
}],
vgap: 20

30
demo/js/case/combo/demo.text_value_combo.js

@ -11,35 +11,7 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, {
type: "bi.horizontal_auto",
items: [{
type: "bi.text_value_combo",
text: "天气热死了",
width: 300,
items: [{
text: "MVC-1",
value: 1
}, {
text: "MVC-2",
value: 2
}, {
text: "MVC-3",
value: 3
}]
},{
type: "bi.text_value_check_combo",
text: "天气热死了",
width: 300,
items: [{
text: "MVC-1",
value: 1
}, {
text: "MVC-2",
value: 2
}, {
text: "MVC-3",
value: 3
}]
},{
type: "bi.text_value_combo",
text: "天气热死了",
text: "默认值",
width: 300,
items: [{
text: "MVC-1",

25
demo/js/case/combo/demo.text_value_down_list_combo.js

@ -6,25 +6,12 @@ Demo.TextValueDownListCombo = BI.inherit(BI.Widget, {
baseCls: ""
},
beforeMount:function(){
this.refs.setValue(2);
},
render: function () {
var self = this;
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.label",
cls: "layout-bg2",
text: "分组+二级",
width: 300
}, {
type: "bi.text_value_down_list_combo",
text: "天气热死了",
width: 300,
ref: function (_ref) {
self.refs = _ref;
@ -32,25 +19,29 @@ Demo.TextValueDownListCombo = BI.inherit(BI.Widget, {
items: [
[{
el: {
text: "MVC-1",
text: "层级1",
value: 1
},
children: [{
text: "MVC-1-1",
text: "层级1-1",
value: 11
}]
}],
[{
text: "MVC-2",
text: "层级2",
value: 2
}, {
text: "MVC-3",
text: "层级3",
value: 3
}]
]
}],
vgap: 20
}
},
mounted: function () {
this.refs.setValue(2);
}
})

2
demo/js/case/combo/demo.text_vlaue_check_combo.js

@ -11,7 +11,7 @@ Demo.TextValueCheckCombo = BI.inherit(BI.Widget, {
type: "bi.horizontal_auto",
items: [{
type: "bi.text_value_check_combo",
text: "天气热死了",
text: "默认值",
width: 300,
items: [{
text: "MVC-1",

20
demo/js/case/demo.color_chooser_popup.js

@ -0,0 +1,20 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.color_chooser_popup",
cls: "bi-card"
},
left: 100,
top: 250
}]
}
}
});
BI.shortcut("demo.color_chooser_popup", Demo.Func);

28
demo/js/case/demo.segment.js

@ -0,0 +1,28 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
BI.createWidget({
type: "bi.vertical",
element: this,
vgap: 20,
hgap: 30,
items: [{
type: "bi.segment",
items: [{
text: "1",
value: 1
}, {
text: "2",
value: 2
}, {
text: "3",
value: 3
}]
}]
})
}
});
BI.shortcut("demo.segment", Demo.Func);

59
demo/js/case/editor/demo.shelter_editor.js

@ -6,35 +6,40 @@ Demo.ClearEditor = BI.inherit(BI.Widget, {
baseCls: ""
},
render: function () {
var editor;
return {
type: "bi.horizontal_auto",
var editor = BI.createWidget({
type: "bi.shelter_editor",
cls: "bi-border",
validationChecker: function (v) {
return v != "a";
},
watermark: "可以设置标记的输入框",
text: "这是一个遮罩"
})
BI.createWidget({
type: "bi.vertical",
element: this,
hgap: 30,
vgap: 20,
bgap: 50,
items: [editor]
})
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
type: "bi.shelter_editor",
cls: "bi-border",
ref:function(_ref){
editor=_ref;
el: {
type: "bi.button",
text: "focus",
height: 25,
handler: function () {
editor.focus();
}
},
width: 300,
watermark: "这个是带标记的"
},{
type:"bi.button",
text:"setValue",
width:300,
handler:function(){
editor.setValue("凛冬将至");
}
},{
type:"bi.button",
text:"doHighLight",
width:300,
handler:function(){
editor.doHighLight();
console.log(editor.getState());
}
}],
vgap: 20
}
right: 10,
left: 10,
bottom: 10
}]
})
}
})

29
demo/js/case/editor/demo.sign_editor.js

@ -6,18 +6,23 @@ Demo.SignEditor = BI.inherit(BI.Widget, {
baseCls: ""
},
render: function () {
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.sign_editor",
// cls:"layout-bg5",
value: "123",
text: "456",
width: 300
}],
vgap: 20
}
var editor = BI.createWidget({
type: "bi.sign_editor",
cls: "bi-border",
validationChecker: function (v) {
return v != "a";
},
watermark: "可以设置标记的输入框",
text: "这是一个标记,点击它即可进行输入"
})
editor.setValue(2);
BI.createWidget({
type: "bi.vertical",
element: this,
hgap: 30,
vgap: 20,
items: [editor]
})
}
})

33
demo/js/case/editor/demo.simple_state_editor.js

@ -0,0 +1,33 @@
/**
* Created by Dailer on 2017/7/11.
*/
Demo.SimpleStateEditor = BI.inherit(BI.Widget, {
props: {
baseCls: ""
},
render: function () {
var self = this;
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.simple_state_editor",
ref: function () {
self.editor = this;
},
cls: "bi-border",
width: 300
}],
vgap: 20
}
},
mounted: function () {
var self = this;
setTimeout(function () {
self.editor.setState(["*", "*"]);
}, 1000)
}
})
BI.shortcut("demo.simple_state_editor", Demo.SimpleStateEditor);

15
demo/js/case/editor/demo.state_editor.js

@ -6,17 +6,28 @@ Demo.StateEditor = BI.inherit(BI.Widget, {
baseCls: ""
},
render: function () {
var self = this;
return {
type: "bi.horizontal_adapt",
items: [{
type: "bi.state_editor",
value: "123",
text: "456",
ref: function () {
self.editor = this;
},
cls: "bi-border",
width: 300
}],
vgap: 20
}
},
mounted: function () {
var self = this;
setTimeout(function () {
self.editor.setState(["*", "*"]);
}, 1000)
}
})

22
demo/js/case/item/demo.multi_select_item.js

@ -0,0 +1,22 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
return {
type: "bi.vertical",
items: [{
type: "bi.label",
height: 30,
text: "复选item"
}, {
type: "bi.multi_select_item",
text: "复选项"
}],
hgap: 300
}
}
});
BI.shortcut("demo.multi_select_item", Demo.Func);

25
demo/js/case/item/demo.single_select_item.js

@ -0,0 +1,25 @@
/**
* Created by Dailer on 2017/7/25.
*/
Demo.Items = BI.inherit(BI.Widget, {
render: function () {
return {
type: "bi.vertical",
items: [{
type: "bi.label",
height: 30,
text: "单选item"
}, {
type: "bi.single_select_item",
text: "单选项"
}],
hgap: 300
}
}
});
BI.shortcut("demo.single_select_item", Demo.Items);

25
demo/js/case/item/demo.single_select_radio_item.js

@ -0,0 +1,25 @@
/**
* Created by Dailer on 2017/7/25.
*/
Demo.Items = BI.inherit(BI.Widget, {
render: function () {
return {
type: "bi.vertical",
items: [{
type: "bi.label",
height: 30,
text: "单选item"
}, {
type: "bi.single_select_radio_item",
text: "单选项"
}],
hgap: 300
}
}
});
BI.shortcut("demo.single_select_radio_item", Demo.Items);

23
demo/js/case/list/demo.lazy_loader.js

@ -0,0 +1,23 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var self = this;
BI.createWidget({
type: "bi.lazy_loader",
element: this,
el: {
layouts: [{
type: "bi.left",
hgap: 5
}]
},
items: BI.createItems(BI.deepClone(Demo.CONSTANTS.ITEMS), {
type: "bi.button"
})
})
}
});
BI.shortcut("demo.lazy_loader", Demo.Func);

22
demo/js/case/list/demo.select_list.js

@ -0,0 +1,22 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var self = this;
BI.createWidget({
type: "bi.select_list",
element: this,
el: {
el: {
chooseType: BI.Selection.Multi
}
},
items: BI.createItems(BI.deepClone(Demo.CONSTANTS.SIMPLE_ITEMS), {
type: "bi.multi_select_item"
})
})
}
});
BI.shortcut("demo.select_list", Demo.Func);

25
demo/js/case/pager/demo.all_count_pager.js

@ -0,0 +1,25 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
BI.createWidget({
type: "bi.vertical",
hgap: 200,
vgap: 50,
element: this,
items: [{
type: "bi.label",
height: 30,
text: " (测试条件:总页数为3)"
}, {
type: "bi.all_count_pager",
pages: 3,
curr: 1,
count: 1000
}]
})
}
});
BI.shortcut("demo.all_count_pager", Demo.Func);

18
demo/js/case/pager/demo.direction_pager.js

@ -0,0 +1,18 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
BI.createWidget({
type: "bi.vertical",
hgap: 200,
vgap: 50,
element: this,
items: [{
type: "bi.direction_pager",
}]
})
}
});
BI.shortcut("demo.direction_pager", Demo.Func);

34
demo/js/case/pane/demo.list_pane.js

@ -0,0 +1,34 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var self = this;
return {
type: "bi.list_pane",
ref: function () {
self.pane = this;
},
itemsCreator: function (op, callback) {
setTimeout(function () {
callback(BI.createItems(BI.deepClone(Demo.CONSTANTS.ITEMS), {
type: "bi.multi_select_item",
height: 25
}))
}, 2000)
},
el: {
type: "bi.button_group",
layouts: [{
type: "bi.vertical"
}]
}
}
},
mounted: function () {
this.pane.populate();
}
});
BI.shortcut("demo.list_pane", Demo.Func);

39
demo/js/case/pane/demo.multi_popup_view.js

@ -0,0 +1,39 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var self = this;
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.combo",
width: 200,
height: 30,
el: {
type: "bi.text_button",
text: "点击",
cls: "bi-border",
height: 30
},
popup: {
type: "bi.multi_popup_view",
el: {
type: "bi.button_group",
layouts: [{
type: "bi.vertical"
}],
items: BI.createItems(BI.deepClone(Demo.CONSTANTS.ITEMS), {
type: "bi.multi_select_item",
height: 25
})
}
}
}
}]
}
}
});
BI.shortcut("demo.multi_popup_view", Demo.Func);

28
demo/js/case/pane/demo.panel.js

@ -0,0 +1,28 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var self = this;
return {
type: "bi.panel",
title: "title",
titleButtons: [{
type: "bi.button",
text: "操作"
}],
el: {
type: "bi.button_group",
layouts: [{
type: "bi.vertical"
}],
items: BI.createItems(BI.deepClone(Demo.CONSTANTS.ITEMS), {
type: "bi.multi_select_item",
height: 25
})
}
}
}
});
BI.shortcut("demo.panel", Demo.Func);

39
demo/js/case/pane/demo.popup_panel.js

@ -0,0 +1,39 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var self = this;
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.combo",
width: 200,
height: 30,
el: {
type: "bi.text_button",
text: "点击",
cls: "bi-border",
height: 30
},
popup: {
type: "bi.popup_panel",
el: {
type: "bi.button_group",
layouts: [{
type: "bi.vertical"
}],
items: BI.createItems(BI.deepClone(Demo.CONSTANTS.ITEMS), {
type: "bi.multi_select_item",
height: 25
})
}
}
}
}]
}
}
});
BI.shortcut("demo.popup_panel", Demo.Func);

160
demo/js/case/table/demo.adaptive_table.js

@ -0,0 +1,160 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var items = [[{
text: "第一行第一列"
}, {
text: "第一行第一列"
}, {
text: "第一行第一列"
}], [{
text: "第一行第一列"
}, {
text: "第一行第一列"
}, {
text: "第一行第一列"
}], [{
text: "第三行第一列"
}, {
text: "第三行第二列"
}, {
text: "第三行第三列"
}], [{
text: "第四行第一列"
}, {
text: "第四行第二列"
}, {
text: "第四行第三列"
}], [{
text: "第五行第一列"
}, {
text: "第五行第二列"
}, {
text: "第五行第三列"
}], [{
text: "第六行第一列"
}, {
text: "第六行第二列"
}, {
text: "第六行第三列"
}], [{
text: "第七行第一列"
}, {
text: "第七行第二列"
}, {
text: "第七行第三列"
}], [{
text: "第八行第一列"
}, {
text: "第八行第二列"
}, {
text: "第八行第三列"
}], [{
text: "第九行第一列"
}, {
text: "第九行第二列"
}, {
text: "第九行第三列"
}], [{
text: "第十行第一列"
}, {
text: "第十行第二列"
}, {
text: "第十行第三列"
}], [{
text: "第十一行第一列"
}, {
text: "第十一行第二列"
}, {
text: "第十一行第三列"
}], [{
text: "第十二行第一列"
}, {
text: "第十二行第二列"
}, {
text: "第十二行第三列"
}], [{
text: "第十三行第一列"
}, {
text: "第十三行第二列"
}, {
text: "第十三行第三列"
}], [{
text: "第十四行第一列"
}, {
text: "第十四行第二列"
}, {
text: "第十四行第三列"
}], [{
text: "第十五行第一列"
}, {
text: "第十五行第二列"
}, {
text: "第十五行第三列"
}], [{
text: "第十六行第一列"
}, {
text: "第十六行第二列"
}, {
text: "第十六行第三列"
}], [{
text: "第十七行第一列"
}, {
text: "第十七行第二列"
}, {
text: "第十七行第三列"
}], [{
text: "第十八行第一列"
}, {
text: "第十八行第二列"
}, {
text: "第十八行第三列"
}]];
var header = [[{
text: "表头1"
}, {
text: "表头2"
}, {
text: "表头3"
}]];
var table = BI.createWidget({
type: "bi.adaptive_table",
el: {
type: "bi.resizable_table",
el: {
type: "bi.grid_table",
}
},
width: 600,
height: 400,
minColumnSize: [100, 100, 100],
columnSize: [100, 100, 100],
header: header,
items: items
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.grid",
columns: 1,
rows: 1,
items: [[{
el: table
}]]
},
left: 10,
right: 10,
top: 10,
bottom: 10
}]
})
}
});
BI.shortcut("demo.adaptive_table", Demo.Func);

149
demo/js/case/table/demo.layer_tree_table.js

@ -0,0 +1,149 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var items = [{
children: [{
text: "节点1",
children: [{
text: "子节点1",
children: [{
text: "叶节点1",
values: [{text: 11}, {text: 12}, {text: 11}, {text: 12}, {text: 11}, {text: 12}, {text: 112}]
}, {
text: "叶节点2",
values: [{text: 21}, {text: 22}, {text: 21}, {text: 22}, {text: 21}, {text: 22}, {text: 122}]
}],
values: [{text: 101}, {text: 102}, {text: 101}, {text: 102}, {text: 101}, {text: 102}, {text: 1102}]
}, {
text: "子节点2",
children: [{
text: "叶节点3",
values: [{text: 31}, {text: 32}, {text: 31}, {text: 32}, {text: 31}, {text: 32}, {text: 132}]
}, {
text: "叶节点4",
values: [{text: 41}, {text: 42}, {text: 41}, {text: 42}, {text: 41}, {text: 42}, {text: 142}]
}],
values: [{text: 201}, {text: 202}, {text: 201}, {text: 202}, {text: 201}, {text: 202}, {text: 1202}]
}, {
text: "子节点3",
children: [{
text: "叶节点5",
values: [{text: 51}, {text: 52}, {text: 51}, {text: 52}, {text: 51}, {text: 52}, {text: 152}]
}],
values: [{text: 301}, {text: 302}, {text: 301}, {text: 302}, {text: 301}, {text: 302}, {text: 1302}]
}],
values: [{text: 1001}, {text: 1002}, {text: 1001}, {text: 1002}, {text: 1001}, {text: 1002}, {text: 11002}]
}, {
text: "节点2",
values: [{text: 2001}, {text: 2002}, {text: 2001}, {text: 2002}, {text: 2001}, {text: 2002}, {text: 12002}]
}],
values: [{text: 12001}, {text: 12002}, {text: 12001}, {text: 12002}, {text: 12001}, {text: 12002}, {text: 112002}]
}];
var header = [{
text: "header1"
}, {
text: "header2"
}, {
text: "header3"
}, {
text: "金额",
tag: 1
}, {
text: "金额",
tag: 2
}, {
text: "金额",
tag: 3
}, {
text: "金额",
tag: 4
}, {
text: "金额",
tag: 5
}, {
text: "金额",
tag: 6
}, {
text: "金额",
tag: 7
}];
var crossHeader = [{
text: "cross1"
}, {
text: "cross2"
}];
var crossItems = [{
children: [{
text: "节点1",
children: [{
text: "子节点1"
}, {
text: "子节点2"
}],
values: [0]
}, {
text: "节点2",
children: [{
text: "子节点3"
}, {
text: "子节点4"
}],
values: [0]
}],
values: [0]
}];
var table = BI.createWidget({
type: "bi.layer_tree_table",
el: {
type: "bi.adaptive_table",
el: {
type: "bi.resizable_table",
el: {
type: "bi.collection_table",
mergeRule: function (col1, col2) {
return BI.isEqual(col1, col2);
}
}
}
},
width: 600,
height: 400,
isNeedFreeze: true,
isNeedMerge: true,
freezeCols: [0, 1, 2],
mergeCols: [0, 1, 2],
minColumnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
columnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
header: header,
items: items,
crossHeader: crossHeader,
crossItems: crossItems
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.grid",
columns: 1,
rows: 1,
items: [[{
el: table
}]]
},
left: 10,
right: 10,
top: 10,
bottom: 10
}]
})
}
});
BI.shortcut("demo.layer_tree_table", Demo.Func);

149
demo/js/case/table/demo.tree_table.js

@ -0,0 +1,149 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var items = [{
children: [{
text: "节点1",
children: [{
text: "子节点1",
children: [{
text: "叶节点1",
values: [{text: 11}, {text: 12}, {text: 11}, {text: 12}, {text: 11}, {text: 12}, {text: 112}]
}, {
text: "叶节点2",
values: [{text: 21}, {text: 22}, {text: 21}, {text: 22}, {text: 21}, {text: 22}, {text: 122}]
}],
values: [{text: 101}, {text: 102}, {text: 101}, {text: 102}, {text: 101}, {text: 102}, {text: 1102}]
}, {
text: "子节点2",
children: [{
text: "叶节点3",
values: [{text: 31}, {text: 32}, {text: 31}, {text: 32}, {text: 31}, {text: 32}, {text: 132}]
}, {
text: "叶节点4",
values: [{text: 41}, {text: 42}, {text: 41}, {text: 42}, {text: 41}, {text: 42}, {text: 142}]
}],
values: [{text: 201}, {text: 202}, {text: 201}, {text: 202}, {text: 201}, {text: 202}, {text: 1202}]
}, {
text: "子节点3",
children: [{
text: "叶节点5",
values: [{text: 51}, {text: 52}, {text: 51}, {text: 52}, {text: 51}, {text: 52}, {text: 152}]
}],
values: [{text: 301}, {text: 302}, {text: 301}, {text: 302}, {text: 301}, {text: 302}, {text: 1302}]
}],
values: [{text: 1001}, {text: 1002}, {text: 1001}, {text: 1002}, {text: 1001}, {text: 1002}, {text: 11002}]
}, {
text: "节点2",
values: [{text: 2001}, {text: 2002}, {text: 2001}, {text: 2002}, {text: 2001}, {text: 2002}, {text: 12002}]
}],
values: [{text: 12001}, {text: 12002}, {text: 12001}, {text: 12002}, {text: 12001}, {text: 12002}, {text: 112002}]
}];
var header = [{
text: "header1"
}, {
text: "header2"
}, {
text: "header3"
}, {
text: "金额",
tag: 1
}, {
text: "金额",
tag: 2
}, {
text: "金额",
tag: 3
}, {
text: "金额",
tag: 4
}, {
text: "金额",
tag: 5
}, {
text: "金额",
tag: 6
}, {
text: "金额",
tag: 7
}];
var crossHeader = [{
text: "cross1"
}, {
text: "cross2"
}];
var crossItems = [{
children: [{
text: "节点1",
children: [{
text: "子节点1"
}, {
text: "子节点2"
}],
values: [0]
}, {
text: "节点2",
children: [{
text: "子节点3"
}, {
text: "子节点4"
}],
values: [0]
}],
values: [0]
}];
var table = BI.createWidget({
type: "bi.tree_table",
el: {
type: "bi.adaptive_table",
el: {
type: "bi.resizable_table",
el: {
type: "bi.collection_table",
mergeRule: function (col1, col2) {
return BI.isEqual(col1, col2);
}
}
}
},
width: 600,
height: 400,
isNeedFreeze: true,
isNeedMerge: true,
freezeCols: [0, 1, 2],
mergeCols: [0, 1, 2],
minColumnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
columnSize: [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
header: header,
items: items,
crossHeader: crossHeader,
crossItems: crossItems
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.grid",
columns: 1,
rows: 1,
items: [[{
el: table
}]]
},
left: 10,
right: 10,
top: 10,
bottom: 10
}]
})
}
});
BI.shortcut("demo.tree_table", Demo.Func);

24
demo/js/case/triggers/demo.editor_trigger.js

@ -0,0 +1,24 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
BI.createWidget({
type: "bi.vertical",
element: this,
items: [{
type: "bi.label",
text: "输入框加图标的trigger"
}, {
type: "bi.editor_trigger",
watermark: "这是水印",
width: 200,
height: 30
}],
hgap: 20,
vgap: 20
})
}
});
BI.shortcut("demo.editor_trigger", Demo.Func);

24
demo/js/case/triggers/demo.icon_trigger.js

@ -0,0 +1,24 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
BI.createWidget({
type: "bi.vertical",
element: this,
items: [{
type: "bi.label",
text: "只有一个图标的trigger"
}, {
type: "bi.icon_trigger",
width: 30,
height: 30
}],
hgap: 20,
vgap: 20
})
}
});
BI.shortcut("demo.icon_trigger", Demo.Func);

25
demo/js/case/triggers/demo.select_text_trigger.js

@ -0,0 +1,25 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
BI.createWidget({
type: "bi.vertical",
element: this,
items: [{
type: "bi.label",
text: "可被选择的trigger"
}, {
type: "bi.select_text_trigger",
text: "这是一个简单的trigger",
width: 200,
height: 30
}],
hgap: 20,
vgap: 20
})
}
});
BI.shortcut("demo.select_text_trigger", Demo.Func);

25
demo/js/case/triggers/demo.text_trigger.js

@ -0,0 +1,25 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
BI.createWidget({
type: "bi.vertical",
element: this,
items: [{
type: "bi.label",
text: "文本加图标的trigger"
}, {
type: "bi.text_trigger",
text: "这是一个简单的trigger",
width: 200,
height: 30
}],
hgap: 20,
vgap: 20
})
}
});
BI.shortcut("demo.text_trigger", Demo.Func);

16
demo/js/config/case.js

@ -60,20 +60,20 @@ Demo.CASE_CONFIG = [{
value: "demo.lazy_loader"
}, {
pId: 302,
text: "bi.list_loader",
value: "demo.list_loader"
text: "bi.sort_list(排序)",
value: "demo.sort_list"
}, {
pId: 302,
text: "bi.sort_list",
value: "demo.sort_list"
text: "bi.list_loader(排序)",
value: "demo.list_loader"
}, {
pId: 3,
id: 303,
text: "面板"
}, {
pId: 303,
text: "bi.pane_list",
value: "demo.pane_list"
text: "bi.list_pane",
value: "demo.list_pane"
}, {
pId: 303,
text: "bi.panel",
@ -134,6 +134,10 @@ Demo.CASE_CONFIG = [{
pId: 306,
text: "bi.text_value_check_combo",
value: "demo.text_value_check_combo"
}, {
pId: 306,
text: "bi.editor_icon_check_combo",
value: "demo.editor_icon_check_combo"
}, {
pId: 306,
text: "bi.text_value_down_list_combo",

22
demo/js/config/core.js

@ -124,14 +124,18 @@ Demo.CORE_CONFIG = [{
pId: 10201,
text: "bi.combo",
value: "demo.combo"
}, {
pId: 10201,
text: "bi.combo(各种位置)",
value: "demo.combo2"
}, {
pId: 10201,
text: "bi.expander",
value: "demo.expander"
}, {
pId: 10201,
text: "bi.group_combo",
value: "demo.group_combo"
text: "bi.combo_group",
value: "demo.combo_group"
}, {
pId: 10201,
text: "bi.loader",
@ -158,23 +162,23 @@ Demo.CORE_CONFIG = [{
text: "弹出层"
}, {
pId: 10202,
text: "bi.layer_float_box",
value: "demo.layer_float_box"
text: "bi.float_box",
value: "demo.float_box"
}, {
pId: 10202,
text: "bi.layer_popup",
value: "demo.layer_popup"
text: "bi.popup_view",
value: "demo.popup_view"
}, {
pId: 10202,
text: "bi.searcher_view",
value: "demo.searcher_view"
}, {
pId: 1,
text: "widget",
text: "Widget",
value: "demo.widget"
}, {
pId: 1,
text: "single",
text: "Single",
value: "demo.single"
}, {
pId: 1,
@ -186,6 +190,6 @@ Demo.CORE_CONFIG = [{
value: "demo.node_button"
}, {
pId: 1,
text: "pane",
text: "Pane",
value: "demo.pane"
}];

38
demo/js/config/widget.js

@ -80,8 +80,12 @@ Demo.WIDGET_CONFIG = [{
value: "demo.responsive_table"
}, {
pId: 404,
text: "bi.excel_table",
value: "demo.excel_table"
text: "bi.sequence_table",
value: "demo.sequence_table"
}, {
pId: 404,
text: "bi.page_table",
value: "demo.page_table"
}, {
pId: 4,
id: 405,
@ -154,14 +158,6 @@ Demo.WIDGET_CONFIG = [{
pId: 412,
text: "bi.quarter_combo",
value: "demo.quarter"
}, {
pId: 412,
text: "bi.date_combo",
value: "demo.date"
}, {
pId: 412,
text: "bi.date_pane",
value: "demo.date_pane"
}, {
pId: 412,
text: "bi.year_month_combo",
@ -172,11 +168,19 @@ Demo.WIDGET_CONFIG = [{
value: "demo.year_quarter_combo"
}, {
pId: 412,
text: "bi.custom_date_time",
value: "demo.custom_date_time"
text: "bi.date_pane",
value: "demo.date_pane"
}, {
pId: 412,
text: "bi.multidate_combo",
value: "demo.multidate_combo"
}, {
pId: 412,
text: "bi.date_time",
value: "demo.date_time"
}, {
pId: 412,
text: '时间间隔',
text: 'bi.time_interval',
value: 'demo.time_interval'
}, {
pId: 4,
@ -218,14 +222,6 @@ Demo.WIDGET_CONFIG = [{
pId: 417,
text: "bi.interactive_arrangement",
value: "demo.interactive_arrangement"
}, {
pId: 4,
id: 418,
text: "提示对话框"
}, {
pId: 418,
text: "bi.dialog",
value: "demo.dialog"
}, {
pId: 4,
id: 419,

163
demo/js/core/abstract/combination/demo.combo2.js

@ -0,0 +1,163 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
_createEl: function () {
return {
type: "bi.button",
height: 25,
text: "点击"
}
},
oneCombo: function () {
return BI.createWidget({
type: "bi.combo",
adjustLength: 5,
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
height: 500
},
maxHeight: 400
}
});
},
twoCombo: function () {
return BI.createWidget({
type: "bi.combo",
adjustXOffset: 25,
adjustYOffset: 5,
direction: "bottom,left",
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
height: 1200
}
}
});
},
threeCombo: function () {
return BI.createWidget({
type: "bi.combo",
adjustYOffset: 5,
el: this._createEl(),
isNeedAdjustHeight: false,
popup: {
el: {
type: "bi.layout",
height: 1200
}
}
});
},
fourCombo: function () {
return BI.createWidget({
type: "bi.combo",
adjustXOffset: 25,
adjustYOffset: 5,
direction: "left",
el: this._createEl(),
isNeedAdjustHeight: true,
popup: {
el: {
type: "bi.layout",
height: 1200
}
}
})
},
fiveCombo: function () {
return BI.createWidget({
type: "bi.combo",
adjustXOffset: 25,
adjustYOffset: 5,
direction: "left,top",
el: this._createEl(),
isNeedAdjustHeight: true,
popup: {
el: {
type: "bi.layout",
height: 1200
},
maxHeight: 2000
}
})
},
sixCombo: function () {
return BI.createWidget({
type: "bi.combo",
adjustXOffset: 25,
adjustYOffset: 5,
direction: "top,left",
el: this._createEl(),
isNeedAdjustHeight: true,
popup: {
el: {
type: "bi.layout",
height: 1200
}
}
})
},
sevenCombo: function () {
return BI.createWidget({
type: "bi.combo",
adjustXOffset: 25,
adjustYOffset: 5,
direction: "bottom",
isNeedAdjustWidth: false,
//isNeedAdjustHeight: false,
offsetStyle: "center",
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
width: 200,
height: 1200
}
}
})
},
eightCombo: function () {
return BI.createWidget({
type: "bi.combo",
adjustXOffset: 25,
adjustYOffset: 5,
direction: "right",
isNeedAdjustWidth: false,
//isNeedAdjustHeight: false,
offsetStyle: "middle",
el: this._createEl(),
popup: {
el: {
type: "bi.layout",
width: 200,
height: 200
}
}
})
},
render: function () {
return {
type: "bi.grid",
hgap: 10,
vgap: 5,
items: [[this.oneCombo(), this.twoCombo(), this.threeCombo()],
[this.fourCombo(), this.fiveCombo(), this.sixCombo()],
[this.sevenCombo(), this.eightCombo()]]
};
}
});
BI.shortcut("demo.combo2", Demo.Func);

87
demo/js/core/abstract/combination/demo.combo_group.js

@ -0,0 +1,87 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
child: [{
type: "bi.combo_group",
el: {
type: "bi.icon_text_icon_item",
text: "2010年",
value: 2010,
height: 25,
iconCls: "close-ha-font"
},
children: [{
type: "bi.single_select_item",
height: 25,
text: "一月",
value: 11
}, {
type: "bi.icon_text_icon_item",
height: 25,
text: "二月",
value: 12,
children: [{type: "bi.single_select_item", text: "一号", value: 101, height: 25}]
}]
}, {
text: "2011年", value: 2011
}, {
text: "2012年", value: 2012, iconCls: "close-ha-font"
}, {
text: "2013年", value: 2013
}, {
text: "2014年", value: 2014, iconCls: "close-ha-font"
}, {
text: "2015年", value: 2015, iconCls: "close-ha-font"
}],
_createBottom: function () {
var childCombo = BI.createWidget({
type: "bi.combo",
el: {
type: "bi.text_button",
cls: "button-combo",
height: 30
},
popup: {
el: {
type: "bi.button_tree",
items: BI.createItems(BI.deepClone(this.child), {
type: "bi.single_select_item",
height: 25,
handler: function (v) {
}
}),
layouts: [{
type: "bi.vertical"
}]
}
},
width: 200
});
childCombo.setValue(BI.deepClone(this.child)[0].children[0].value);
return BI.createWidget({
type: "bi.left",
items: [childCombo],
hgap: 20,
vgap: 20
})
},
render: function () {
return {
type: "bi.grid",
columns: 1,
rows: 1,
items: [{
column: 0,
row: 0,
el: this._createBottom()
}]
}
}
});
BI.shortcut("demo.combo_group", Demo.Func);

41
demo/js/core/abstract/combination/demo.expander.js

@ -0,0 +1,41 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
return {
type: "bi.vertical",
hgap: 30,
vgap: 20,
items: [{
type: "bi.expander",
el: {
type: "bi.icon_text_node",
cls: "pull-right-ha-font mvc-border",
height: 25,
text: "Expander"
},
popup: {
cls: "mvc-border",
items: BI.createItems([{
text: "项目1",
value: 1
}, {
text: "项目2",
value: 2
}, {
text: "项目3",
value: 3
}, {
text: "项目4",
value: 4
}], {
type: "bi.single_select_item",
height: 25
})
}
}]
}
}
});
BI.shortcut("demo.expander", Demo.Func);

27
demo/js/core/abstract/combination/demo.loader.js

@ -0,0 +1,27 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var self = this;
this.all = 0;
var items = BI.deepClone(Demo.CONSTANTS.ITEMS);
return {
type: "bi.loader",
itemsCreator: function (options, populate) {
setTimeout(function () {
populate(BI.map(items.slice((options.times - 1) * 10, options.times * 10), function (i, v) {
return BI.extend(v, {
type: "bi.single_select_item",
height: 25
})
}))
}, 1000);
},
hasNext: function (options) {
return options.times * 10 < items.length;
}
}
}
});
BI.shortcut("demo.loader", Demo.Func);

35
demo/js/core/abstract/combination/demo.navigation.js

@ -0,0 +1,35 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
_createNav: function (v) {
return BI.createWidget({
type: "bi.label",
cls: "layout-bg" + BI.random(1, 8),
text: "第" + v + "页"
})
},
render: function () {
return {
type: "bi.navigation",
defaultShowIndex: 0,
tab: {
height: 30,
items: [{
once: false,
text: "后退",
value: -1,
cls: "mvc-button layout-bg3"
}, {
once: false,
text: "前进",
value: 1,
cls: "mvc-button layout-bg4"
}]
},
cardCreator: BI.bind(this._createNav, this)
}
}
});
BI.shortcut("demo.navigation", Demo.Func);

100
demo/js/core/abstract/combination/demo.sercher.js

@ -2,57 +2,83 @@ Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
_createItems: function (items) {
return BI.createItems(items, {
type: "bi.multi_select_item",
height: 25,
handler: function (v) {
}
})
},
render: function () {
var self = this;
var items = [{
type: "bi.label",
value: "张三"
text: "2010年", value: 2010, py: "2010n", title: "1111111111111111111111111111111111"
}, {
text: "2011年", value: 2011, py: "2011n", title: "1111111111111111111111111111111111"
}, {
text: "2012年", value: 2012, py: "2012n", title: "1111111111111111111111111111111111"
}, {
text: "2013年", value: 2013, py: "2013n", title: "1111111111111111111111111111111111"
}, {
text: "2014年", value: 2014, py: "2014n", title: "1111111111111111111111111111111111"
}, {
text: "2015年", value: 2015, py: "2015n", title: "1111111111111111111111111111111111"
}, {
text: "2016年", value: 2016, py: "2016n", title: "1111111111111111111111111111111111"
}, {
type: "bi.label",
value: "李四"
text: "2017年", value: 2017, py: "2017n", title: "1111111111111111111111111111111111"
}];
var popup = BI.createWidget({
var adapter = BI.createWidget({
type: "bi.button_group",
cls: "bi-border",
items: items,
cls: "layout-bg1",
items: this._createItems(items),
chooseType: 1,
behaviors: {},
layouts: [{
type: "bi.vertical"
}]
});
return {
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: adapter,
top: 50,
left: 50,
width: 200,
height: 100
}]
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.searcher",
listeners: [{
eventName: BI.Searcher.EVENT_STOP,
action: function () {
popup.populate(items)
}
}, {
eventName: BI.Searcher.EVENT_PAUSE,
action: function () {
popup.populate(items)
}
}],
adapter: {
getItems: function () {
return items
}
},
popup: popup,
masker: false
type: "bi.absolute",
width: 200,
height: 30,
items: [{
el: {
type: "bi.searcher",
adapter: adapter,
width: 200,
height: 30
},
left: 0,
right: 0,
top: 0,
bottom: 0
}]
},
left: 0,
right: 0,
top: 0
}, {
el: popup,
left: 0,
right: 0,
top: 50,
bottom: 0
top: 100,
left: 300
}]
}
})
}
});
BI.shortcut("demo.searcher", Demo.Func);

59
demo/js/core/abstract/combination/demo.switcher.js

@ -0,0 +1,59 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
render: function () {
var adapter = BI.createWidget({
type: "bi.label",
cls: "layout-bg2",
text: "将在该处弹出switcher"
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: adapter,
top: 50,
left: 20,
width: 200,
height: 300
}]
});
BI.createWidget({
type: "bi.vertical",
element: this,
hgap: 30,
vgap: 20,
items: [{
type: "bi.switcher",
el: {
type: "bi.button",
height: 25,
text: "Switcher"
},
popup: {
cls: "mvc-border layout-bg5",
items: BI.createItems([{
text: "项目1",
value: 1
}, {
text: "项目2",
value: 2
}, {
text: "项目3",
value: 3
}, {
text: "项目4",
value: 4
}], {
type: "bi.single_select_item",
height: 25
})
},
adapter: adapter
}]
})
}
});
BI.shortcut("demo.switcher", Demo.Func);

69
demo/js/core/abstract/combination/demo.tab.js

@ -0,0 +1,69 @@
Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
},
_createTabs: function (v) {
switch (v) {
case 1:
return BI.createWidget({
type: "bi.label",
cls: "layout-bg1",
text: "面板1"
})
case 2:
return BI.createWidget({
type: "bi.label",
cls: "layout-bg2",
text: "面板2"
})
}
},
render: function () {
this.tab = BI.createWidget({
type: "bi.button_group",
height: 30,
items: [{
text: "Tab1",
value: 1,
width: 50,
cls: "mvc-button layout-bg3"
}, {
text: "Tab2",
value: 2,
width: 50,
cls: "mvc-button layout-bg4"
}],
layouts: [{
type: "bi.center_adapt",
items: [{
el: {
type: "bi.horizontal",
width: 100
}
}]
}]
});
var tab = BI.createWidget({
direction: "custom",
type: "bi.tab",
element: this,
tab: this.tab,
cardCreator: BI.bind(this._createTabs, this)
});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: this.tab,
left: 200,
top: 200
}]
})
tab.setSelect(2);
}
});
BI.shortcut("demo.tab", Demo.Func);

0
demo/js/core/abstract/mvc.custom_tree.js → demo/js/core/abstract/demo.custom_tree.js

3
demo/js/widget/basewidget/demo.items.js

@ -15,6 +15,9 @@ Demo.Items = BI.inherit(BI.Widget, {
}, {
type: "bi.single_select_item",
text: "单选项"
}, {
type: "bi.single_select_radio_item",
text: "单选项"
}, {
type: "bi.label",
height: 30,

4
demo/js/widget/date/demo.date.js → demo/js/widget/date/demo.multidate_combo.js

@ -16,7 +16,7 @@ Demo.Date = BI.inherit(BI.Widget, {
type: "bi.horizontal_auto",
vgap: 10,
items: [{
type: "bi.date_combo",
type: "bi.multidate_combo",
ref: function () {
self.datecombo = this;
},
@ -44,4 +44,4 @@ Demo.Date = BI.inherit(BI.Widget, {
}
})
BI.shortcut("demo.date", Demo.Date);
BI.shortcut("demo.multidate_combo", Demo.Date);

34
demo/js/widget/datetime/demo.datetime.js

@ -2,31 +2,27 @@
* Created by Urthur on 2017/7/18.
*/
Demo.CustomDateTime = BI.inherit(BI.Widget, {
props: {
},
props: {},
render: function () {
var self = this;
return {
type: "bi.absolute",
items: [{
el: {
type: "bi.custom_date_time_combo",
ref: function (_ref) {
self.customDateTime = _ref;
var value, date, dateStr;
self.customDateTime.on(BI.CustomDateTimeCombo.EVENT_CONFIRM, function () {
value = this.getValue();
date = new Date(value.year,value.month,value.day,value.hour,value.minute,value.second);
dateStr = date.print("%Y-%X-%d %H:%M:%S");
type: "bi.date_time_combo",
listeners: [{
eventName: BI.DateTimeCombo.EVENT_CONFIRM,
action: function () {
var value = this.getValue();
var date = new Date(value.year, value.month, value.day, value.hour, value.minute, value.second);
var dateStr = date.print("%Y-%X-%d %H:%M:%S");
BI.Msg.alert("日期", dateStr);
});
self.customDateTime.on(BI.CustomDateTimeCombo.EVENT_CANCEL, function () {
value = this.getValue();
date = new Date(value.year,value.month,value.day,value.hour,value.minute,value.second);
dateStr = date.print("%Y-%X-%d %H:%M:%S");
BI.Msg.alert("日期", dateStr);
});
}
}
}, {
eventName: BI.DateTimeCombo.EVENT_CANCEL,
action: function () {
}
}]
},
top: 200,
left: 200
@ -34,4 +30,4 @@ Demo.CustomDateTime = BI.inherit(BI.Widget, {
};
}
});
BI.shortcut("demo.custom_date_time", Demo.CustomDateTime);
BI.shortcut("demo.date_time", Demo.CustomDateTime);

27
demo/js/widget/dialog/demo.dialog.js

@ -1,27 +0,0 @@
Demo.DialogView = BI.inherit(BI.Widget, {
render: function () {
var items = [{
el: {
type: 'bi.button',
text: '弹出对话框',
level: 'common',
height: 30
}
}];
BI.each(items, function (i, item) {
item.el.handler = function () {
BI.Msg.alert('提示', "这是一段可以换行的文字,为了使它换行我要多写几个字,但是我又凑不够这么多的字,万般焦急下,只能随便写写");
}
});
return {
type: "bi.left",
vgap: 200,
hgap: 20,
items: items
}
}
});
BI.shortcut("demo.dialog", Demo.DialogView);

28
demo/js/widget/downlist/demo.downlist.js

@ -17,7 +17,7 @@ Demo.Downlist = BI.inherit(BI.Widget, {
render: function () {
self = this;
var self = this;
return {
type: "bi.horizontal_adapt",
items: [{
@ -25,7 +25,7 @@ Demo.Downlist = BI.inherit(BI.Widget, {
ref: function (_ref) {
self.downlist = _ref;
},
cls:"layout-bg3",
cls: "layout-bg3",
height: 30,
width: 100,
items: [
@ -68,11 +68,11 @@ Demo.Downlist = BI.inherit(BI.Widget, {
}]
}],
[{
text: "column 8",
value: 18,
cls: "dot-e-font",
selected: true
},
text: "column 8",
value: 18,
cls: "dot-e-font",
selected: true
},
{
text: "column 9",
@ -81,11 +81,11 @@ Demo.Downlist = BI.inherit(BI.Widget, {
}
],
[{
text: "column 10",
value: 20,
cls: "dot-e-font",
selected: true
},
text: "column 10",
value: 20,
cls: "dot-e-font",
selected: true
},
{
text: "column 11",
@ -122,8 +122,8 @@ Demo.Downlist = BI.inherit(BI.Widget, {
}, {
type: "bi.label",
text: "显示选择值",
width:500,
cls:"layout-bg4",
width: 500,
cls: "layout-bg4",
ref: function (_ref) {
self.label = _ref;
}

40
demo/js/widget/table/demo.excel_table.js

@ -1,40 +0,0 @@
/**
* Created by Dailer on 2017/7/12.
*/
Demo.ExcelTable = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-exceltable"
},
render: function () {
return {
type: "bi.horizontal_auto",
items: [{
type: "bi.excel_table",
columnSize: [200,200,200,200,200],
items: [
[{
type: "bi.label",
cls: "layout-bg1",
text: "第一行第一列"
}, {
type: "bi.label",
cls: "layout-bg2",
text: "第一行第二列"
}],
[{
type: "bi.label",
cls: "layout-bg3",
text: "第二行第一列"
}, {
type: "bi.label",
cls: "layout-bg4",
text: "第二行第二列"
}]
]
}],
width:500
}
}
})
BI.shortcut("demo.excel_table", Demo.ExcelTable);

2
demo/version.js

@ -13,6 +13,8 @@ BI.i18n = {
"BI-Basic_Clears": "清空",
"BI-Basic_Cancel": "取消",
"BI-Basic_Time": "时间",
"BI-Basic_Total": "总",
"BI-Tiao_Data": "条数据",
"BI-Basic_Simple_Sunday": "日",
"BI-Basic_Simple_Monday": "一",
"BI-Basic_Simple_Tuesday": "二",

8
dist/bundle.css vendored

@ -3172,19 +3172,19 @@ ul.ztree.zTreeDragUL {
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-multidate-popup .bi-multidate-popup-label {
.bi-multidate-popup .multidate-popup-label {
color: #3f8ce8;
font-size: 14px;
}
.bi-multidate-popup .bi-multidate-popup-item:active,
.bi-multidate-popup .bi-multidate-popup-item.active {
.bi-multidate-popup .multidate-popup-item:active,
.bi-multidate-popup .multidate-popup-item.active {
background-color: #3f8ce8;
color: #ffffff;
-webkit-border-radius: 2px 2px 0 0;
-moz-border-radius: 2px 2px 0 0;
border-radius: 2px 2px 0 0;
}
.bi-multidate-popup .bi-multidate-popup-button {
.bi-multidate-popup .multidate-popup-button {
color: #3f8ce8;
font-size: 14px;
}

357
dist/bundle.js vendored

@ -69421,6 +69421,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-color-chooser-popup",
width: 200,
height: 145
})
},
@ -80652,7 +80653,7 @@ BI.DateCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-combo bi-border",
height: 30
height: 25
});
},
_init: function () {
@ -81152,6 +81153,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: 'bi-date-time-combo bi-border',
width: 200,
height: 24
});
},
@ -81267,50 +81269,6 @@ BI.DateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW = "BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW";
BI.shortcut('bi.date_time_combo', BI.DateTimeCombo);
/**
* Created by Urthur on 2017/7/14.
*/
BI.CustomDateTimeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.CustomDateTimeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-custom-date-time-combo"
})
},
_init: function () {
BI.CustomDateTimeCombo.superclass._init.apply(this, arguments);
var self = this;
this.DateTime = BI.createWidget({
type: "bi.date_time_combo",
element: this
});
this.DateTime.on(BI.DateTimeCombo.EVENT_CANCEL, function () {
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE);
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CANCEL);
});
this.DateTime.on(BI.DateTimeCombo.EVENT_CONFIRM, function () {
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE);
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CONFIRM);
});
this.DateTime.on(BI.DateTimeCombo.EVENT_CHANGE, function () {
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE);
});
},
getValue: function () {
return this.DateTime.getValue();
},
setValue: function (v) {
this.DateTime.setValue(v);
}
});
BI.CustomDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.CustomDateTimeCombo.EVENT_CANCEL = "EVENT_CANCEL";
BI.CustomDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.custom_date_time_combo", BI.CustomDateTimeCombo);
/**
* Created by Urthur on 2017/7/14.
*/
@ -81328,7 +81286,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.cancelButton = BI.createWidget({
type: 'bi.text_button',
forceCenter: true,
cls: 'bi-multidate-popup-button bi-border-top bi-border-right',
cls: 'multidate-popup-button bi-border-top bi-border-right',
shadow: true,
text: BI.i18nText("BI-Basic_Cancel")
});
@ -81339,7 +81297,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.okButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: 'bi-multidate-popup-button bi-border-top',
cls: 'multidate-popup-button bi-border-top',
shadow: true,
text: BI.i18nText("BI-Basic_OK")
});
@ -81357,55 +81315,64 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
});
this.dateSelect = BI.createWidget({
type: "bi.horizontal",
type: "bi.vertical_adapt",
cls: "bi-border-top",
items: [{
type: "bi.label",
text: BI.i18nText("BI-Basic_Time"),
width: 45
},{
}, {
type: "bi.date_time_select",
max: 23,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.hour = _ref;
self.hour.on(BI.DateTimeSelect.EVENT_CONFIRM, function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
}
},{
}, {
type: "bi.label",
text: ":",
width: 15
},{
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.minute = _ref;
self.minute.on(BI.DateTimeSelect.EVENT_CONFIRM, function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
}
},{
}, {
type: "bi.label",
text: ":",
width: 15
},{
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.second = _ref;
self.second.on(BI.DateTimeSelect.EVENT_CONFIRM, function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
}
}]
});
@ -81432,7 +81399,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
}, {
el: this.dateSelect,
height: 50
},{
}, {
el: this.dateButton,
height: 30
}]
@ -82831,270 +82798,6 @@ BI.SmallTextEditor = BI.inherit(BI.TextEditor, {
}
});
BI.shortcut("bi.small_text_editor", BI.SmallTextEditor);/**
*
* Created by GUY on 2016/3/28.
* @class BI.ExcelTableCell
* @extends BI.Widget
*/
BI.ExcelTableCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ExcelTableCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-excel-table-cell",
text: ""
});
},
_init: function () {
BI.ExcelTableCell.superclass._init.apply(this, arguments);
var self = this, o = this.options;
BI.createWidget({
type: "bi.label",
element: this,
textAlign: "left",
whiteSpace: "normal",
height: this.options.height,
text: this.options.text,
value: this.options.value
})
}
});
BI.shortcut('bi.excel_table_cell', BI.ExcelTableCell);/**
*
* Created by GUY on 2016/3/28.
* @class BI.ExcelTableHeaderCell
* @extends BI.Widget
*/
BI.ExcelTableHeaderCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ExcelTableHeaderCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-excel-table-header-cell bi-background",
text: ""
});
},
_init: function () {
BI.ExcelTableHeaderCell.superclass._init.apply(this, arguments);
var self = this, o = this.options;
BI.createWidget({
type: "bi.label",
element: this,
textAlign: BI.HorizontalAlign.Center,
whiteSpace: "normal",
height: this.options.height,
text: this.options.text,
value: this.options.value
})
}
});
BI.shortcut('bi.excel_table_header_cell', BI.ExcelTableHeaderCell);/**
* Excel表格
*
* Created by GUY on 2016/3/28.
* @class BI.ExcelTable
* @extends BI.Widget
*/
BI.ExcelTable = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ExcelTable.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-excel-table",
el: {
type: "bi.responsive_table"
},
isNeedResize: false,
isResizeAdapt: true,
isNeedMerge: false,//是否需要合并单元格
mergeCols: [], //合并的单元格列号
mergeRule: function (row1, row2) { //合并规则, 默认相等时合并
return BI.isEqual(row1, row2);
},
columnSize: [],
headerRowSize: 37,
footerRowSize: 37,
rowSize: 37,
regionColumnSize: false,
items: [] //二维数组
});
},
_init: function () {
BI.ExcelTable.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var mergeCols = [];
BI.each(o.mergeCols, function (i, col) {
mergeCols.push(col + 1);
});
this.table = BI.createWidget(o.el, {
type: "bi.table_view",
element: this,
isNeedFreeze: false,
isNeedMerge: o.isNeedMerge,
mergeCols: mergeCols,
mergeRule: o.mergeRule,
columnSize: [""].concat(o.columnSize),
headerRowSize: 18,
rowSize: o.rowSize,
regionColumnSize: o.regionColumnSize || [82, ""]
});
if (BI.isNotEmptyArray(o.items)) {
this.populate(o.items);
}
BI.nextTick(function () {
self.setRegionColumnSize(o.regionColumnSize || [82, ""]);
});
},
resize: function () {
this.table.resize();
},
setColumnSize: function (columnSize) {
this.table.setColumnSize(columnSize);
},
getColumnSize: function () {
return this.table.getColumnSize();
},
getCalculateColumnSize: function () {
return this.table.getCalculateColumnSize();
},
setHeaderColumnSize: function (columnSize) {
this.table.setHeaderColumnSize(columnSize);
},
setRegionColumnSize: function (columnSize) {
this.table.setRegionColumnSize(columnSize);
},
getRegionColumnSize: function () {
return this.table.getRegionColumnSize();
},
getCalculateRegionColumnSize: function () {
return this.table.getCalculateRegionColumnSize();
},
getCalculateRegionRowSize: function () {
return this.table.getCalculateRegionRowSize();
},
getClientRegionColumnSize: function () {
return this.table.getClientRegionColumnSize();
},
getScrollRegionColumnSize: function () {
return this.table.getScrollRegionColumnSize();
},
getScrollRegionRowSize: function () {
return this.table.getScrollRegionRowSize();
},
hasVerticalScroll: function () {
return this.table.hasVerticalScroll();
},
setVerticalScroll: function (scrollTop) {
this.table.setVerticalScroll(scrollTop);
},
setLeftHorizontalScroll: function (scrollLeft) {
this.table.setLeftHorizontalScroll(scrollLeft);
},
setRightHorizontalScroll: function (scrollLeft) {
this.table.setRightHorizontalScroll(scrollLeft);
},
getVerticalScroll: function () {
return this.table.getVerticalScroll();
},
getLeftHorizontalScroll: function () {
return this.table.getLeftHorizontalScroll();
},
getRightHorizontalScroll: function () {
return this.table.getRightHorizontalScroll();
},
getColumns: function () {
return this.table.getColumns();
},
resizeHeader: function () {
this.table.resize();
this.table._resizeHeader && this.table._resizeHeader();
},
attr: function (key,value) {
var self = this;
if (BI.isObject(key)) {
BI.each(key, function (k, v) {
self.attr(k, v);
});
return;
}
BI.ExcelTable.superclass.attr.apply(this, arguments);
switch (key){
case "mergeCols":
var mCols = [];
BI.each(value, function (i, col) {
mCols.push(col + 1);
});
value=mCols;
break;
}
this.table.attr.apply(this.table, arguments);
},
populate: function (rows) {
var self = this;
var columnSize = this.getColumnSize();
var items = [];
var header = [{
type: "bi.excel_table_header_cell"
}];
if (BI.isNotNull(rows)) {
BI.each(columnSize, function (i, size) {
header.push({
type: "bi.excel_table_header_cell",
text: BI.int2Abc(i + 1)
});
});
BI.each(rows, function (i, row) {
items.push([{
type: "bi.excel_table_header_cell",
text: (i + 1)
}].concat(row));
});
}
this.table.populate(items, [header]);
},
destroy: function () {
this.table.destroy();
BI.ExcelTable.superclass.destroy.apply(this, arguments);
}
});
BI.shortcut('bi.excel_table', BI.ExcelTable);/**
* 文件管理控件组
*
* Created by GUY on 2015/12/11.

1
dist/case.js vendored

@ -3748,6 +3748,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-color-chooser-popup",
width: 200,
height: 145
})
},

2
dist/config.js vendored

@ -13,6 +13,8 @@ BI.i18n = {
"BI-Basic_Clears": "清空",
"BI-Basic_Cancel": "取消",
"BI-Basic_Time": "时间",
"BI-Basic_Total": "总",
"BI-Tiao_Data": "条数据",
"BI-Basic_Simple_Sunday": "日",
"BI-Basic_Simple_Monday": "一",
"BI-Basic_Simple_Tuesday": "二",

4096
dist/demo.js vendored

File diff suppressed because one or more lines are too long

8
dist/widget.css vendored

@ -85,19 +85,19 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-multidate-popup .bi-multidate-popup-label {
.bi-multidate-popup .multidate-popup-label {
color: #3f8ce8;
font-size: 14px;
}
.bi-multidate-popup .bi-multidate-popup-item:active,
.bi-multidate-popup .bi-multidate-popup-item.active {
.bi-multidate-popup .multidate-popup-item:active,
.bi-multidate-popup .multidate-popup-item.active {
background-color: #3f8ce8;
color: #ffffff;
-webkit-border-radius: 2px 2px 0 0;
-moz-border-radius: 2px 2px 0 0;
border-radius: 2px 2px 0 0;
}
.bi-multidate-popup .bi-multidate-popup-button {
.bi-multidate-popup .multidate-popup-button {
color: #3f8ce8;
font-size: 14px;
}

356
dist/widget.js vendored

@ -2268,7 +2268,7 @@ BI.DateCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-combo bi-border",
height: 30
height: 25
});
},
_init: function () {
@ -2768,6 +2768,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: 'bi-date-time-combo bi-border',
width: 200,
height: 24
});
},
@ -2883,50 +2884,6 @@ BI.DateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW = "BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW";
BI.shortcut('bi.date_time_combo', BI.DateTimeCombo);
/**
* Created by Urthur on 2017/7/14.
*/
BI.CustomDateTimeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.CustomDateTimeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-custom-date-time-combo"
})
},
_init: function () {
BI.CustomDateTimeCombo.superclass._init.apply(this, arguments);
var self = this;
this.DateTime = BI.createWidget({
type: "bi.date_time_combo",
element: this
});
this.DateTime.on(BI.DateTimeCombo.EVENT_CANCEL, function () {
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE);
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CANCEL);
});
this.DateTime.on(BI.DateTimeCombo.EVENT_CONFIRM, function () {
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE);
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CONFIRM);
});
this.DateTime.on(BI.DateTimeCombo.EVENT_CHANGE, function () {
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE);
});
},
getValue: function () {
return this.DateTime.getValue();
},
setValue: function (v) {
this.DateTime.setValue(v);
}
});
BI.CustomDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.CustomDateTimeCombo.EVENT_CANCEL = "EVENT_CANCEL";
BI.CustomDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.custom_date_time_combo", BI.CustomDateTimeCombo);
/**
* Created by Urthur on 2017/7/14.
*/
@ -2944,7 +2901,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.cancelButton = BI.createWidget({
type: 'bi.text_button',
forceCenter: true,
cls: 'bi-multidate-popup-button bi-border-top bi-border-right',
cls: 'multidate-popup-button bi-border-top bi-border-right',
shadow: true,
text: BI.i18nText("BI-Basic_Cancel")
});
@ -2955,7 +2912,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.okButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: 'bi-multidate-popup-button bi-border-top',
cls: 'multidate-popup-button bi-border-top',
shadow: true,
text: BI.i18nText("BI-Basic_OK")
});
@ -2973,55 +2930,64 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
});
this.dateSelect = BI.createWidget({
type: "bi.horizontal",
type: "bi.vertical_adapt",
cls: "bi-border-top",
items: [{
type: "bi.label",
text: BI.i18nText("BI-Basic_Time"),
width: 45
},{
}, {
type: "bi.date_time_select",
max: 23,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.hour = _ref;
self.hour.on(BI.DateTimeSelect.EVENT_CONFIRM, function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
}
},{
}, {
type: "bi.label",
text: ":",
width: 15
},{
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.minute = _ref;
self.minute.on(BI.DateTimeSelect.EVENT_CONFIRM, function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
}
},{
}, {
type: "bi.label",
text: ":",
width: 15
},{
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.second = _ref;
self.second.on(BI.DateTimeSelect.EVENT_CONFIRM, function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
}
}]
});
@ -3048,7 +3014,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
}, {
el: this.dateSelect,
height: 50
},{
}, {
el: this.dateButton,
height: 30
}]
@ -4447,270 +4413,6 @@ BI.SmallTextEditor = BI.inherit(BI.TextEditor, {
}
});
BI.shortcut("bi.small_text_editor", BI.SmallTextEditor);/**
*
* Created by GUY on 2016/3/28.
* @class BI.ExcelTableCell
* @extends BI.Widget
*/
BI.ExcelTableCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ExcelTableCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-excel-table-cell",
text: ""
});
},
_init: function () {
BI.ExcelTableCell.superclass._init.apply(this, arguments);
var self = this, o = this.options;
BI.createWidget({
type: "bi.label",
element: this,
textAlign: "left",
whiteSpace: "normal",
height: this.options.height,
text: this.options.text,
value: this.options.value
})
}
});
BI.shortcut('bi.excel_table_cell', BI.ExcelTableCell);/**
*
* Created by GUY on 2016/3/28.
* @class BI.ExcelTableHeaderCell
* @extends BI.Widget
*/
BI.ExcelTableHeaderCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ExcelTableHeaderCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-excel-table-header-cell bi-background",
text: ""
});
},
_init: function () {
BI.ExcelTableHeaderCell.superclass._init.apply(this, arguments);
var self = this, o = this.options;
BI.createWidget({
type: "bi.label",
element: this,
textAlign: BI.HorizontalAlign.Center,
whiteSpace: "normal",
height: this.options.height,
text: this.options.text,
value: this.options.value
})
}
});
BI.shortcut('bi.excel_table_header_cell', BI.ExcelTableHeaderCell);/**
* Excel表格
*
* Created by GUY on 2016/3/28.
* @class BI.ExcelTable
* @extends BI.Widget
*/
BI.ExcelTable = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ExcelTable.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-excel-table",
el: {
type: "bi.responsive_table"
},
isNeedResize: false,
isResizeAdapt: true,
isNeedMerge: false,//是否需要合并单元格
mergeCols: [], //合并的单元格列号
mergeRule: function (row1, row2) { //合并规则, 默认相等时合并
return BI.isEqual(row1, row2);
},
columnSize: [],
headerRowSize: 37,
footerRowSize: 37,
rowSize: 37,
regionColumnSize: false,
items: [] //二维数组
});
},
_init: function () {
BI.ExcelTable.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var mergeCols = [];
BI.each(o.mergeCols, function (i, col) {
mergeCols.push(col + 1);
});
this.table = BI.createWidget(o.el, {
type: "bi.table_view",
element: this,
isNeedFreeze: false,
isNeedMerge: o.isNeedMerge,
mergeCols: mergeCols,
mergeRule: o.mergeRule,
columnSize: [""].concat(o.columnSize),
headerRowSize: 18,
rowSize: o.rowSize,
regionColumnSize: o.regionColumnSize || [82, ""]
});
if (BI.isNotEmptyArray(o.items)) {
this.populate(o.items);
}
BI.nextTick(function () {
self.setRegionColumnSize(o.regionColumnSize || [82, ""]);
});
},
resize: function () {
this.table.resize();
},
setColumnSize: function (columnSize) {
this.table.setColumnSize(columnSize);
},
getColumnSize: function () {
return this.table.getColumnSize();
},
getCalculateColumnSize: function () {
return this.table.getCalculateColumnSize();
},
setHeaderColumnSize: function (columnSize) {
this.table.setHeaderColumnSize(columnSize);
},
setRegionColumnSize: function (columnSize) {
this.table.setRegionColumnSize(columnSize);
},
getRegionColumnSize: function () {
return this.table.getRegionColumnSize();
},
getCalculateRegionColumnSize: function () {
return this.table.getCalculateRegionColumnSize();
},
getCalculateRegionRowSize: function () {
return this.table.getCalculateRegionRowSize();
},
getClientRegionColumnSize: function () {
return this.table.getClientRegionColumnSize();
},
getScrollRegionColumnSize: function () {
return this.table.getScrollRegionColumnSize();
},
getScrollRegionRowSize: function () {
return this.table.getScrollRegionRowSize();
},
hasVerticalScroll: function () {
return this.table.hasVerticalScroll();
},
setVerticalScroll: function (scrollTop) {
this.table.setVerticalScroll(scrollTop);
},
setLeftHorizontalScroll: function (scrollLeft) {
this.table.setLeftHorizontalScroll(scrollLeft);
},
setRightHorizontalScroll: function (scrollLeft) {
this.table.setRightHorizontalScroll(scrollLeft);
},
getVerticalScroll: function () {
return this.table.getVerticalScroll();
},
getLeftHorizontalScroll: function () {
return this.table.getLeftHorizontalScroll();
},
getRightHorizontalScroll: function () {
return this.table.getRightHorizontalScroll();
},
getColumns: function () {
return this.table.getColumns();
},
resizeHeader: function () {
this.table.resize();
this.table._resizeHeader && this.table._resizeHeader();
},
attr: function (key,value) {
var self = this;
if (BI.isObject(key)) {
BI.each(key, function (k, v) {
self.attr(k, v);
});
return;
}
BI.ExcelTable.superclass.attr.apply(this, arguments);
switch (key){
case "mergeCols":
var mCols = [];
BI.each(value, function (i, col) {
mCols.push(col + 1);
});
value=mCols;
break;
}
this.table.attr.apply(this.table, arguments);
},
populate: function (rows) {
var self = this;
var columnSize = this.getColumnSize();
var items = [];
var header = [{
type: "bi.excel_table_header_cell"
}];
if (BI.isNotNull(rows)) {
BI.each(columnSize, function (i, size) {
header.push({
type: "bi.excel_table_header_cell",
text: BI.int2Abc(i + 1)
});
});
BI.each(rows, function (i, row) {
items.push([{
type: "bi.excel_table_header_cell",
text: (i + 1)
}].concat(row));
});
}
this.table.populate(items, [header]);
},
destroy: function () {
this.table.destroy();
BI.ExcelTable.superclass.destroy.apply(this, arguments);
}
});
BI.shortcut('bi.excel_table', BI.ExcelTable);/**
* 文件管理控件组
*
* Created by GUY on 2015/12/11.

1
src/case/colorchooser/colorchooser.popup.js

@ -10,6 +10,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ColorChooserPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-color-chooser-popup",
width: 200,
height: 145
})
},

8
src/css/widget/multidate/multidate.popup.css

@ -1,16 +1,16 @@
.bi-multidate-popup .bi-multidate-popup-label {
.bi-multidate-popup .multidate-popup-label {
color: #3f8ce8;
font-size: 14px;
}
.bi-multidate-popup .bi-multidate-popup-item:active,
.bi-multidate-popup .bi-multidate-popup-item.active {
.bi-multidate-popup .multidate-popup-item:active,
.bi-multidate-popup .multidate-popup-item.active {
background-color: #3f8ce8;
color: #ffffff;
-webkit-border-radius: 2px 2px 0 0;
-moz-border-radius: 2px 2px 0 0;
border-radius: 2px 2px 0 0;
}
.bi-multidate-popup .bi-multidate-popup-button {
.bi-multidate-popup .multidate-popup-button {
color: #3f8ce8;
font-size: 14px;
}

1
src/less/base/single/editor/editor.less

@ -1,5 +1,4 @@
@import "../../../bibase";
.bi-editor{
font-size: @font-size-12;
}

5
src/less/base/single/editor/editor.shelter.less

@ -1,7 +1,4 @@
@import "../../../bibase";
.bi-shelter-editor{
.shelter-editor-text{
font-size: @font-size-12;
}
.bi-shelter-editor {
}

5
src/less/base/single/editor/editor.sign.less

@ -1,7 +1,4 @@
@import "../../../bibase";
.bi-sign-editor{
.sign-editor-text{
font-size: @font-size-12;
}
.bi-sign-editor {
}

8
src/less/widget/multidate/multidate.popup.less

@ -2,13 +2,13 @@
.bi-multidate-popup{
& .bi-multidate-popup-label {
& .multidate-popup-label {
color:@color-bi-text-highlight;
font-size:@font-size-14;
}
& .bi-multidate-popup-tab {
& .multidate-popup-tab {
}
& .bi-multidate-popup-item{
& .multidate-popup-item{
&:active,&.active{
background-color: @color-bi-text-highlight;
color: @color-bi-background-default;
@ -16,7 +16,7 @@
}
}
& .bi-multidate-popup-button{
& .multidate-popup-button{
color:@color-bi-text-highlight;
font-size:@font-size-14;
}

2
src/widget/date/combo.date.js

@ -9,7 +9,7 @@ BI.DateCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-combo bi-border",
height: 30
height: 25
});
},
_init: function () {

1
src/widget/datetime/datetime.combo.js

@ -13,6 +13,7 @@ BI.DateTimeCombo = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: 'bi-date-time-combo bi-border',
width: 200,
height: 24
});
},

44
src/widget/datetime/datetime.js

@ -1,44 +0,0 @@
/**
* Created by Urthur on 2017/7/14.
*/
BI.CustomDateTimeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.CustomDateTimeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-custom-date-time-combo"
})
},
_init: function () {
BI.CustomDateTimeCombo.superclass._init.apply(this, arguments);
var self = this;
this.DateTime = BI.createWidget({
type: "bi.date_time_combo",
element: this
});
this.DateTime.on(BI.DateTimeCombo.EVENT_CANCEL, function () {
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE);
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CANCEL);
});
this.DateTime.on(BI.DateTimeCombo.EVENT_CONFIRM, function () {
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE);
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CONFIRM);
});
this.DateTime.on(BI.DateTimeCombo.EVENT_CHANGE, function () {
self.fireEvent(BI.CustomDateTimeCombo.EVENT_CHANGE);
});
},
getValue: function () {
return this.DateTime.getValue();
},
setValue: function (v) {
this.DateTime.setValue(v);
}
});
BI.CustomDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.CustomDateTimeCombo.EVENT_CANCEL = "EVENT_CANCEL";
BI.CustomDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.custom_date_time_combo", BI.CustomDateTimeCombo);

45
src/widget/datetime/datetime.popup.js

@ -15,7 +15,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.cancelButton = BI.createWidget({
type: 'bi.text_button',
forceCenter: true,
cls: 'bi-multidate-popup-button bi-border-top bi-border-right',
cls: 'multidate-popup-button bi-border-top bi-border-right',
shadow: true,
text: BI.i18nText("BI-Basic_Cancel")
});
@ -26,7 +26,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
this.okButton = BI.createWidget({
type: "bi.text_button",
forceCenter: true,
cls: 'bi-multidate-popup-button bi-border-top',
cls: 'multidate-popup-button bi-border-top',
shadow: true,
text: BI.i18nText("BI-Basic_OK")
});
@ -44,55 +44,64 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
});
this.dateSelect = BI.createWidget({
type: "bi.horizontal",
type: "bi.vertical_adapt",
cls: "bi-border-top",
items: [{
type: "bi.label",
text: BI.i18nText("BI-Basic_Time"),
width: 45
},{
}, {
type: "bi.date_time_select",
max: 23,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.hour = _ref;
self.hour.on(BI.DateTimeSelect.EVENT_CONFIRM, function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
}
},{
}, {
type: "bi.label",
text: ":",
width: 15
},{
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.minute = _ref;
self.minute.on(BI.DateTimeSelect.EVENT_CONFIRM, function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
}
},{
}, {
type: "bi.label",
text: ":",
width: 15
},{
}, {
type: "bi.date_time_select",
max: 59,
min: 0,
width: 60,
height: 30,
listeners: [{
eventName: BI.DateTimeSelect.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
}
}],
ref: function (_ref) {
self.second = _ref;
self.second.on(BI.DateTimeSelect.EVENT_CONFIRM, function () {
self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);
});
}
}]
});
@ -119,7 +128,7 @@ BI.DateTimePopup = BI.inherit(BI.Widget, {
}, {
el: this.dateSelect,
height: 50
},{
}, {
el: this.dateButton,
height: 30
}]

31
src/widget/exceltable/exceltable.cell.js

@ -1,31 +0,0 @@
/**
*
* Created by GUY on 2016/3/28.
* @class BI.ExcelTableCell
* @extends BI.Widget
*/
BI.ExcelTableCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ExcelTableCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-excel-table-cell",
text: ""
});
},
_init: function () {
BI.ExcelTableCell.superclass._init.apply(this, arguments);
var self = this, o = this.options;
BI.createWidget({
type: "bi.label",
element: this,
textAlign: "left",
whiteSpace: "normal",
height: this.options.height,
text: this.options.text,
value: this.options.value
})
}
});
BI.shortcut('bi.excel_table_cell', BI.ExcelTableCell);

31
src/widget/exceltable/exceltable.header.cell.js

@ -1,31 +0,0 @@
/**
*
* Created by GUY on 2016/3/28.
* @class BI.ExcelTableHeaderCell
* @extends BI.Widget
*/
BI.ExcelTableHeaderCell = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ExcelTableHeaderCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-excel-table-header-cell bi-background",
text: ""
});
},
_init: function () {
BI.ExcelTableHeaderCell.superclass._init.apply(this, arguments);
var self = this, o = this.options;
BI.createWidget({
type: "bi.label",
element: this,
textAlign: BI.HorizontalAlign.Center,
whiteSpace: "normal",
height: this.options.height,
text: this.options.text,
value: this.options.value
})
}
});
BI.shortcut('bi.excel_table_header_cell', BI.ExcelTableHeaderCell);

205
src/widget/exceltable/exceltable.js

@ -1,205 +0,0 @@
/**
* Excel表格
*
* Created by GUY on 2016/3/28.
* @class BI.ExcelTable
* @extends BI.Widget
*/
BI.ExcelTable = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.ExcelTable.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-excel-table",
el: {
type: "bi.responsive_table"
},
isNeedResize: false,
isResizeAdapt: true,
isNeedMerge: false,//是否需要合并单元格
mergeCols: [], //合并的单元格列号
mergeRule: function (row1, row2) { //合并规则, 默认相等时合并
return BI.isEqual(row1, row2);
},
columnSize: [],
headerRowSize: 37,
footerRowSize: 37,
rowSize: 37,
regionColumnSize: false,
items: [] //二维数组
});
},
_init: function () {
BI.ExcelTable.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var mergeCols = [];
BI.each(o.mergeCols, function (i, col) {
mergeCols.push(col + 1);
});
this.table = BI.createWidget(o.el, {
type: "bi.table_view",
element: this,
isNeedFreeze: false,
isNeedMerge: o.isNeedMerge,
mergeCols: mergeCols,
mergeRule: o.mergeRule,
columnSize: [""].concat(o.columnSize),
headerRowSize: 18,
rowSize: o.rowSize,
regionColumnSize: o.regionColumnSize || [82, ""]
});
if (BI.isNotEmptyArray(o.items)) {
this.populate(o.items);
}
BI.nextTick(function () {
self.setRegionColumnSize(o.regionColumnSize || [82, ""]);
});
},
resize: function () {
this.table.resize();
},
setColumnSize: function (columnSize) {
this.table.setColumnSize(columnSize);
},
getColumnSize: function () {
return this.table.getColumnSize();
},
getCalculateColumnSize: function () {
return this.table.getCalculateColumnSize();
},
setHeaderColumnSize: function (columnSize) {
this.table.setHeaderColumnSize(columnSize);
},
setRegionColumnSize: function (columnSize) {
this.table.setRegionColumnSize(columnSize);
},
getRegionColumnSize: function () {
return this.table.getRegionColumnSize();
},
getCalculateRegionColumnSize: function () {
return this.table.getCalculateRegionColumnSize();
},
getCalculateRegionRowSize: function () {
return this.table.getCalculateRegionRowSize();
},
getClientRegionColumnSize: function () {
return this.table.getClientRegionColumnSize();
},
getScrollRegionColumnSize: function () {
return this.table.getScrollRegionColumnSize();
},
getScrollRegionRowSize: function () {
return this.table.getScrollRegionRowSize();
},
hasVerticalScroll: function () {
return this.table.hasVerticalScroll();
},
setVerticalScroll: function (scrollTop) {
this.table.setVerticalScroll(scrollTop);
},
setLeftHorizontalScroll: function (scrollLeft) {
this.table.setLeftHorizontalScroll(scrollLeft);
},
setRightHorizontalScroll: function (scrollLeft) {
this.table.setRightHorizontalScroll(scrollLeft);
},
getVerticalScroll: function () {
return this.table.getVerticalScroll();
},
getLeftHorizontalScroll: function () {
return this.table.getLeftHorizontalScroll();
},
getRightHorizontalScroll: function () {
return this.table.getRightHorizontalScroll();
},
getColumns: function () {
return this.table.getColumns();
},
resizeHeader: function () {
this.table.resize();
this.table._resizeHeader && this.table._resizeHeader();
},
attr: function (key,value) {
var self = this;
if (BI.isObject(key)) {
BI.each(key, function (k, v) {
self.attr(k, v);
});
return;
}
BI.ExcelTable.superclass.attr.apply(this, arguments);
switch (key){
case "mergeCols":
var mCols = [];
BI.each(value, function (i, col) {
mCols.push(col + 1);
});
value=mCols;
break;
}
this.table.attr.apply(this.table, arguments);
},
populate: function (rows) {
var self = this;
var columnSize = this.getColumnSize();
var items = [];
var header = [{
type: "bi.excel_table_header_cell"
}];
if (BI.isNotNull(rows)) {
BI.each(columnSize, function (i, size) {
header.push({
type: "bi.excel_table_header_cell",
text: BI.int2Abc(i + 1)
});
});
BI.each(rows, function (i, row) {
items.push([{
type: "bi.excel_table_header_cell",
text: (i + 1)
}].concat(row));
});
}
this.table.populate(items, [header]);
},
destroy: function () {
this.table.destroy();
BI.ExcelTable.superclass.destroy.apply(this, arguments);
}
});
BI.shortcut('bi.excel_table', BI.ExcelTable);
Loading…
Cancel
Save