Urthur 7 years ago
parent
commit
a971212551
  1. 162
      bi/base.css
  2. 427
      bi/base.js
  3. 124
      bi/case.js
  4. 730
      bi/core.css
  5. 139
      bi/core.js
  6. 124
      bi/widget.css
  7. 3097
      bi/widget.js
  8. 3
      demo/css/face.css
  9. 3
      demo/css/index.css
  10. 5
      demo/css/main.css
  11. 3
      demo/css/north.css
  12. 3
      demo/css/preview.css
  13. 3
      demo/css/west.css
  14. 2
      demo/js/base/button/demo.icon_button.js
  15. 215
      demo/js/component/demo.multilayerselecttree.leveltree.js
  16. 4
      demo/js/config/component.js
  17. 16
      demo/js/config/core.js
  18. 4
      demo/js/config/widget.js
  19. 4
      demo/js/north.js
  20. 13
      demo/js/widget/demo.interactivearrangement.js
  21. 2
      demo/js/widget/demo.multiselectcombo.js
  22. 2
      demo/less/main.less
  23. 9
      demo/version.js
  24. 162
      docs/base.css
  25. 427
      docs/base.js
  26. 124
      docs/case.js
  27. 730
      docs/core.css
  28. 139
      docs/core.js
  29. 20
      docs/demo.css
  30. 269
      docs/demo.js
  31. 24
      docs/resource.css
  32. 124
      docs/widget.css
  33. 3097
      docs/widget.js
  34. 6
      src/base/collection/collection.js
  35. 26
      src/base/combination/combo.js
  36. 20
      src/base/combination/expander.js
  37. 4
      src/base/combination/loader.js
  38. 14
      src/base/combination/switcher.js
  39. 11
      src/base/combination/tab.js
  40. 6
      src/base/formula/formulaeditor.js
  41. 4
      src/base/foundation/message.js
  42. 6
      src/base/grid/grid.js
  43. 4
      src/base/single/button/button.basic.js
  44. 76
      src/base/single/editor/editor.code.js
  45. 2
      src/base/single/editor/editor.multifile.js
  46. 4
      src/base/single/editor/editor.textarea.js
  47. 9
      src/base/single/iframe/iframe.js
  48. 2
      src/base/single/input/file.js
  49. 4
      src/base/single/label/label.js
  50. 4
      src/base/table/native.scrollbar.js
  51. 58
      src/base/table/table.collection.js
  52. 19
      src/base/table/table.collection.quick.js
  53. 41
      src/base/table/table.grid.js
  54. 16
      src/base/table/table.grid.quick.js
  55. 25
      src/base/table/table.resizable.cell.js
  56. 15
      src/base/table/table.resizable.js
  57. 22
      src/base/tree/asynctree.js
  58. 4
      src/base/tree/customtree.js
  59. 8
      src/base/tree/parttree.js
  60. 17
      src/base/tree/treeview.js
  61. 1
      src/case/button/treeitem/item.multilayer.icon.treeleaf.js
  62. 2
      src/case/calendar/calendar.year.js
  63. 13
      src/case/colorchooser/colorchooser.trigger.js
  64. 48
      src/case/colorchooser/colorpicker/editor.colorpicker.js
  65. 6
      src/case/combo/bubblecombo/combo.bubble.js
  66. 4
      src/case/layer/pane.list.js
  67. 4
      src/case/list/list.select.js
  68. 4
      src/case/loader/loader.lazy.js
  69. 4
      src/case/loader/loader.list.js
  70. 7
      src/case/loader/sort.list.js
  71. 5
      src/case/pager/pager.all.count.js
  72. 18
      src/case/segment/button.segment.js
  73. 2
      src/case/table/table.dynamicsummarylayertree.js
  74. 4
      src/case/tree/tree.level.js
  75. 1
      src/case/trigger/trigger.editor.js
  76. 1
      src/case/trigger/trigger.text.js
  77. 71
      src/component/treevaluechooser/abstract.treevaluechooser.js
  78. 4
      src/config.js
  79. 2
      src/core/alias.js
  80. 26
      src/core/behavior/behavior.highlight.js
  81. 21
      src/core/controller/router.floatbox.js
  82. 6
      src/core/events.js
  83. 2
      src/core/func/dom.js
  84. 14
      src/core/func/function.js
  85. 4
      src/core/model.js
  86. 15
      src/core/utils/detectElementResize.js
  87. 2
      src/core/var.js
  88. 6
      src/core/view.js
  89. 23
      src/core/widget.js
  90. 7
      src/core/wrapper/layout/adapt/float.center.js
  91. 7
      src/core/wrapper/layout/adapt/float.horizontal.js
  92. 3
      src/css/base/colorchooser/colorchooser.trigger.css
  93. 3
      src/css/base/colorchooser/colorpicker/button.colorpicker.css
  94. 3
      src/css/base/colorchooser/colorpicker/editor.colorpicker.css
  95. 3
      src/css/base/combo/combo.bubble.css
  96. 3
      src/css/base/combo/popup.bubble.css
  97. 1
      src/css/base/dom.css
  98. 3
      src/css/base/editor/editor.adapt.css
  99. 3
      src/css/base/editor/editor.search.css
  100. 3
      src/css/base/editor/editor.search.small.css
  101. Some files were not shown because too many files have changed in this diff Show More

162
bi/base.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-chooser-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
@ -9,18 +6,12 @@
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-picker-button .color-picker-button-mask {
border: 1px solid #1a1a1a;
}
.bi-theme-dark .bi-color-picker-button .color-picker-button-mask {
border: 1px solid #ffffff;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-picker-editor .color-picker-editor-display {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
@ -29,9 +20,6 @@
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important;
}
@ -67,26 +55,16 @@
border-right: 6px solid transparent;
border-bottom: 6px solid #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble-popup-view {
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-adapt-editor .adapt-editor-text {
font-size: 14px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/
.bi-search-editor .close-font {
font-size: 20px;
@ -94,9 +72,6 @@
.bi-search-editor .search-font {
font-size: 20px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/
.bi-small-search-editor .bi-editor {
font-size: 12px;
@ -113,15 +88,9 @@
.bi-small-search-editor .search-font {
font-size: 18px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-sign-initial-editor .sign-initial-editor-text {
font-size: 14px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/* BASICS */
.CodeMirror {
/* Set height, width, borders, and global font properties here */
@ -129,12 +98,6 @@
cursor: text;
width: 100%;
height: 100%;
color: #1a1a1a;
background-color: #ffffff;
}
.bi-theme-dark .CodeMirror {
color: #ffffff;
background-color: #242640;
}
/* PADDING */
.CodeMirror-lines {
@ -461,13 +424,18 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: 2em;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
-webkit-tap-highlight-color: transparent;
}
.codemirror-high-line-height {
line-height: 2;
}
.codemirror-low-line-height {
line-height: 1.4;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
@ -599,9 +567,6 @@ li.CodeMirror-hint-active {
background: #08f;
color: white;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-message-title {
font-size: 16px;
cursor: pointer;
@ -621,16 +586,10 @@ li.CodeMirror-hint-active {
.bi-message-close {
font-size: 25px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-list-view .bi-button-mask {
opacity: 0.1;
filter: alpha(opacity=10);
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-panel {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
@ -640,36 +599,23 @@ li.CodeMirror-hint-active {
cursor: text;
font-size: 14px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-all-count-pager .all-pager-prev {
font-size: 16px;
}
.bi-all-count-pager .all-pager-next {
font-size: 16px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-pager .page-item {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-direction-pager .direction-pager-prev {
font-size: 16px;
}
.bi-direction-pager .direction-pager-next {
font-size: 16px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-segment > .center-element {
@ -704,10 +650,6 @@ li.CodeMirror-hint-active {
.bi-theme-dark .bi-segment > .first-element {
border-left: 1px solid #242640;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-button {
@ -861,59 +803,35 @@ li.CodeMirror-hint-active {
filter: alpha(opacity=20);
background-color: #1a1a1a;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-single-select-icon-text-item:active .b-font:before,
.bi-single-select-icon-text-item.active .b-font:before {
color: #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-editor {
font-size: 12px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multifile-editor .multifile-editor {
text-align: right;
cursor: pointer;
font-size: 100px;
z-index: 2;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-shelter-editor .shelter-editor-text {
font-size: 12px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-sign-editor .sign-editor-text {
font-size: 12px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-textarea-editor {
@ -927,17 +845,11 @@ li.CodeMirror-hint-active {
.bi-textarea-editor .textarea-editor-content {
border: none;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-file {
opacity: 0;
filter: alpha(opacity=0);
z-index: 2;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-input {
border: none;
outline: none;
@ -954,10 +866,6 @@ li.CodeMirror-hint-active {
border: none;
color: #e85050 !important;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-text {
@ -967,9 +875,6 @@ li.CodeMirror-hint-active {
white-space: nowrap;
word-break: break-word;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble {
font-size: 14px;
}
@ -980,15 +885,9 @@ li.CodeMirror-hint-active {
background: #fddddd;
color: #e85050;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-tip {
position: fixed !important;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-toast {
font-size: 14px;
-webkit-border-radius: 2px;
@ -1003,9 +902,6 @@ li.CodeMirror-hint-active {
background: #fddddd;
color: #e85050;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-tooltip {
max-width: 250px;
-webkit-border-radius: 2px;
@ -1023,9 +919,6 @@ li.CodeMirror-hint-active {
color: #e85050;
border: 1px solid #f4cbcb;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-collection-table-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
@ -1048,17 +941,11 @@ li.CodeMirror-hint-active {
.bi-theme-dark .bi-collection-table-cell.first-col {
border-left: 1px solid #525466;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-quick-collection-table > div > .bi-collection {
overflow: hidden !important;
overflow-x: hidden !important;
overflow-y: hidden !important;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-table > .first-col {
border-left: none;
}
@ -1137,9 +1024,6 @@ li.CodeMirror-hint-active {
border-top: 1px solid #525466;
border-left: 1px solid #525466;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-grid-table-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
@ -1162,9 +1046,6 @@ li.CodeMirror-hint-active {
.bi-theme-dark .bi-grid-table-cell.first-col {
border-left: 1px solid #525466;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.scrollbar-layout-main {
box-sizing: border-box;
outline: none;
@ -1278,9 +1159,6 @@ li.CodeMirror-hint-active {
bottom: 0;
position: absolute;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-resizable-table-cell .resizable-table-cell-resizer-container {
cursor: ew-resize;
z-index: 1;
@ -1289,14 +1167,17 @@ li.CodeMirror-hint-active {
.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob {
background-color: #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob {
background-color: #58cc7d;
}
.bi-resizable-table .resizable-table-resizer {
cursor: ew-resize;
z-index: 1;
background-color: #3f8ce8;
}
.bi-resizable-table .resizable-table-resizer.suitable {
background-color: #58cc7d;
}
.bi-resizable-table .resizable-table-region-resizer {
cursor: ew-resize;
z-index: 1;
@ -1305,28 +1186,16 @@ li.CodeMirror-hint-active {
.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob {
background-color: #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-branch-tree .bi-branch-tree-view {
min-width: 300px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-trigger .bi-trigger-icon-button {
font-size: 16px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-select-text-trigger {
@ -1334,18 +1203,11 @@ li.CodeMirror-hint-active {
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-small-select-text-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/**********BI.BIListView*************/

427
bi/base.js

File diff suppressed because it is too large Load Diff

124
bi/case.js

@ -1477,6 +1477,7 @@ BI.MultiLayerIconTreeLeafItem = BI.inherit(BI.BasicButton, {
var self = this, o = this.options;
this.item = BI.createWidget({
type: "bi.icon_tree_leaf_item",
cls: "bi-list-item-none",
iconCls: o.iconCls,
id: o.id,
pId: o.pId,
@ -1820,6 +1821,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
var conf = BI.YearCalendar.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-year-calendar",
behaviors: {},
logic: {
dynamic: false
},
@ -1884,6 +1886,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
this.years = BI.createWidget({
type: "bi.button_group",
behaviors: o.behaviors,
items: BI.createItems(items, {}),
layouts: [BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, {
columns: 2,
@ -3938,7 +3941,7 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger bi-card",
baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger",
height: 30
})
},
@ -3946,7 +3949,8 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, {
_init: function () {
BI.ColorChooserTrigger.superclass._init.apply(this, arguments);
this.colorContainer = BI.createWidget({
type: "bi.layout"
type: "bi.layout",
cls: "bi-card color-chooser-trigger-content"
});
var down = BI.createWidget({
@ -3979,7 +3983,13 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, {
setValue: function (color) {
BI.ColorChooserTrigger.superclass.setValue.apply(this, arguments);
this.colorContainer.element.css("background-color", color);
if (color === "") {
this.colorContainer.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-background");
} else if (color === "transparent") {
this.colorContainer.element.css("background-color", "").removeClass("auto-color-background").addClass("trans-color-background")
} else {
this.colorContainer.element.css({"background-color": color}).removeClass("auto-color-background").removeClass("trans-color-background");
}
}
});
BI.ColorChooserTrigger.EVENT_CHANGE = "ColorChooserTrigger.EVENT_CHANGE";
@ -4272,7 +4282,7 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
errorText: BI.i18nText("BI-Color_Picker_Error_Text"),
allowBlank: true,
value: 255,
width: 35,
width: 32,
height: 20
});
BI.each(Ws, function (i, w) {
@ -4288,7 +4298,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.B = Ws[2];
this.none = BI.createWidget({
type: "bi.checkbox"
type: "bi.checkbox",
title: BI.i18nText("BI-Basic_Auto")
});
this.none.on(BI.Checkbox.EVENT_CHANGE, function () {
if (this.isSelected()) {
@ -4303,6 +4314,23 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
}
});
this.transparent = BI.createWidget({
type: "bi.checkbox",
title: BI.i18nText("BI-Transparent_Color")
});
this.transparent.on(BI.Checkbox.EVENT_CHANGE, function () {
if (this.isSelected()) {
self.lastColor = self.getValue();
self.setValue("transparent");
} else {
self.setValue(self.lastColor || "#000000");
}
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {
self.colorShow.element.css("background-color", self.getValue());
self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE);
}
});
BI.createWidget({
type: "bi.htape",
element: this,
@ -4312,21 +4340,21 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
}, {
el: RGB[0],
lgap: 10,
width: 20
width: 16
}, {
el: this.R,
width: 32
}, {
el: RGB[1],
lgap: 10,
width: 20
width: 16
}, {
el: this.G,
width: 32
}, {
el: RGB[2],
lgap: 10,
width: 20
width: 16
}, {
el: this.B,
width: 32
@ -4335,18 +4363,33 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
type: "bi.center_adapt",
items: [this.none]
},
width: 20
width: 18
}, {
el: {
type: "bi.center_adapt",
items: [this.transparent]
},
width: 18
}]
})
},
setValue: function (color) {
if (color === "transparent") {
this.transparent.setSelected(true);
this.none.setSelected(false);
this.R.setValue("");
this.G.setValue("");
this.B.setValue("");
return;
}
if (!color) {
color = "";
this.none.setSelected(true);
} else {
this.none.setSelected(false);
}
this.transparent.setSelected(false);
this.colorShow.element.css("background-color", color);
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));
this.R.setValue(BI.isNull(json.r) ? "" : json.r);
@ -4355,6 +4398,9 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
},
getValue: function () {
if (this.transparent.isSelected()) {
return "transparent";
}
return BI.DOM.rgb2hex(BI.DOM.json2rgb({
r: this.R.getValue(),
g: this.G.getValue(),
@ -4875,6 +4921,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
default:
break;
}
this.triangle && this.triangle.destroy();
this.triangle = BI.createWidget(op, {
type: "bi.center_adapt",
cls: "button-combo-triangle-wrapper",
@ -4935,6 +4982,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
this.combo.getView() && this.combo.getView().hideLine();
},
@ -4947,10 +4995,6 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
this.combo && this.combo.showView();
},
hasView: function () {
return BI.isNotNull(this.combo.getView());
},
isViewVisible: function () {
return this.combo.isViewVisible();
}
@ -8360,10 +8404,6 @@ BI.ListPane = BI.inherit(BI.Pane, {
this.button_group.empty();
},
doBehavior: function () {
this.button_group.doBehavior.apply(this.button_group, arguments);
},
setNotSelectedValue: function () {
this.button_group.setNotSelectedValue.apply(this.button_group, arguments);
},
@ -8653,10 +8693,6 @@ BI.SelectList = BI.inherit(BI.Widget, {
this.list.element.css({"max-height": h - toolHeight + "px"})
},
doBehavior: function () {
this.list.doBehavior.apply(this.list, arguments);
},
setNotSelectedValue: function () {
this.list.setNotSelectedValue.apply(this.list, arguments);
this._checkAllSelected();
@ -8751,10 +8787,6 @@ BI.LazyLoader = BI.inherit(BI.Widget, {
this.loader.empty();
},
doBehavior: function () {
this.loader.doBehavior();
},
setNotSelectedValue: function () {
this.loader.setNotSelectedValue.apply(this.loader, arguments);
},
@ -8950,10 +8982,6 @@ BI.ListLoader = BI.inherit(BI.Widget, {
});
},
doBehavior: function () {
this.button_group.doBehavior.apply(this.button_group, arguments);
},
setNotSelectedValue: function () {
this.button_group.setNotSelectedValue.apply(this.button_group, arguments);
},
@ -9115,6 +9143,9 @@ BI.SortList = BI.inherit(BI.Widget, {
},
populate: function (items) {
if (items) {
arguments[0] = this._formatItems(items);
}
this.loader.populate.apply(this.loader, arguments);
},
@ -9122,10 +9153,6 @@ BI.SortList = BI.inherit(BI.Widget, {
this.loader.empty();
},
doBehavior: function () {
this.loader.doBehavior.apply(this.loader, arguments);
},
setNotSelectedValue: function () {
this.loader.setNotSelectedValue.apply(this.loader, arguments);
},
@ -9203,9 +9230,10 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
vgap: 0,
value: o.curr,
errorText: BI.i18nText("BI-Please_Input_Positive_Integer"),
width: 30,
width: 35,
height: 20
});
this.pager = BI.createWidget({
type: "bi.pager",
width: 36,
@ -9291,7 +9319,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
BI.createWidget({
type: "bi.center_adapt",
element: this,
columnSize: ["", 30, 40, 36],
columnSize: ["", 35, 40, 36],
items: [count, this.editor, this.allPages, this.pager]
})
},
@ -9914,17 +9942,17 @@ BI.shortcut("bi.detail_pager", BI.DetailPager);/**
*/
BI.SegmentButton = BI.inherit(BI.BasicButton, {
_defaultConfig: function() {
_defaultConfig: function () {
var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend( conf, {
baseCls : (conf.baseCls ||"")+' bi-segment-button bi-list-item-active',
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + ' bi-segment-button bi-list-item-active',
shadow: true,
readonly: true,
hgap: 10
hgap: 5
})
},
_init:function() {
_init: function () {
BI.SegmentButton.superclass._init.apply(this, arguments);
var opts = this.options, self = this;
//if (BI.isNumber(opts.height) && BI.isNull(opts.lineHeight)) {
@ -9933,7 +9961,7 @@ BI.SegmentButton = BI.inherit(BI.BasicButton, {
this.text = BI.createWidget({
type: "bi.label",
element: this,
height: opts.height-2,
height: opts.height - 2,
whiteSpace: opts.whiteSpace,
text: opts.text,
value: opts.value,
@ -9941,16 +9969,16 @@ BI.SegmentButton = BI.inherit(BI.BasicButton, {
})
},
setSelected: function(){
setSelected: function () {
BI.SegmentButton.superclass.setSelected.apply(this, arguments);
},
setText : function(text) {
setText: function (text) {
BI.SegmentButton.superclass.setText.apply(this, arguments);
this.text.setText(text);
},
destroy : function() {
destroy: function () {
BI.SegmentButton.superclass.destroy.apply(this, arguments);
}
});
@ -10395,7 +10423,7 @@ BI.DynamicSummaryLayerTreeTable = BI.inherit(BI.Widget, {
_recomputeColumnSize: function () {
var o = this.options;
o.regionColumnSize = this.table.getRegionColumnSize();
var columnSize = this.table.getColumnSize();
var columnSize = this.table.getColumnSize().slice();
if (o.freezeCols.length > 1) {
for (var i = 0; i < o.freezeCols.length - 1; i++) {
columnSize.splice(1, 0, 0);
@ -12126,10 +12154,6 @@ BI.LevelTree = BI.inherit(BI.Widget, {
this.tree.populate(items);
},
doBehavior: function () {
this.tree.doBehavior.apply(this.tree, arguments);
},
setValue: function (v) {
this.tree.setValue(v);
},
@ -12330,6 +12354,7 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
}, {
el: {
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: o.triggerWidth
},
width: o.triggerWidth
@ -12411,6 +12436,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: c.triggerWidth
});

730
bi/core.css

File diff suppressed because it is too large Load Diff

139
bi/core.js

@ -3184,7 +3184,7 @@ if (!window.BI) {
if (numReg) {
var num = numReg[0];
var orilen = num.length;
var newnum = BI.parseInt(num) + 1 + '';
var newnum = parseInt(num) + 1 + '';
//进位到整数部分
if (newnum.length > orilen) {
newnum = newnum.substr(1);
@ -3728,6 +3728,12 @@ _.extend(BI, {
*/
DESTROY: '_DESTROY',
/**
* @static
* @property 取消挂载事件
*/
UNMOUNT: '_UNMOUNT',
/**
* @static
* @property 清除选择
@ -4162,7 +4168,7 @@ _.extend(BI, {
Horizontal: "horizontal"
},
Selection: {
Default: -999,
Default: -2,
None: -1,
Single: 0,
Multi: 1,
@ -4360,6 +4366,8 @@ BI.Widget = BI.inherit(BI.OB, {
update: function () {
},
beforeDestroyed: null,
destroyed: null,
_init: function () {
@ -4521,7 +4529,7 @@ BI.Widget = BI.inherit(BI.OB, {
}
//递归将所有子组件使能
BI.each(this._children, function (i, child) {
child._setEnable && child._setEnable(enable);
!child._manualSetEnable && child._setEnable && child._setEnable(enable);
});
},
@ -4533,7 +4541,7 @@ BI.Widget = BI.inherit(BI.OB, {
}
//递归将所有子组件使有效
BI.each(this._children, function (i, child) {
child._setValid && child._setValid(valid);
!child._manualSetValid && child._setValid && child._setValid(valid);
});
},
@ -4546,6 +4554,7 @@ BI.Widget = BI.inherit(BI.OB, {
},
setEnable: function (enable) {
this._manualSetEnable = true;
this._setEnable(enable);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
@ -4567,7 +4576,7 @@ BI.Widget = BI.inherit(BI.OB, {
},
setValid: function (valid) {
this.options.invalid = !valid;
this._manualSetValid = true;
this._setValid(valid);
if (valid === true) {
this.element.removeClass("base-invalid invalid");
@ -4576,6 +4585,14 @@ BI.Widget = BI.inherit(BI.OB, {
}
},
doBehavior: function () {
var args = arguments;
//递归将所有子组件使有效
BI.each(this._children, function (i, child) {
child.doBehavior && child.doBehavior.apply(child, args);
});
},
getWidth: function () {
return this.options.width;
},
@ -4710,18 +4727,20 @@ BI.Widget = BI.inherit(BI.OB, {
},
__d: function () {
this.beforeDestroyed && this.beforeDestroyed();
BI.each(this._children, function (i, widget) {
widget._unMount && widget._unMount();
});
this._children = {};
this._parent = null;
this._isMounted = false;
this.destroyed && this.destroyed();
},
_unMount: function () {
this.__d();
this.fireEvent(BI.Events.UNMOUNT);
this.purgeListeners();
this.destroyed && this.destroyed();
},
isolate: function () {
@ -4741,14 +4760,12 @@ BI.Widget = BI.inherit(BI.OB, {
_destroy: function () {
this.__d();
this.destroyed && this.destroyed();
this.element.destroy();
this.purgeListeners();
},
destroy: function () {
this.__d();
this.destroyed && this.destroyed();
this.element.destroy();
this.fireEvent(BI.Events.DESTROY);
this.purgeListeners();
@ -4958,6 +4975,10 @@ BI.Widget = BI.inherit(BI.OB, {
var copy = BI.UUID(), newKeys = BI.clone(keys);
keys.length > 1 ? newKeys.unshift(BI.deepClone(p[keys[keys.length - 1]])) : newKeys.unshift(BI.deepClone(g));
var backup = self.similar.apply(self, newKeys);
if (BI.isKey(backup.id)) {
copy = backup.id;
delete backup.id;
}
keys.length > 1 ? (p[copy] = backup, self[sset](keys[0], g, {silent: true})) : self[sset](copy, backup, {silent: true});
keys.unshift(copy);
!BI.has(self._tmp, keys[0]) && self.parent && self.parent._change(self);
@ -5244,6 +5265,8 @@ BI.View = BI.inherit(BI.V, {
created: null,
beforeDestroyed: null,
destroyed: null,
_init: function () {
@ -5733,18 +5756,22 @@ BI.View = BI.inherit(BI.V, {
},
_unMount: function () {
this.beforeDestroyed && this.beforeDestroyed();
BI.each(this._cardLayouts, function (name, card) {
card && card._unMount();
});
delete this._cardLayouts;
delete this._cards;
this.destroyed && this.destroyed();
this.trigger(BI.Events.UNMOUNT);
this.off();
},
_destroy: function () {
var self = this;
BI.each(this._cardLayouts, function (name, card) {
card && card._unMount();
BI.Layers.remove(name + self.cid);
});
delete this._cardLayouts;
delete this._cards;
@ -8081,10 +8108,10 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
_window = this
}
var attachEvent = typeof document !== 'undefined' && document.attachEvent;
var addEventListener = typeof document !== 'undefined' && document.addEventListener;
var stylesCreated = false;
if (!attachEvent) {
if (addEventListener) {
var requestFrame = (function () {
var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame ||
function (fn) {
@ -8191,8 +8218,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
}
var addResizeListener = function (element, fn) {
if (attachEvent) element.attachEvent('onresize', fn);
else {
if (addEventListener){
if (!element.__resizeTriggers__) {
if (getComputedStyle(element).position === 'static') element.style.position = 'relative';
createStyles();
@ -8212,17 +8238,21 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
});
}
element.__resizeListeners__.push(fn);
} else {
element.attachEvent('onresize', fn);
}
};
var removeResizeListener = function (element, fn) {
if (attachEvent) element.detachEvent('onresize', fn);
else {
if (addEventListener) {
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
if (!element.__resizeListeners__.length) {
element.removeEventListener('scroll', scrollListener, true);
element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
}
} else {
element.detachEvent('onresize', fn);
}
};
@ -10972,27 +11002,35 @@ BI.Behavior = BI.inherit(BI.OB, {
* @extends BI.Behavior
*/
BI.HighlightBehavior = BI.inherit(BI.Behavior, {
_defaultConfig: function() {
return BI.extend(BI.HighlightBehavior.superclass._defaultConfig.apply(this, arguments), {
});
_defaultConfig: function () {
return BI.extend(BI.HighlightBehavior.superclass._defaultConfig.apply(this, arguments), {});
},
_init : function() {
_init: function () {
BI.HighlightBehavior.superclass._init.apply(this, arguments);
},
doBehavior: function(items){
doBehavior: function (items) {
var args = Array.prototype.slice.call(arguments, 1),
o = this.options;
BI.each(items, function(i, item){
if(item instanceof BI.Single) {
if (o.rule(item.getValue(), item)) {
BI.each(items, function (i, item) {
if (item instanceof BI.Single) {
var rule = o.rule(item.getValue(), item);
function doBe(run) {
if (run === true) {
item.doHighLight.apply(item, args);
} else {
item.unHighLight.apply(item, args);
}
}
if (BI.isFunction(rule)) {
rule(doBe);
} else {
doBe(rule);
}
} else {
item.doBehavior.apply(item, args);
}
@ -12220,15 +12258,20 @@ BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
},
mounted: function () {
var self = this;
var width = this.left.element.outerWidth(),
height = this.left.element.outerHeight();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.left]
});
this.removeWidget(this.container);
},
stroke: function (items) {
@ -12283,15 +12326,20 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
},
mounted: function () {
var self = this;
var width = this.left.element.width(),
height = this.left.element.height();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.horizontal_auto",
element: this,
items: [this.left]
});
this.removeWidget(this.container);
},
_addElement: function (i, item) {
@ -15942,7 +15990,10 @@ BI.FloatBoxRouter = BI.inherit(BI.WRouter, {
var view = this.createView(url, data, viewData, context);
isValid && context.model.addChild(modelData, view.model);
view.listenTo(view.model, "destroy", function () {
self.remove(url);
self.remove(url, context);
});
context.on(BI.Events.UNMOUNT, function () {
self.remove(url, context);
});
this.store[url].populate(view);
this.views[url] = view;
@ -15951,19 +16002,7 @@ BI.FloatBoxRouter = BI.inherit(BI.WRouter, {
BI.nextTick(function () {
self.close(url);
// view.end();
var t = void 0, isNew = false, keys;
if (isValid) {
keys = modelData.split('.');
BI.each(keys, function (i, k) {
if (i === 0) {
t = context.model.get(k) || (isNew = true);
} else {
t = t[k] || (isNew = true);
}
})
}
isNew && context.model.removeChild(modelData);
!isNew && (context.listenEnd.apply(context, isValid ? keys : [modelData]) !== false) && context.populate();
(context.listenEnd.apply(context, isValid ? modelData.split('.') : [modelData]) !== false) && context.populate();
}, 30)
}).on("change:" + view.cid, _.bind(context.notifyParent, context))
}
@ -15981,7 +16020,7 @@ BI.FloatBoxRouter = BI.inherit(BI.WRouter, {
remove: function (url, context) {
url = context.rootURL + "/" + url;
if(this.controller){
if (this.controller) {
this.controller.remove(url);
delete this.store[url];
this.views[url] && this.views[url].model.destroy();
@ -16114,7 +16153,7 @@ BI.extend(jQuery.fn, {
* @private
*/
__textKeywordMarked__: function (text, keyword, py) {
if (!BI.isKey(keyword)) {
if (!BI.isKey(keyword) || (text + "").length > 100) {
return this.text((text + "").replaceAll(" ", " "));
}
keyword = keyword + "";
@ -16788,7 +16827,7 @@ BI.extend(BI.DOM, {
},
isColor: function (color) {
return this.isRGBColor(color) || this.isHexColor(color);
return color && (this.isRGBColor(color) || this.isHexColor(color));
},
isRGBColor: function (color) {
@ -16806,12 +16845,12 @@ BI.extend(BI.DOM, {
},
isDarkColor: function (hex) {
if (!hex) {
if (!hex || !this.isHexColor(hex)) {
return false;
}
var rgb = this.rgb2json(this.hex2rgb(hex));
var grayLevel = Math.round(rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114);
if (grayLevel < 140) {
if (grayLevel < 192/**网上给的是140**/) {
return true;
}
return false;
@ -16819,7 +16858,7 @@ BI.extend(BI.DOM, {
//获取对比颜色
getContrastColor: function (color) {
if (!color) {
if (!color || !this.isColor(color)) {
return "";
}
if (this.isDarkColor(color)) {
@ -16846,6 +16885,9 @@ BI.extend(BI.DOM, {
if (!rgbColour) {
return {};
}
if (!this.isRGBColor(rgbColour)) {
return {};
}
var rgbValues = rgbColour.match(/\d+(\.\d+)?/g);
return {
r: BI.parseInt(rgbValues[0]),
@ -16891,6 +16933,9 @@ BI.extend(BI.DOM, {
if (!color) {
return "";
}
if (!this.isHexColor(color)) {
return color;
}
var tempValue = "rgb(", colorArray;
if (color.length === 7) {
@ -17499,4 +17544,8 @@ $(function () {
return ob;
}
});
//IE8下滚动条用原生的
if (BI.isIE9Below()) {
BI.GridTableScrollbar.SIZE = 18;
}
});

124
bi/widget.css

@ -1,7 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-arrangement .arrangement-helper {
@ -40,9 +36,6 @@
z-index: 1000000001;
background: #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-arrangement-droppable {
z-index: 100000;
}
@ -112,10 +105,6 @@
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-date-trigger {
@ -123,19 +112,11 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-down-list-popup .bi-down-list-item .list-item-text {
max-width: 203px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-excel-table > div.bottom-right > div > div > table {
@ -144,22 +125,13 @@
.bi-theme-dark .bi-excel-table > div.bottom-right > div > div > table {
border-right: 1px solid #525466;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-excel-table-header-cell {
font-weight: bold;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-file-manager-nav-button .file-manager-nav-button-text {
@ -176,10 +148,6 @@
background-color: #191b2b;
color: #999999;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-fine-tuning-number-editor {
@ -187,9 +155,6 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-interactive-arrangement .interactive-arrangement-dragtag-line {
z-index: 1000000000;
background-color: #f07d0a;
@ -197,13 +162,8 @@
.bi-interactive-arrangement .interactive-arrangement-dragtag-icon {
z-index: 1000000000;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-month-trigger {
@ -211,25 +171,14 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-select-check-pane .multi-select-check-selected {
text-decoration: underline;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-select-combo .multi-select-trigger-icon-button {
font-size: 16px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-select-trigger {
@ -237,56 +186,31 @@
-moz-border-radius: 2px 2px 2px 2px;
border-radius: 2px 2px 2px 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-select-search-pane .multi-select-toolbar {
color: #e85050;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-select-check-selected-button {
z-index: 1;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-tree-check-pane .multi-tree-check-selected {
color: #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-tree-combo .multi-select-trigger-icon-button {
font-size: 16px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-tree-popup .popup-view-tree {
min-height: 170px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-tree-check-selected-button .trigger-check-selected {
color: #3f8ce8;
z-index: 1;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-numerical-interval .numerical-interval-small-editor {
@ -330,10 +254,6 @@
.bi-numerical-interval.number-error .bi-input {
color: #e85050;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-page-table-cell {
@ -344,32 +264,19 @@
-o-user-select: initial;
user-select: initial;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-path-chooser .path-chooser-radio {
z-index: 1;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-path-region .path-region-label {
z-index: 1;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-preview-table-cell {
min-height: 25px;
min-width: 80px;
max-width: 220px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-preview-table {
-webkit-user-select: initial;
-khtml-user-select: initial;
@ -386,22 +293,14 @@
.bi-theme-dark .bi-preview-table > div > div > div > table > thead > tr.odd {
background-color: #191b2b;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-preview-table-header-cell {
font-weight: bold;
min-height: 25px;
min-width: 80px;
max-width: 220px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-quarter-trigger {
@ -409,10 +308,6 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-relation-view-region .relation-view-region-container {
@ -424,9 +319,6 @@
.bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-sequence-table-dynamic-number .sequence-table-title-cell {
overflow: hidden;
overflow-x: hidden;
@ -450,9 +342,6 @@
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-sequence-table-list-number .sequence-table-title-cell {
overflow: hidden;
overflow-x: hidden;
@ -476,10 +365,6 @@
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-sequence-table-tree-number .sequence-table-title-cell {
@ -505,18 +390,12 @@
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-year-popup .year-popup-navigation {
line-height: 30px;
color: #3f8ce8;
}
.bi-year-popup .year-popup-navigation > .center-element {
border-left: 1px solid #d4dadd;
@ -530,9 +409,6 @@
.bi-theme-dark .bi-year-popup .year-popup-navigation > .first-element {
border-left: none;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-year-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;

3097
bi/widget.js

File diff suppressed because it is too large Load Diff

3
demo/css/face.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.demo-face .face-config .config-label {
font-size: 14px;
}

3
demo/css/index.css

@ -1,3 +0,0 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/

5
demo/css/main.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.layout-bg-white {
background-color: #ffffff;
}
@ -45,6 +42,6 @@
body {
background-color: #eff1f4;
}
body.bi-theme-dark {
.bi-theme-dark body {
background-color: #191B2B;
}

3
demo/css/north.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.demo-north {
background-color: #3c8dbc;
}

3
demo/css/preview.css

@ -1,3 +0,0 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/

3
demo/css/west.css

@ -1,3 +0,0 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/

2
demo/js/base/button/demo.icon_button.js

@ -7,7 +7,7 @@ Demo.Button = BI.inherit(BI.Widget, {
{
el: {
type: 'bi.icon_button',
cls: "rename-font",
cls: "close-ha-font",
width: 20,
height: 20
}

215
demo/js/component/demo.multilayerselecttree.leveltree.js

@ -0,0 +1,215 @@
/**
* guy
* 二级树
* @class BI.PlatformLevelTree
* @extends BI.Select
*/
BI.PlatformLevelTree = BI.inherit(BI.Widget, {
props: {
baseCls: "platform-level-tree",
itemsCreator: BI.emptyFn
},
render: function () {
var self = this, o = this.options;
this.tree = BI.createWidget({
type: "bi.custom_tree",
element: this,
expander: {
type: "bi.select_tree_expander",
isDefaultInit: false,
el: {},
popup: {
type: "bi.custom_tree"
}
},
itemsCreator: function (op, callback) {
o.itemsCreator(op, function (items) {
callback(self._formatItems(items))
})
},
el: {
type: "bi.loader",
next: false,
el: {
type: "bi.button_tree",
chooseType: 0,
layouts: [{
type: "bi.vertical"
}]
}
}
});
this.tree.on(BI.CustomTree.EVENT_CHANGE, function () {
self.fireEvent(BI.PlatformLevelTree.EVENT_CHANGE, arguments);
})
},
_formatItems: function (nodes) {
var self = this;
BI.each(nodes, function (i, node) {
var extend = {};
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
switch (i) {
case 0 :
extend.type = "bi.multilayer_select_tree_first_plus_group_node";
break;
case nodes.length - 1 :
extend.type = "bi.multilayer_select_tree_last_plus_group_node";
break;
default :
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
break;
}
BI.defaults(node, extend);
} else {
switch (i) {
case nodes.length - 1:
extend.type = "bi.multilayer_single_tree_last_tree_leaf_item";
break;
default :
extend.type = "bi.multilayer_single_tree_mid_tree_leaf_item";
}
BI.defaults(node, extend);
}
});
return nodes;
},
populate: function () {
this.tree.populate();
},
getValue: function () {
return this.tree.getValue();
}
});
BI.PlatformLevelTree.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.platform_level_tree", BI.PlatformLevelTree);
BI.DemoLevelTree = BI.inherit(BI.Widget, {
render: function () {
var self = this;
return {
type: "bi.vtape",
items: [{
el: {
type: "bi.platform_level_tree",
ref: function () {
self.tree = this;
},
itemsCreator: function (op, callback) {
if (!op.node) {//根节点
callback([{
"id": 1,
"pId": 0,
text: "A",
value: 1,
isParent: true
}, {
"id": 2,
"pId": 0,
"text": "B",
value: 2,
isParent: true,
open: true,
}])
} else {
if (op.node.id == 1) {
callback([
{
"id": 11,
"pId": 1,
"text": "test11",
value: 11,
layer: 1,
isParent: true
},
{
"id": 12,
"pId": 1,
"text": "test12",
value: 12,
layer: 1,
},
{
"id": 13,
"pId": 1,
"text": "test13",
value: 13,
layer: 1,
},
{
"id": 14,
"pId": 1,
"text": "test14",
value: 14,
layer: 1,
height: 35
},
{
"id": 15,
"pId": 1,
"text": "test15",
value: 15,
layer: 1,
},
{
"id": 16,
"pId": 1,
"text": "test16",
value: 16,
layer: 1,
},
{"id": 17, "pId": 1, "text": "test17", layer: 1, value: 17}
])
} else if (op.node.id == 2) {
callback([{
"id": 21,
"pId": 2,
"text": "test21",
value: 21,
layer: 1,
},
{
"id": 22,
"pId": 2,
"text": "test22",
value: 22,
layer: 1,
}])
} else if (op.node.id == 11) {
callback([{
"id": 111,
"pId": 11,
"text": "test111",
value: 111,
layer: 2,
}])
}
}
}
}
}, {
el: {
type: "bi.button",
text: "确定",
handler: function () {
BI.Msg.toast(JSON.stringify(self.tree.getValue()));
}
},
height: 25
}]
}
},
mounted: function () {
}
});
BI.shortcut("demo.platform_level_tree", BI.DemoLevelTree);

4
demo/js/config/component.js

@ -20,4 +20,8 @@ Demo.COMPONENT_CONFIG = [{
pId: 5,
text: "bi.tree_value_chooser_pane",
value: "demo.tree_value_chooser_pane"
}, {
pId: 5,
text: "平台用",
value: "demo.platform_level_tree"
}];

16
demo/js/config/core.js

@ -7,27 +7,27 @@ Demo.CORE_CONFIG = [{
text: "布局"
}, {
pId: 101,
text: "bi.center_adapt",
text: "自适应居中bi.center_adapt",
value: "demo.center_adapt"
}, {
pId: 101,
text: "bi.vertical_adapt",
text: "自适应垂直居中bi.vertical_adapt",
value: "demo.vertical_adapt"
}, {
pId: 101,
text: "bi.horizontal_adapt",
text: "自适应水平居中bi.horizontal_adapt",
value: "demo.horizontal_adapt"
}, {
pId: 101,
text: "bi.horizontal_auto",
text: "margin-auto自适应水平居中bi.horizontal_auto",
value: "demo.horizontal_auto"
}, {
pId: 101,
text: "bi.horizontal_float",
text: "float水平居中bi.horizontal_float",
value: "demo.horizontal_float"
}, {
pId: 101,
text: "bi.left_right_vertical_adapt",
text: "左右垂直居中bi.left_right_vertical_adapt",
value: "demo.left_right_vertical_adapt"
}, {
pId: 101,
@ -39,11 +39,11 @@ Demo.CORE_CONFIG = [{
value: "demo.float_center"
}, {
pId: 101,
text: "bi.vertical",
text: "垂直流式bi.vertical",
value: "demo.vertical"
}, {
pId: 101,
text: "bi.horizontal",
text: "水平流式bi.horizontal",
value: "demo.horizontal"
}, {
pId: 101,

4
demo/js/config/widget.js

@ -41,4 +41,8 @@ Demo.WIDGET_CONFIG = [{
pId: 4,
text: "bi.relation_view",
value: "demo.relation_view"
}, {
pId: 4,
text: "bi.interactive_arrangement",
value: "demo.interactive_arrangement"
}];

4
demo/js/north.js

@ -28,13 +28,13 @@ Demo.North = BI.inherit(BI.Widget, {
type: "bi.text_button",
text: "星空蓝",
handler: function () {
$("body").removeClass("bi-theme-default").addClass("bi-theme-dark");
$("html").removeClass("bi-theme-default").addClass("bi-theme-dark");
}
}, {
type: "bi.text_button",
text: "典雅白",
handler: function () {
$("body").removeClass("bi-theme-dark").addClass("bi-theme-default");
$("html").removeClass("bi-theme-dark").addClass("bi-theme-default");
}
}]
}

13
demo/js/widget/demo.interactivearrangement.js

@ -0,0 +1,13 @@
/**
* Created by User on 2017/3/22.
*/
Demo.RelationView = BI.inherit(BI.Widget, {
props: {
},
render: function () {
return {
type: "bi.interactive_arrangement",
};
}
});
BI.shortcut("demo.interactive_arrangement", Demo.RelationView);

2
demo/js/widget/demo.multiselectcombo.js

@ -35,7 +35,7 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
_itemsCreator: function (options, callback) {
var self = this;
var items = Demo.MULTI_COMBO_ITEMS;
var items = Demo.CONSTANTS.ITEMS;
var keywords = (options.keywords || []).slice();
if (options.keyword) {
keywords.push(options.keyword);

2
demo/less/main.less

@ -58,6 +58,6 @@ body {
background-color: @color-bi-background-normal;
}
body.bi-theme-dark {
.bi-theme-dark body {
background-color: @color-bi-background-normal-theme-dark;
}

9
demo/version.js

@ -2,10 +2,11 @@ Demo = {
version: 1.0
};
BI.i18n = {
"BI-Basic_OK": "确定"
};
BI.servletURL = "";
BI.resourceURL = "resource/";
BI.i18n = {};
BI.i18n = {
"BI-Basic_OK": "确定",
"BI-Basic_Sure": "确定",
"BI-Basic_Clears": "清空"
};

162
docs/base.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-chooser-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
@ -9,18 +6,12 @@
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-picker-button .color-picker-button-mask {
border: 1px solid #1a1a1a;
}
.bi-theme-dark .bi-color-picker-button .color-picker-button-mask {
border: 1px solid #ffffff;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-picker-editor .color-picker-editor-display {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
@ -29,9 +20,6 @@
-webkit-box-shadow: 0px 0px 2px 1px #d4dadd inset;
-moz-box-shadow: 0px 0px 2px 1px #d4dadd inset;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important;
}
@ -67,26 +55,16 @@
border-right: 6px solid transparent;
border-bottom: 6px solid #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble-popup-view {
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-adapt-editor .adapt-editor-text {
font-size: 14px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/
.bi-search-editor .close-font {
font-size: 20px;
@ -94,9 +72,6 @@
.bi-search-editor .search-font {
font-size: 20px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/
.bi-small-search-editor .bi-editor {
font-size: 12px;
@ -113,15 +88,9 @@
.bi-small-search-editor .search-font {
font-size: 18px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-sign-initial-editor .sign-initial-editor-text {
font-size: 14px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/* BASICS */
.CodeMirror {
/* Set height, width, borders, and global font properties here */
@ -129,12 +98,6 @@
cursor: text;
width: 100%;
height: 100%;
color: #1a1a1a;
background-color: #ffffff;
}
.bi-theme-dark .CodeMirror {
color: #ffffff;
background-color: #242640;
}
/* PADDING */
.CodeMirror-lines {
@ -461,13 +424,18 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: 2em;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
-webkit-tap-highlight-color: transparent;
}
.codemirror-high-line-height {
line-height: 2;
}
.codemirror-low-line-height {
line-height: 1.4;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
@ -599,9 +567,6 @@ li.CodeMirror-hint-active {
background: #08f;
color: white;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-message-title {
font-size: 16px;
cursor: pointer;
@ -621,16 +586,10 @@ li.CodeMirror-hint-active {
.bi-message-close {
font-size: 25px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-list-view .bi-button-mask {
opacity: 0.1;
filter: alpha(opacity=10);
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-panel {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
@ -640,36 +599,23 @@ li.CodeMirror-hint-active {
cursor: text;
font-size: 14px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-all-count-pager .all-pager-prev {
font-size: 16px;
}
.bi-all-count-pager .all-pager-next {
font-size: 16px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-pager .page-item {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-direction-pager .direction-pager-prev {
font-size: 16px;
}
.bi-direction-pager .direction-pager-next {
font-size: 16px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-segment > .center-element {
@ -704,10 +650,6 @@ li.CodeMirror-hint-active {
.bi-theme-dark .bi-segment > .first-element {
border-left: 1px solid #242640;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-button {
@ -861,59 +803,35 @@ li.CodeMirror-hint-active {
filter: alpha(opacity=20);
background-color: #1a1a1a;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-single-select-icon-text-item:active .b-font:before,
.bi-single-select-icon-text-item.active .b-font:before {
color: #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-editor {
font-size: 12px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multifile-editor .multifile-editor {
text-align: right;
cursor: pointer;
font-size: 100px;
z-index: 2;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-shelter-editor .shelter-editor-text {
font-size: 12px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-sign-editor .sign-editor-text {
font-size: 12px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-textarea-editor {
@ -927,17 +845,11 @@ li.CodeMirror-hint-active {
.bi-textarea-editor .textarea-editor-content {
border: none;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-file {
opacity: 0;
filter: alpha(opacity=0);
z-index: 2;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-input {
border: none;
outline: none;
@ -954,10 +866,6 @@ li.CodeMirror-hint-active {
border: none;
color: #e85050 !important;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-text {
@ -967,9 +875,6 @@ li.CodeMirror-hint-active {
white-space: nowrap;
word-break: break-word;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble {
font-size: 14px;
}
@ -980,15 +885,9 @@ li.CodeMirror-hint-active {
background: #fddddd;
color: #e85050;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-tip {
position: fixed !important;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-toast {
font-size: 14px;
-webkit-border-radius: 2px;
@ -1003,9 +902,6 @@ li.CodeMirror-hint-active {
background: #fddddd;
color: #e85050;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-tooltip {
max-width: 250px;
-webkit-border-radius: 2px;
@ -1023,9 +919,6 @@ li.CodeMirror-hint-active {
color: #e85050;
border: 1px solid #f4cbcb;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-collection-table-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
@ -1048,17 +941,11 @@ li.CodeMirror-hint-active {
.bi-theme-dark .bi-collection-table-cell.first-col {
border-left: 1px solid #525466;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-quick-collection-table > div > .bi-collection {
overflow: hidden !important;
overflow-x: hidden !important;
overflow-y: hidden !important;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-table > .first-col {
border-left: none;
}
@ -1137,9 +1024,6 @@ li.CodeMirror-hint-active {
border-top: 1px solid #525466;
border-left: 1px solid #525466;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-grid-table-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
@ -1162,9 +1046,6 @@ li.CodeMirror-hint-active {
.bi-theme-dark .bi-grid-table-cell.first-col {
border-left: 1px solid #525466;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.scrollbar-layout-main {
box-sizing: border-box;
outline: none;
@ -1278,9 +1159,6 @@ li.CodeMirror-hint-active {
bottom: 0;
position: absolute;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-resizable-table-cell .resizable-table-cell-resizer-container {
cursor: ew-resize;
z-index: 1;
@ -1289,14 +1167,17 @@ li.CodeMirror-hint-active {
.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob {
background-color: #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob {
background-color: #58cc7d;
}
.bi-resizable-table .resizable-table-resizer {
cursor: ew-resize;
z-index: 1;
background-color: #3f8ce8;
}
.bi-resizable-table .resizable-table-resizer.suitable {
background-color: #58cc7d;
}
.bi-resizable-table .resizable-table-region-resizer {
cursor: ew-resize;
z-index: 1;
@ -1305,28 +1186,16 @@ li.CodeMirror-hint-active {
.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob {
background-color: #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-branch-tree .bi-branch-tree-view {
min-width: 300px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-trigger .bi-trigger-icon-button {
font-size: 16px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-select-text-trigger {
@ -1334,18 +1203,11 @@ li.CodeMirror-hint-active {
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-small-select-text-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/**********BI.BIListView*************/

427
docs/base.js

File diff suppressed because it is too large Load Diff

124
docs/case.js

@ -1477,6 +1477,7 @@ BI.MultiLayerIconTreeLeafItem = BI.inherit(BI.BasicButton, {
var self = this, o = this.options;
this.item = BI.createWidget({
type: "bi.icon_tree_leaf_item",
cls: "bi-list-item-none",
iconCls: o.iconCls,
id: o.id,
pId: o.pId,
@ -1820,6 +1821,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
var conf = BI.YearCalendar.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-year-calendar",
behaviors: {},
logic: {
dynamic: false
},
@ -1884,6 +1886,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
this.years = BI.createWidget({
type: "bi.button_group",
behaviors: o.behaviors,
items: BI.createItems(items, {}),
layouts: [BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, {
columns: 2,
@ -3938,7 +3941,7 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger bi-card",
baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger",
height: 30
})
},
@ -3946,7 +3949,8 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, {
_init: function () {
BI.ColorChooserTrigger.superclass._init.apply(this, arguments);
this.colorContainer = BI.createWidget({
type: "bi.layout"
type: "bi.layout",
cls: "bi-card color-chooser-trigger-content"
});
var down = BI.createWidget({
@ -3979,7 +3983,13 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, {
setValue: function (color) {
BI.ColorChooserTrigger.superclass.setValue.apply(this, arguments);
this.colorContainer.element.css("background-color", color);
if (color === "") {
this.colorContainer.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-background");
} else if (color === "transparent") {
this.colorContainer.element.css("background-color", "").removeClass("auto-color-background").addClass("trans-color-background")
} else {
this.colorContainer.element.css({"background-color": color}).removeClass("auto-color-background").removeClass("trans-color-background");
}
}
});
BI.ColorChooserTrigger.EVENT_CHANGE = "ColorChooserTrigger.EVENT_CHANGE";
@ -4272,7 +4282,7 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
errorText: BI.i18nText("BI-Color_Picker_Error_Text"),
allowBlank: true,
value: 255,
width: 35,
width: 32,
height: 20
});
BI.each(Ws, function (i, w) {
@ -4288,7 +4298,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.B = Ws[2];
this.none = BI.createWidget({
type: "bi.checkbox"
type: "bi.checkbox",
title: BI.i18nText("BI-Basic_Auto")
});
this.none.on(BI.Checkbox.EVENT_CHANGE, function () {
if (this.isSelected()) {
@ -4303,6 +4314,23 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
}
});
this.transparent = BI.createWidget({
type: "bi.checkbox",
title: BI.i18nText("BI-Transparent_Color")
});
this.transparent.on(BI.Checkbox.EVENT_CHANGE, function () {
if (this.isSelected()) {
self.lastColor = self.getValue();
self.setValue("transparent");
} else {
self.setValue(self.lastColor || "#000000");
}
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {
self.colorShow.element.css("background-color", self.getValue());
self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE);
}
});
BI.createWidget({
type: "bi.htape",
element: this,
@ -4312,21 +4340,21 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
}, {
el: RGB[0],
lgap: 10,
width: 20
width: 16
}, {
el: this.R,
width: 32
}, {
el: RGB[1],
lgap: 10,
width: 20
width: 16
}, {
el: this.G,
width: 32
}, {
el: RGB[2],
lgap: 10,
width: 20
width: 16
}, {
el: this.B,
width: 32
@ -4335,18 +4363,33 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
type: "bi.center_adapt",
items: [this.none]
},
width: 20
width: 18
}, {
el: {
type: "bi.center_adapt",
items: [this.transparent]
},
width: 18
}]
})
},
setValue: function (color) {
if (color === "transparent") {
this.transparent.setSelected(true);
this.none.setSelected(false);
this.R.setValue("");
this.G.setValue("");
this.B.setValue("");
return;
}
if (!color) {
color = "";
this.none.setSelected(true);
} else {
this.none.setSelected(false);
}
this.transparent.setSelected(false);
this.colorShow.element.css("background-color", color);
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));
this.R.setValue(BI.isNull(json.r) ? "" : json.r);
@ -4355,6 +4398,9 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
},
getValue: function () {
if (this.transparent.isSelected()) {
return "transparent";
}
return BI.DOM.rgb2hex(BI.DOM.json2rgb({
r: this.R.getValue(),
g: this.G.getValue(),
@ -4875,6 +4921,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
default:
break;
}
this.triangle && this.triangle.destroy();
this.triangle = BI.createWidget(op, {
type: "bi.center_adapt",
cls: "button-combo-triangle-wrapper",
@ -4935,6 +4982,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
this.combo.getView() && this.combo.getView().hideLine();
},
@ -4947,10 +4995,6 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
this.combo && this.combo.showView();
},
hasView: function () {
return BI.isNotNull(this.combo.getView());
},
isViewVisible: function () {
return this.combo.isViewVisible();
}
@ -8360,10 +8404,6 @@ BI.ListPane = BI.inherit(BI.Pane, {
this.button_group.empty();
},
doBehavior: function () {
this.button_group.doBehavior.apply(this.button_group, arguments);
},
setNotSelectedValue: function () {
this.button_group.setNotSelectedValue.apply(this.button_group, arguments);
},
@ -8653,10 +8693,6 @@ BI.SelectList = BI.inherit(BI.Widget, {
this.list.element.css({"max-height": h - toolHeight + "px"})
},
doBehavior: function () {
this.list.doBehavior.apply(this.list, arguments);
},
setNotSelectedValue: function () {
this.list.setNotSelectedValue.apply(this.list, arguments);
this._checkAllSelected();
@ -8751,10 +8787,6 @@ BI.LazyLoader = BI.inherit(BI.Widget, {
this.loader.empty();
},
doBehavior: function () {
this.loader.doBehavior();
},
setNotSelectedValue: function () {
this.loader.setNotSelectedValue.apply(this.loader, arguments);
},
@ -8950,10 +8982,6 @@ BI.ListLoader = BI.inherit(BI.Widget, {
});
},
doBehavior: function () {
this.button_group.doBehavior.apply(this.button_group, arguments);
},
setNotSelectedValue: function () {
this.button_group.setNotSelectedValue.apply(this.button_group, arguments);
},
@ -9115,6 +9143,9 @@ BI.SortList = BI.inherit(BI.Widget, {
},
populate: function (items) {
if (items) {
arguments[0] = this._formatItems(items);
}
this.loader.populate.apply(this.loader, arguments);
},
@ -9122,10 +9153,6 @@ BI.SortList = BI.inherit(BI.Widget, {
this.loader.empty();
},
doBehavior: function () {
this.loader.doBehavior.apply(this.loader, arguments);
},
setNotSelectedValue: function () {
this.loader.setNotSelectedValue.apply(this.loader, arguments);
},
@ -9203,9 +9230,10 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
vgap: 0,
value: o.curr,
errorText: BI.i18nText("BI-Please_Input_Positive_Integer"),
width: 30,
width: 35,
height: 20
});
this.pager = BI.createWidget({
type: "bi.pager",
width: 36,
@ -9291,7 +9319,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
BI.createWidget({
type: "bi.center_adapt",
element: this,
columnSize: ["", 30, 40, 36],
columnSize: ["", 35, 40, 36],
items: [count, this.editor, this.allPages, this.pager]
})
},
@ -9914,17 +9942,17 @@ BI.shortcut("bi.detail_pager", BI.DetailPager);/**
*/
BI.SegmentButton = BI.inherit(BI.BasicButton, {
_defaultConfig: function() {
_defaultConfig: function () {
var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend( conf, {
baseCls : (conf.baseCls ||"")+' bi-segment-button bi-list-item-active',
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + ' bi-segment-button bi-list-item-active',
shadow: true,
readonly: true,
hgap: 10
hgap: 5
})
},
_init:function() {
_init: function () {
BI.SegmentButton.superclass._init.apply(this, arguments);
var opts = this.options, self = this;
//if (BI.isNumber(opts.height) && BI.isNull(opts.lineHeight)) {
@ -9933,7 +9961,7 @@ BI.SegmentButton = BI.inherit(BI.BasicButton, {
this.text = BI.createWidget({
type: "bi.label",
element: this,
height: opts.height-2,
height: opts.height - 2,
whiteSpace: opts.whiteSpace,
text: opts.text,
value: opts.value,
@ -9941,16 +9969,16 @@ BI.SegmentButton = BI.inherit(BI.BasicButton, {
})
},
setSelected: function(){
setSelected: function () {
BI.SegmentButton.superclass.setSelected.apply(this, arguments);
},
setText : function(text) {
setText: function (text) {
BI.SegmentButton.superclass.setText.apply(this, arguments);
this.text.setText(text);
},
destroy : function() {
destroy: function () {
BI.SegmentButton.superclass.destroy.apply(this, arguments);
}
});
@ -10395,7 +10423,7 @@ BI.DynamicSummaryLayerTreeTable = BI.inherit(BI.Widget, {
_recomputeColumnSize: function () {
var o = this.options;
o.regionColumnSize = this.table.getRegionColumnSize();
var columnSize = this.table.getColumnSize();
var columnSize = this.table.getColumnSize().slice();
if (o.freezeCols.length > 1) {
for (var i = 0; i < o.freezeCols.length - 1; i++) {
columnSize.splice(1, 0, 0);
@ -12126,10 +12154,6 @@ BI.LevelTree = BI.inherit(BI.Widget, {
this.tree.populate(items);
},
doBehavior: function () {
this.tree.doBehavior.apply(this.tree, arguments);
},
setValue: function (v) {
this.tree.setValue(v);
},
@ -12330,6 +12354,7 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
}, {
el: {
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: o.triggerWidth
},
width: o.triggerWidth
@ -12411,6 +12436,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: c.triggerWidth
});

730
docs/core.css

File diff suppressed because it is too large Load Diff

139
docs/core.js

@ -14362,6 +14362,8 @@ BI.Widget = BI.inherit(BI.OB, {
update: function () {
},
beforeDestroyed: null,
destroyed: null,
_init: function () {
@ -14523,7 +14525,7 @@ BI.Widget = BI.inherit(BI.OB, {
}
//递归将所有子组件使能
BI.each(this._children, function (i, child) {
child._setEnable && child._setEnable(enable);
!child._manualSetEnable && child._setEnable && child._setEnable(enable);
});
},
@ -14535,7 +14537,7 @@ BI.Widget = BI.inherit(BI.OB, {
}
//递归将所有子组件使有效
BI.each(this._children, function (i, child) {
child._setValid && child._setValid(valid);
!child._manualSetValid && child._setValid && child._setValid(valid);
});
},
@ -14548,6 +14550,7 @@ BI.Widget = BI.inherit(BI.OB, {
},
setEnable: function (enable) {
this._manualSetEnable = true;
this._setEnable(enable);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
@ -14569,7 +14572,7 @@ BI.Widget = BI.inherit(BI.OB, {
},
setValid: function (valid) {
this.options.invalid = !valid;
this._manualSetValid = true;
this._setValid(valid);
if (valid === true) {
this.element.removeClass("base-invalid invalid");
@ -14578,6 +14581,14 @@ BI.Widget = BI.inherit(BI.OB, {
}
},
doBehavior: function () {
var args = arguments;
//递归将所有子组件使有效
BI.each(this._children, function (i, child) {
child.doBehavior && child.doBehavior.apply(child, args);
});
},
getWidth: function () {
return this.options.width;
},
@ -14712,18 +14723,20 @@ BI.Widget = BI.inherit(BI.OB, {
},
__d: function () {
this.beforeDestroyed && this.beforeDestroyed();
BI.each(this._children, function (i, widget) {
widget._unMount && widget._unMount();
});
this._children = {};
this._parent = null;
this._isMounted = false;
this.destroyed && this.destroyed();
},
_unMount: function () {
this.__d();
this.fireEvent(BI.Events.UNMOUNT);
this.purgeListeners();
this.destroyed && this.destroyed();
},
isolate: function () {
@ -14743,14 +14756,12 @@ BI.Widget = BI.inherit(BI.OB, {
_destroy: function () {
this.__d();
this.destroyed && this.destroyed();
this.element.destroy();
this.purgeListeners();
},
destroy: function () {
this.__d();
this.destroyed && this.destroyed();
this.element.destroy();
this.fireEvent(BI.Events.DESTROY);
this.purgeListeners();
@ -14960,6 +14971,10 @@ BI.Widget = BI.inherit(BI.OB, {
var copy = BI.UUID(), newKeys = BI.clone(keys);
keys.length > 1 ? newKeys.unshift(BI.deepClone(p[keys[keys.length - 1]])) : newKeys.unshift(BI.deepClone(g));
var backup = self.similar.apply(self, newKeys);
if (BI.isKey(backup.id)) {
copy = backup.id;
delete backup.id;
}
keys.length > 1 ? (p[copy] = backup, self[sset](keys[0], g, {silent: true})) : self[sset](copy, backup, {silent: true});
keys.unshift(copy);
!BI.has(self._tmp, keys[0]) && self.parent && self.parent._change(self);
@ -15246,6 +15261,8 @@ BI.View = BI.inherit(BI.V, {
created: null,
beforeDestroyed: null,
destroyed: null,
_init: function () {
@ -15735,18 +15752,22 @@ BI.View = BI.inherit(BI.V, {
},
_unMount: function () {
this.beforeDestroyed && this.beforeDestroyed();
BI.each(this._cardLayouts, function (name, card) {
card && card._unMount();
});
delete this._cardLayouts;
delete this._cards;
this.destroyed && this.destroyed();
this.trigger(BI.Events.UNMOUNT);
this.off();
},
_destroy: function () {
var self = this;
BI.each(this._cardLayouts, function (name, card) {
card && card._unMount();
BI.Layers.remove(name + self.cid);
});
delete this._cardLayouts;
delete this._cards;
@ -16824,10 +16845,10 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
_window = this
}
var attachEvent = typeof document !== 'undefined' && document.attachEvent;
var addEventListener = typeof document !== 'undefined' && document.addEventListener;
var stylesCreated = false;
if (!attachEvent) {
if (addEventListener) {
var requestFrame = (function () {
var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame ||
function (fn) {
@ -16934,8 +16955,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
}
var addResizeListener = function (element, fn) {
if (attachEvent) element.attachEvent('onresize', fn);
else {
if (addEventListener){
if (!element.__resizeTriggers__) {
if (getComputedStyle(element).position === 'static') element.style.position = 'relative';
createStyles();
@ -16955,17 +16975,21 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
});
}
element.__resizeListeners__.push(fn);
} else {
element.attachEvent('onresize', fn);
}
};
var removeResizeListener = function (element, fn) {
if (attachEvent) element.detachEvent('onresize', fn);
else {
if (addEventListener) {
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
if (!element.__resizeListeners__.length) {
element.removeEventListener('scroll', scrollListener, true);
element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
}
} else {
element.detachEvent('onresize', fn);
}
};
@ -20123,7 +20147,7 @@ BI.PopoverSection.EVENT_CLOSE = "EVENT_CLOSE";;(function () {
if (numReg) {
var num = numReg[0];
var orilen = num.length;
var newnum = BI.parseInt(num) + 1 + '';
var newnum = parseInt(num) + 1 + '';
//进位到整数部分
if (newnum.length > orilen) {
newnum = newnum.substr(1);
@ -20619,27 +20643,35 @@ BI.PopoverSection.EVENT_CLOSE = "EVENT_CLOSE";;(function () {
* @extends BI.Behavior
*/
BI.HighlightBehavior = BI.inherit(BI.Behavior, {
_defaultConfig: function() {
return BI.extend(BI.HighlightBehavior.superclass._defaultConfig.apply(this, arguments), {
});
_defaultConfig: function () {
return BI.extend(BI.HighlightBehavior.superclass._defaultConfig.apply(this, arguments), {});
},
_init : function() {
_init: function () {
BI.HighlightBehavior.superclass._init.apply(this, arguments);
},
doBehavior: function(items){
doBehavior: function (items) {
var args = Array.prototype.slice.call(arguments, 1),
o = this.options;
BI.each(items, function(i, item){
if(item instanceof BI.Single) {
if (o.rule(item.getValue(), item)) {
BI.each(items, function (i, item) {
if (item instanceof BI.Single) {
var rule = o.rule(item.getValue(), item);
function doBe(run) {
if (run === true) {
item.doHighLight.apply(item, args);
} else {
item.unHighLight.apply(item, args);
}
}
if (BI.isFunction(rule)) {
rule(doBe);
} else {
doBe(rule);
}
} else {
item.doBehavior.apply(item, args);
}
@ -21535,7 +21567,10 @@ BI.FloatBoxRouter = BI.inherit(BI.WRouter, {
var view = this.createView(url, data, viewData, context);
isValid && context.model.addChild(modelData, view.model);
view.listenTo(view.model, "destroy", function () {
self.remove(url);
self.remove(url, context);
});
context.on(BI.Events.UNMOUNT, function () {
self.remove(url, context);
});
this.store[url].populate(view);
this.views[url] = view;
@ -21544,19 +21579,7 @@ BI.FloatBoxRouter = BI.inherit(BI.WRouter, {
BI.nextTick(function () {
self.close(url);
// view.end();
var t = void 0, isNew = false, keys;
if (isValid) {
keys = modelData.split('.');
BI.each(keys, function (i, k) {
if (i === 0) {
t = context.model.get(k) || (isNew = true);
} else {
t = t[k] || (isNew = true);
}
})
}
isNew && context.model.removeChild(modelData);
!isNew && (context.listenEnd.apply(context, isValid ? keys : [modelData]) !== false) && context.populate();
(context.listenEnd.apply(context, isValid ? modelData.split('.') : [modelData]) !== false) && context.populate();
}, 30)
}).on("change:" + view.cid, _.bind(context.notifyParent, context))
}
@ -21574,7 +21597,7 @@ BI.FloatBoxRouter = BI.inherit(BI.WRouter, {
remove: function (url, context) {
url = context.rootURL + "/" + url;
if(this.controller){
if (this.controller) {
this.controller.remove(url);
delete this.store[url];
this.views[url] && this.views[url].model.destroy();
@ -21741,6 +21764,12 @@ _.extend(BI, {
*/
DESTROY: '_DESTROY',
/**
* @static
* @property 取消挂载事件
*/
UNMOUNT: '_UNMOUNT',
/**
* @static
* @property 清除选择
@ -22132,7 +22161,7 @@ BI.extend(jQuery.fn, {
* @private
*/
__textKeywordMarked__: function (text, keyword, py) {
if (!BI.isKey(keyword)) {
if (!BI.isKey(keyword) || (text + "").length > 100) {
return this.text((text + "").replaceAll(" ", " "));
}
keyword = keyword + "";
@ -22806,7 +22835,7 @@ BI.extend(BI.DOM, {
},
isColor: function (color) {
return this.isRGBColor(color) || this.isHexColor(color);
return color && (this.isRGBColor(color) || this.isHexColor(color));
},
isRGBColor: function (color) {
@ -22824,12 +22853,12 @@ BI.extend(BI.DOM, {
},
isDarkColor: function (hex) {
if (!hex) {
if (!hex || !this.isHexColor(hex)) {
return false;
}
var rgb = this.rgb2json(this.hex2rgb(hex));
var grayLevel = Math.round(rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114);
if (grayLevel < 140) {
if (grayLevel < 192/**网上给的是140**/) {
return true;
}
return false;
@ -22837,7 +22866,7 @@ BI.extend(BI.DOM, {
//获取对比颜色
getContrastColor: function (color) {
if (!color) {
if (!color || !this.isColor(color)) {
return "";
}
if (this.isDarkColor(color)) {
@ -22864,6 +22893,9 @@ BI.extend(BI.DOM, {
if (!rgbColour) {
return {};
}
if (!this.isRGBColor(rgbColour)) {
return {};
}
var rgbValues = rgbColour.match(/\d+(\.\d+)?/g);
return {
r: BI.parseInt(rgbValues[0]),
@ -22909,6 +22941,9 @@ BI.extend(BI.DOM, {
if (!color) {
return "";
}
if (!this.isHexColor(color)) {
return color;
}
var tempValue = "rgb(", colorArray;
if (color.length === 7) {
@ -24952,7 +24987,7 @@ _.extend(BI, {
Horizontal: "horizontal"
},
Selection: {
Default: -999,
Default: -2,
None: -1,
Single: 0,
Multi: 1,
@ -25731,15 +25766,20 @@ BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
},
mounted: function () {
var self = this;
var width = this.left.element.outerWidth(),
height = this.left.element.outerHeight();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.left]
});
this.removeWidget(this.container);
},
stroke: function (items) {
@ -25794,15 +25834,20 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
},
mounted: function () {
var self = this;
var width = this.left.element.width(),
height = this.left.element.height();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.horizontal_auto",
element: this,
items: [this.left]
});
this.removeWidget(this.container);
},
_addElement: function (i, item) {
@ -28641,4 +28686,8 @@ $(function () {
return ob;
}
});
//IE8下滚动条用原生的
if (BI.isIE9Below()) {
BI.GridTableScrollbar.SIZE = 18;
}
});

20
docs/demo.css

@ -1,15 +1,6 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.demo-face .face-config .config-label {
font-size: 14px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.layout-bg-white {
background-color: #ffffff;
}
@ -54,12 +45,9 @@
body {
background-color: #eff1f4;
}
body.bi-theme-dark {
.bi-theme-dark body {
background-color: #191B2B;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.demo-north {
background-color: #3c8dbc;
}
@ -70,9 +58,3 @@ body.bi-theme-dark {
font-size: 20px;
font-weight: 300;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/

269
docs/demo.js

@ -2,13 +2,14 @@ Demo = {
version: 1.0
};
BI.i18n = {
"BI-Basic_OK": "确定"
};
BI.servletURL = "";
BI.resourceURL = "resource/";
BI.i18n = {};$(function () {
BI.i18n = {
"BI-Basic_OK": "确定",
"BI-Basic_Sure": "确定",
"BI-Basic_Clears": "清空"
};$(function () {
var ref;
BI.createWidget({
type: "demo.main",
@ -222,7 +223,7 @@ BI.shortcut("demo.button", Demo.Button);Demo.Button = BI.inherit(BI.Widget, {
{
el: {
type: 'bi.icon_button',
cls: "rename-font",
cls: "close-ha-font",
width: 20,
height: 20
}
@ -2618,7 +2619,221 @@ BI.shortcut("demo.center", Demo.Center);Demo.Func = BI.inherit(BI.Widget, {
}
});
BI.shortcut("demo.axis_chart", Demo.Func);
Demo.TreeValueChooser = BI.inherit(BI.Widget, {
/**
* guy
* 二级树
* @class BI.PlatformLevelTree
* @extends BI.Select
*/
BI.PlatformLevelTree = BI.inherit(BI.Widget, {
props: {
baseCls: "platform-level-tree",
itemsCreator: BI.emptyFn
},
render: function () {
var self = this, o = this.options;
this.tree = BI.createWidget({
type: "bi.custom_tree",
element: this,
expander: {
type: "bi.select_tree_expander",
isDefaultInit: false,
el: {},
popup: {
type: "bi.custom_tree"
}
},
itemsCreator: function (op, callback) {
o.itemsCreator(op, function (items) {
callback(self._formatItems(items))
})
},
el: {
type: "bi.loader",
next: false,
el: {
type: "bi.button_tree",
chooseType: 0,
layouts: [{
type: "bi.vertical"
}]
}
}
});
this.tree.on(BI.CustomTree.EVENT_CHANGE, function () {
self.fireEvent(BI.PlatformLevelTree.EVENT_CHANGE, arguments);
})
},
_formatItems: function (nodes) {
var self = this;
BI.each(nodes, function (i, node) {
var extend = {};
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
switch (i) {
case 0 :
extend.type = "bi.multilayer_select_tree_first_plus_group_node";
break;
case nodes.length - 1 :
extend.type = "bi.multilayer_select_tree_last_plus_group_node";
break;
default :
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
break;
}
BI.defaults(node, extend);
} else {
switch (i) {
case nodes.length - 1:
extend.type = "bi.multilayer_single_tree_last_tree_leaf_item";
break;
default :
extend.type = "bi.multilayer_single_tree_mid_tree_leaf_item";
}
BI.defaults(node, extend);
}
});
return nodes;
},
populate: function () {
this.tree.populate();
},
getValue: function () {
return this.tree.getValue();
}
});
BI.PlatformLevelTree.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.platform_level_tree", BI.PlatformLevelTree);
BI.DemoLevelTree = BI.inherit(BI.Widget, {
render: function () {
var self = this;
return {
type: "bi.vtape",
items: [{
el: {
type: "bi.platform_level_tree",
ref: function () {
self.tree = this;
},
itemsCreator: function (op, callback) {
if (!op.node) {//根节点
callback([{
"id": 1,
"pId": 0,
text: "A",
value: 1,
isParent: true
}, {
"id": 2,
"pId": 0,
"text": "B",
value: 2,
isParent: true,
open: true,
}])
} else {
if (op.node.id == 1) {
callback([
{
"id": 11,
"pId": 1,
"text": "test11",
value: 11,
layer: 1,
isParent: true
},
{
"id": 12,
"pId": 1,
"text": "test12",
value: 12,
layer: 1,
},
{
"id": 13,
"pId": 1,
"text": "test13",
value: 13,
layer: 1,
},
{
"id": 14,
"pId": 1,
"text": "test14",
value: 14,
layer: 1,
height: 35
},
{
"id": 15,
"pId": 1,
"text": "test15",
value: 15,
layer: 1,
},
{
"id": 16,
"pId": 1,
"text": "test16",
value: 16,
layer: 1,
},
{"id": 17, "pId": 1, "text": "test17", layer: 1, value: 17}
])
} else if (op.node.id == 2) {
callback([{
"id": 21,
"pId": 2,
"text": "test21",
value: 21,
layer: 1,
},
{
"id": 22,
"pId": 2,
"text": "test22",
value: 22,
layer: 1,
}])
} else if (op.node.id == 11) {
callback([{
"id": 111,
"pId": 11,
"text": "test111",
value: 111,
layer: 2,
}])
}
}
}
}
}, {
el: {
type: "bi.button",
text: "确定",
handler: function () {
BI.Msg.toast(JSON.stringify(self.tree.getValue()));
}
},
height: 25
}]
}
},
mounted: function () {
}
});
BI.shortcut("demo.platform_level_tree", BI.DemoLevelTree);Demo.TreeValueChooser = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-tree-value-chooser-combo"
},
@ -2931,6 +3146,10 @@ Demo.COMPONENT_CONFIG = [{
pId: 5,
text: "bi.tree_value_chooser_pane",
value: "demo.tree_value_chooser_pane"
}, {
pId: 5,
text: "平台用",
value: "demo.platform_level_tree"
}];Demo.CORE_CONFIG = [{
id: 1,
text: "核心控件",
@ -2940,27 +3159,27 @@ Demo.COMPONENT_CONFIG = [{
text: "布局"
}, {
pId: 101,
text: "bi.center_adapt",
text: "自适应居中bi.center_adapt",
value: "demo.center_adapt"
}, {
pId: 101,
text: "bi.vertical_adapt",
text: "自适应垂直居中bi.vertical_adapt",
value: "demo.vertical_adapt"
}, {
pId: 101,
text: "bi.horizontal_adapt",
text: "自适应水平居中bi.horizontal_adapt",
value: "demo.horizontal_adapt"
}, {
pId: 101,
text: "bi.horizontal_auto",
text: "margin-auto自适应水平居中bi.horizontal_auto",
value: "demo.horizontal_auto"
}, {
pId: 101,
text: "bi.horizontal_float",
text: "float水平居中bi.horizontal_float",
value: "demo.horizontal_float"
}, {
pId: 101,
text: "bi.left_right_vertical_adapt",
text: "左右垂直居中bi.left_right_vertical_adapt",
value: "demo.left_right_vertical_adapt"
}, {
pId: 101,
@ -2972,11 +3191,11 @@ Demo.COMPONENT_CONFIG = [{
value: "demo.float_center"
}, {
pId: 101,
text: "bi.vertical",
text: "垂直流式bi.vertical",
value: "demo.vertical"
}, {
pId: 101,
text: "bi.horizontal",
text: "水平流式bi.horizontal",
value: "demo.horizontal"
}, {
pId: 101,
@ -3161,6 +3380,10 @@ Demo.COMPONENT_CONFIG = [{
pId: 4,
text: "bi.relation_view",
value: "demo.relation_view"
}, {
pId: 4,
text: "bi.interactive_arrangement",
value: "demo.interactive_arrangement"
}];Demo.Func = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-func"
@ -5585,13 +5808,13 @@ BI.shortcut("demo.main", Demo.Main);Demo.North = BI.inherit(BI.Widget, {
type: "bi.text_button",
text: "星空蓝",
handler: function () {
$("body").removeClass("bi-theme-default").addClass("bi-theme-dark");
$("html").removeClass("bi-theme-default").addClass("bi-theme-dark");
}
}, {
type: "bi.text_button",
text: "典雅白",
handler: function () {
$("body").removeClass("bi-theme-dark").addClass("bi-theme-default");
$("html").removeClass("bi-theme-dark").addClass("bi-theme-default");
}
}]
}
@ -5727,6 +5950,18 @@ Demo.West.EVENT_VALUE_CHANGE = "EVENT_VALUE_CHANGE";
BI.shortcut("demo.west", Demo.West);/**
* Created by User on 2017/3/22.
*/
Demo.RelationView = BI.inherit(BI.Widget, {
props: {
},
render: function () {
return {
type: "bi.interactive_arrangement",
};
}
});
BI.shortcut("demo.interactive_arrangement", Demo.RelationView);/**
* Created by User on 2017/3/22.
*/
Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-multi-select-combo"
@ -5761,7 +5996,7 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
_itemsCreator: function (options, callback) {
var self = this;
var items = Demo.MULTI_COMBO_ITEMS;
var items = Demo.CONSTANTS.ITEMS;
var keywords = (options.keywords || []).slice();
if (options.keyword) {
keywords.push(options.keyword);

24
docs/resource.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
html,
button,
input,
@ -125,8 +122,16 @@ textarea::-webkit-scrollbar-thumb:hover {
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='icon/loading.gif');
_background: none;
}
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.auto-color-background {
background: url('background/auto-color.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/auto-color.png');
_background: none;
}
.trans-color-background {
background: url('background/trans-color.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='background/trans-color.png');
_background: none;
}
@font-face {
font-family: 'bi';
src: url('font/iconfont.eot'), /* IE6-IE8 */ url('font/iconfont.woff') format('woff'), /* chrome、firefox */ url('font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('font/iconfont.svg#svgFontName') format('svg');
@ -1246,9 +1251,6 @@ textarea::-webkit-scrollbar-thumb:hover {
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.farbtastic {
position: relative;
}
@ -1283,9 +1285,6 @@ textarea::-webkit-scrollbar-thumb:hover {
overflow: hidden;
background: url("third/farbtastic/marker.png") no-repeat;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-display-tree .ztree * {
color: #999999;
}
@ -1321,9 +1320,6 @@ email: hunter.z@263.net
website: http://code.google.com/p/jquerytree/
-------------------------------------*/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.ztree * {
padding: 0;
margin: 0;

124
docs/widget.css

@ -1,7 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-arrangement .arrangement-helper {
@ -40,9 +36,6 @@
z-index: 1000000001;
background: #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-arrangement-droppable {
z-index: 100000;
}
@ -112,10 +105,6 @@
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-date-trigger {
@ -123,19 +112,11 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-down-list-popup .bi-down-list-item .list-item-text {
max-width: 203px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-excel-table > div.bottom-right > div > div > table {
@ -144,22 +125,13 @@
.bi-theme-dark .bi-excel-table > div.bottom-right > div > div > table {
border-right: 1px solid #525466;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-excel-table-header-cell {
font-weight: bold;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-file-manager-nav-button .file-manager-nav-button-text {
@ -176,10 +148,6 @@
background-color: #191b2b;
color: #999999;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-fine-tuning-number-editor {
@ -187,9 +155,6 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-interactive-arrangement .interactive-arrangement-dragtag-line {
z-index: 1000000000;
background-color: #f07d0a;
@ -197,13 +162,8 @@
.bi-interactive-arrangement .interactive-arrangement-dragtag-icon {
z-index: 1000000000;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-month-trigger {
@ -211,25 +171,14 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-select-check-pane .multi-select-check-selected {
text-decoration: underline;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-select-combo .multi-select-trigger-icon-button {
font-size: 16px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-select-trigger {
@ -237,56 +186,31 @@
-moz-border-radius: 2px 2px 2px 2px;
border-radius: 2px 2px 2px 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-select-search-pane .multi-select-toolbar {
color: #e85050;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-select-check-selected-button {
z-index: 1;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-tree-check-pane .multi-tree-check-selected {
color: #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-tree-combo .multi-select-trigger-icon-button {
font-size: 16px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-tree-popup .popup-view-tree {
min-height: 170px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-multi-tree-check-selected-button .trigger-check-selected {
color: #3f8ce8;
z-index: 1;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-numerical-interval .numerical-interval-small-editor {
@ -330,10 +254,6 @@
.bi-numerical-interval.number-error .bi-input {
color: #e85050;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-page-table-cell {
@ -344,32 +264,19 @@
-o-user-select: initial;
user-select: initial;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-path-chooser .path-chooser-radio {
z-index: 1;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-path-region .path-region-label {
z-index: 1;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-preview-table-cell {
min-height: 25px;
min-width: 80px;
max-width: 220px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-preview-table {
-webkit-user-select: initial;
-khtml-user-select: initial;
@ -386,22 +293,14 @@
.bi-theme-dark .bi-preview-table > div > div > div > table > thead > tr.odd {
background-color: #191b2b;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-preview-table-header-cell {
font-weight: bold;
min-height: 25px;
min-width: 80px;
max-width: 220px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-quarter-trigger {
@ -409,10 +308,6 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-relation-view-region .relation-view-region-container {
@ -424,9 +319,6 @@
.bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-sequence-table-dynamic-number .sequence-table-title-cell {
overflow: hidden;
overflow-x: hidden;
@ -450,9 +342,6 @@
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-sequence-table-list-number .sequence-table-title-cell {
overflow: hidden;
overflow-x: hidden;
@ -476,10 +365,6 @@
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-sequence-table-tree-number .sequence-table-title-cell {
@ -505,18 +390,12 @@
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-year-popup .year-popup-navigation {
line-height: 30px;
color: #3f8ce8;
}
.bi-year-popup .year-popup-navigation > .center-element {
border-left: 1px solid #d4dadd;
@ -530,9 +409,6 @@
.bi-theme-dark .bi-year-popup .year-popup-navigation > .first-element {
border-left: none;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-year-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;

3097
docs/widget.js

File diff suppressed because it is too large Load Diff

6
src/base/collection/collection.js

@ -166,10 +166,10 @@ BI.CollectionView = BI.inherit(BI.Widget, {
this.renderedCells[index]._height = datum.height;
this.renderedCells[index].el.setHeight(datum.height);
}
if (this.renderedCells[index].left !== datum.x) {
if (this.renderedCells[index]._left !== datum.x) {
this.renderedCells[index].el.element.css("left", datum.x + "px");
}
if (this.renderedCells[index].top !== datum.y) {
if (this.renderedCells[index]._top !== datum.y) {
this.renderedCells[index].el.element.css("top", datum.y + "px");
}
renderedCells.push(child = this.renderedCells[index]);
@ -187,6 +187,8 @@ BI.CollectionView = BI.inherit(BI.Widget, {
el: child,
left: datum.x,
top: datum.y,
_left: datum.x,
_top: datum.y,
_width: datum.width,
_height: datum.height
});

26
src/base/combination/combo.js

@ -34,17 +34,21 @@ BI.Combo = BI.inherit(BI.Widget, {
this._initCombo();
this._initPullDownAction();
this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
if (self.isEnabled() && this.isEnabled()) {
if (self.isEnabled() && self.isValid()) {
if (type === BI.Events.EXPAND) {
self._popupView();
}
if (type === BI.Events.COLLAPSE) {
self._hideView();
}
if (type === BI.Events.EXPAND || type === BI.Events.COLLAPSE) {
if (type === BI.Events.EXPAND) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
self.fireEvent(BI.Combo.EVENT_EXPAND);
}
if (type === BI.Events.COLLAPSE) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
self.isViewVisible() && self.fireEvent(BI.Combo.EVENT_COLLAPSE);
}
if (type === BI.Events.CLICK) {
self.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE, obj);
}
@ -52,12 +56,12 @@ BI.Combo = BI.inherit(BI.Widget, {
});
self.element.on("mouseenter." + self.getName(), function (e) {
if (self.isEnabled() && self.combo.isEnabled()) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
self.element.addClass(o.hoverClass);
}
});
self.element.on("mouseleave." + self.getName(), function (e) {
if (self.isEnabled() && self.combo.isEnabled()) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
self.element.removeClass(o.hoverClass);
}
});
@ -104,14 +108,14 @@ BI.Combo = BI.inherit(BI.Widget, {
switch (ev) {
case "hover":
self.element.on("mouseenter." + self.getName(), function (e) {
if (self.isEnabled() && self.combo.isEnabled()) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
self._popupView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo);
self.fireEvent(BI.Combo.EVENT_EXPAND);
}
});
self.element.on("mouseleave." + self.getName(), function (e) {
if (self.isEnabled() && self.combo.isEnabled() && o.toggle === true) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, "", self.combo);
self.fireEvent(BI.Combo.EVENT_COLLAPSE);
@ -121,7 +125,7 @@ BI.Combo = BI.inherit(BI.Widget, {
case "click":
var debounce = BI.debounce(function (e) {
if (self.combo.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.combo.isEnabled()) {
if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {
o.toggle ? self._toggle() : self._popupView();
if (self.isViewVisible()) {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.combo);
@ -334,6 +338,7 @@ BI.Combo = BI.inherit(BI.Widget, {
_setEnable: function (arg) {
BI.Combo.superclass._setEnable.apply(this, arguments);
!arg && this.element.removeClass(this.options.hoverClass);
!arg && this.isViewVisible() && this._hideView();
},
@ -370,11 +375,6 @@ BI.Combo = BI.inherit(BI.Widget, {
return this.position;
},
doBehavior: function () {
this._assertPopupView();
this.popupView && this.popupView.doBehavior.apply(this.popupView, arguments);
},
toggle: function () {
this._toggle();
},

20
src/base/combination/expander.js

@ -28,20 +28,20 @@ BI.Expander = BI.inherit(BI.Widget, {
this._initExpander();
this._initPullDownAction();
this.expander.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
if (self.isEnabled() && self.isValid()) {
if (type === BI.Events.EXPAND) {
self._popupView();
}
if (type === BI.Events.COLLAPSE) {
self._hideView();
}
if (self.isEnabled() && this.isEnabled()) {
if (type === BI.Events.EXPAND) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
self.fireEvent(BI.Expander.EVENT_EXPAND);
}
if (type === BI.Events.COLLAPSE) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
self.fireEvent(BI.Expander.EVENT_COLLAPSE);
self.isViewVisible() && self.fireEvent(BI.Expander.EVENT_COLLAPSE);
}
if (type === BI.Events.CLICK) {
self.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE, value, obj);
@ -50,11 +50,11 @@ BI.Expander = BI.inherit(BI.Widget, {
});
this.element.hover(function () {
if (self.isEnabled() && self.expander.isEnabled()) {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {
self.element.addClass(o.hoverClass);
}
}, function () {
if (self.isEnabled() && self.expander.isEnabled()) {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {
self.element.removeClass(o.hoverClass);
}
});
@ -90,13 +90,13 @@ BI.Expander = BI.inherit(BI.Widget, {
switch (e) {
case "hover":
self.element[e](function (e) {
if (self.isEnabled() && self.expander.isEnabled()) {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {
self._popupView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, '', self.expander);
self.fireEvent(BI.Expander.EVENT_EXPAND);
}
}, function () {
if (self.isEnabled() && self.expander.isEnabled() && o.toggle) {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid() && o.toggle) {
self._hideView();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, '', self.expander);
self.fireEvent(BI.Expander.EVENT_COLLAPSE);
@ -107,7 +107,7 @@ BI.Expander = BI.inherit(BI.Widget, {
if (e) {
self.element.off(e + "." + self.getName()).on(e + "." + self.getName(), BI.debounce(function (e) {
if (self.expander.element.__isMouseInBounds__(e)) {
if (self.isEnabled() && self.expander.isEnabled()) {
if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {
o.toggle ? self._toggle() : self._popupView();
if (self.isExpanded()) {
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, "", self.expander);
@ -198,6 +198,7 @@ BI.Expander = BI.inherit(BI.Widget, {
_setEnable: function (arg) {
BI.Expander.superclass._setEnable.apply(this, arguments);
!arg && this.element.removeClass(this.options.hoverClass);
!arg && this.isViewVisible() && this._hideView();
},
@ -234,11 +235,6 @@ BI.Expander = BI.inherit(BI.Widget, {
return this.popupView;
},
doBehavior: function () {
//this._assertPopupView();
this.popupView && this.popupView.doBehavior.apply(this.popupView, arguments);
},
getAllLeaves: function () {
return this.popupView && this.popupView.getAllLeaves();
},

4
src/base/combination/loader.js

@ -195,10 +195,6 @@ BI.Loader = BI.inherit(BI.Widget, {
this.button_group.populate.apply(this.button_group, arguments);
},
doBehavior: function () {
this.button_group.doBehavior.apply(this.button_group, arguments);
},
setNotSelectedValue: function () {
this.button_group.setNotSelectedValue.apply(this.button_group, arguments);
},

14
src/base/combination/switcher.js

@ -28,15 +28,20 @@ BI.Switcher = BI.inherit(BI.Widget, {
this._initSwitcher();
this._initPullDownAction();
this.switcher.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
if (self.isEnabled() && this.isEnabled()) {
if (self.isEnabled() && self.isValid()) {
if (type === BI.Events.EXPAND) {
self._popupView();
}
if (type === BI.Events.COLLAPSE) {
self._hideView();
}
if (type === BI.Events.EXPAND || type === BI.Events.COLLAPSE) {
if (type === BI.Events.EXPAND) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
self.fireEvent(BI.Switcher.EVENT_EXPAND);
}
if (type === BI.Events.COLLAPSE) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
self.isViewVisible() && self.fireEvent(BI.Switcher.EVENT_COLLAPSE);
}
if (type === BI.Events.CLICK) {
self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE, value, obj);
@ -234,11 +239,6 @@ BI.Switcher = BI.inherit(BI.Widget, {
this.isViewVisible() && BI.Maskers.show(this.getName());
},
doBehavior: function () {
this._assertPopupView();
this.popupView && this.popupView.doBehavior.apply(this.popupView, arguments);
},
getAllLeaves: function () {
return this.popupView && this.popupView.getAllLeaves();
},

11
src/base/combination/tab.js

@ -93,6 +93,17 @@ BI.Tab = BI.inherit(BI.Widget, {
}
},
removeTab: function (cardname) {
var self = this, o = this.options;
BI.any(this.cardMap, function (name, card) {
if (BI.isEqual(name, (cardname + ""))) {
self.layout.deleteCardByName(name);
delete self.cardMap[name];
return true;
}
});
},
getSelect: function () {
return this.curr;
},

6
src/base/formula/formulaeditor.js

@ -6,11 +6,12 @@
BI.FormulaEditor = BI.inherit(BI.Single, {
_defaultConfig: function () {
return $.extend(BI.FormulaEditor.superclass._defaultConfig.apply(), {
baseCls: 'bi-formula-editor',
baseCls: 'bi-formula-editor bi-card',
watermark: '',
value: '',
fieldTextValueMap: {},
showHint: true
showHint: true,
lineHeight: 2
});
},
_init: function () {
@ -22,6 +23,7 @@ BI.FormulaEditor = BI.inherit(BI.Single, {
lineNumbers: false,
mode: 'formula'
});
o.lineHeight === 1 ? this.element.addClass("codemirror-low-line-height") : this.element.addClass("codemirror-high-line-height");
this.editor.on("change", function (cm, change) {
self._checkWaterMark();
if (o.showHint) {

4
src/base/foundation/message.js

@ -12,11 +12,11 @@ $.extend(BI, {
alert: function (title, message, callback) {
this._show(false, title, message, callback);
},
confirm: function (title, message, callback, min_width) {
confirm: function (title, message, callback) {
this._show(true, title, message, callback);
},
prompt: function (title, message, value, callback, min_width) {
BI.Msg.prompt(title, message, value, callback, min_width);
// BI.Msg.prompt(title, message, value, callback, min_width);
},
toast: function (message, level, context) {
context = context || $("body");

6
src/base/grid/grid.js

@ -142,10 +142,10 @@ BI.GridView = BI.inherit(BI.Widget, {
this.renderedCells[index]._height = rowDatum.size;
this.renderedCells[index].el.setHeight(rowDatum.size);
}
if (this.renderedCells[index].left !== columnDatum.offset + horizontalOffsetAdjustment) {
if (this.renderedCells[index]._left !== columnDatum.offset + horizontalOffsetAdjustment) {
this.renderedCells[index].el.element.css("left", (columnDatum.offset + horizontalOffsetAdjustment) + "px");
}
if (this.renderedCells[index].top !== rowDatum.offset + verticalOffsetAdjustment) {
if (this.renderedCells[index]._top !== rowDatum.offset + verticalOffsetAdjustment) {
this.renderedCells[index].el.element.css("top", (rowDatum.offset + verticalOffsetAdjustment) + "px");
}
renderedCells.push(child = this.renderedCells[index]);
@ -165,6 +165,8 @@ BI.GridView = BI.inherit(BI.Widget, {
el: child,
left: columnDatum.offset + horizontalOffsetAdjustment,
top: rowDatum.offset + verticalOffsetAdjustment,
_left: columnDatum.offset + horizontalOffsetAdjustment,
_top: rowDatum.offset + verticalOffsetAdjustment,
_width: columnDatum.size,
_height: rowDatum.size
});

4
src/base/single/button/button.basic.js

@ -127,7 +127,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
$(document).bind("mouseup." + self.getName(), function (e) {
// if (e.button === 0) {
if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) {
self.setSelected(!self.isSelected());
// self.setSelected(!self.isSelected());
self._trigger();
}
mouseDown = false;
@ -274,7 +274,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
setSelected: function (b) {
var o = this.options;
o.selected = b;
if (this.isSelected()) {
if (b) {
this.handle().element.addClass("active");
} else {
this.handle().element.removeClass("active");

76
src/base/single/editor/editor.code.js

@ -7,9 +7,15 @@
BI.CodeEditor = BI.inherit(BI.Single, {
_defaultConfig: function () {
return $.extend(BI.CodeEditor.superclass._defaultConfig.apply(), {
baseCls: 'bi-code-editor',
baseCls: 'bi-code-editor bi-card',
value: '',
watermark: ""
watermark: "",
lineHeight: 2,
readOnly: false,
//参数显示值构造函数
paramFormatter: function (v) {
return v;
}
});
},
_init: function () {
@ -18,8 +24,10 @@ BI.CodeEditor = BI.inherit(BI.Single, {
this.editor = CodeMirror(this.element[0], {
textWrapping: true,
lineWrapping: true,
lineNumbers: false
lineNumbers: false,
readOnly: o.readOnly
});
o.lineHeight === 1 ? this.element.addClass("codemirror-low-line-height") : this.element.addClass("codemirror-high-line-height");
this.editor.on("change", function (cm, change) {
BI.nextTick(function () {
self.fireEvent(BI.CodeEditor.EVENT_CHANGE)
@ -27,12 +35,12 @@ BI.CodeEditor = BI.inherit(BI.Single, {
});
this.editor.on("focus", function () {
watermark.setVisible(false);
self.watermark.setVisible(false);
self.fireEvent(BI.CodeEditor.EVENT_FOCUS);
});
this.editor.on("blur", function () {
watermark.setVisible(BI.isEmptyString(self.getValue()));
self.watermark.setVisible(BI.isEmptyString(self.getValue()));
self.fireEvent(BI.CodeEditor.EVENT_BLUR);
});
@ -41,21 +49,21 @@ BI.CodeEditor = BI.inherit(BI.Single, {
// });
//水印
var watermark = BI.createWidget({
this.watermark = BI.createWidget({
type: "bi.label",
text: o.watermark,
cls: "bi-water-mark",
whiteSpace: "nowrap",
textAlign: "left"
});
watermark.element.bind(
this.watermark.element.bind(
"mousedown", function (e) {
self.insertString("");
self.editor.focus();
e.stopEvent();
}
);
watermark.element.bind("click", function (e) {
this.watermark.element.bind("click", function (e) {
self.editor.focus();
e.stopEvent();
});
@ -63,7 +71,7 @@ BI.CodeEditor = BI.inherit(BI.Single, {
type: "bi.absolute",
element: this,
items: [{
el: watermark,
el: this.watermark,
top: 0,
left: 5
}]
@ -81,16 +89,32 @@ BI.CodeEditor = BI.inherit(BI.Single, {
this.editor.setOption("readOnly", b === true ? false : "nocursor")
},
insertParam: function(param){
_checkWaterMark: function () {
var o = this.options;
if (BI.isEmptyString(this.editor.getValue()) && BI.isKey(o.watermark)) {
this.watermark && this.watermark.visible();
} else {
this.watermark && this.watermark.invisible();
}
},
insertParam: function (param) {
var value = param;
param = this.options.paramFormatter(param);
var from = this.editor.getCursor();
this.editor.replaceSelection(param);
var to = this.editor.getCursor();
this.editor.markText(from, to, {className: 'param', atomic: true});
var options = {className: 'param', atomic: true};
if (BI.isNotNull(param.match(/^<!.*!>$/))) {
options.className = 'error-param';
}
options.value = value;
this.editor.markText(from, to, options);
this.editor.replaceSelection(" ");
this.editor.focus();
},
insertString: function(str){
insertString: function (str) {
this.editor.replaceSelection(str);
this.editor.focus();
},
@ -102,9 +126,13 @@ BI.CodeEditor = BI.inherit(BI.Single, {
_.forEach(line.markedSpans, function (i, ms) {
switch (i.marker.className) {
case "param":
case "error-param":
var fieldNameLength = i.to - i.from;
value = value.substr(0, i.from + num) + "$\{" + value.substr(i.from + num, fieldNameLength) + "\}" + value.substr(i.to + num, value.length);
value = value.substr(0, i.from + num) + "$\{" + i.marker.value + "\}" + value.substr(i.to + num, value.length);
//加上${}的偏移
num += 3;
//加上实际值和显示值的长度差的偏移
num += (i.marker.value.length - fieldNameLength);
break;
}
});
@ -130,10 +158,28 @@ BI.CodeEditor = BI.inherit(BI.Single, {
} else {
self.insertString(item);
}
})
});
this._checkWaterMark();
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.getInputField().blur();
},
setStyle: function (style) {
this.style = style;
this.element.css(style);
},
getStyle: function () {
return this.style;
},
refresh: function(){
refresh: function () {
var self = this;
BI.nextTick(function () {
self.editor.refresh();

2
src/base/single/editor/editor.multifile.js

@ -12,7 +12,7 @@ BI.MultifileEditor = BI.inherit(BI.Single, {
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-multifile-editor",
multiple: false,
maxSize: 1024 * 1024,
maxSize: -1,//1024 * 1024
accept: "",
url: ""
})

4
src/base/single/editor/editor.textarea.js

@ -7,7 +7,7 @@
BI.TextAreaEditor = BI.inherit(BI.Single, {
_defaultConfig: function () {
return $.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(), {
baseCls: 'bi-textarea-editor',
baseCls: 'bi-textarea-editor bi-card',
value: ''
});
},
@ -19,7 +19,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
tagName: "textarea",
width: "100%",
height: "100%",
cls: "textarea-editor-content display-block bi-card"
cls: "bi-textarea textarea-editor-content display-block"
});
this.content.element.css({"resize": "none"});
BI.createWidget({

9
src/base/single/iframe/iframe.js

@ -30,6 +30,15 @@ BI.Iframe = BI.inherit(BI.Single, {
return this.options.src;
},
setName: function (name) {
this.options.name = name;
this.element.attr("name", name);
},
getName: function () {
return this.options.name;
},
getWidth: function () {
return this.options.width
},

2
src/base/single/input/file.js

@ -399,7 +399,7 @@
url: "",
multiple: true,
accept: "", /**'*.jpg; *.zip'**/
maxSize: 1024 * 1024
maxSize: -1 //1024 * 1024
})
},

4
src/base/single/label/label.js

@ -147,7 +147,7 @@ BI.Label = BI.inherit(BI.Single, {
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json);
this.text = BI.createWidget({
BI.createWidget({
type: "bi.center_adapt",
hgap: o.hgap,
vgap: o.vgap,
@ -345,7 +345,7 @@ BI.Label = BI.inherit(BI.Single, {
}
if (o.whiteSpace == "normal") {
this.text = BI.createWidget(json)
this.text = BI.createWidget({
BI.createWidget({
type: "bi.vertical_adapt",
scrollable: o.whiteSpace === "normal",
hgap: o.hgap,

4
src/base/table/native.scrollbar.js

@ -22,7 +22,7 @@ BI.NativeTableScrollbar = BI.inherit(BI.Widget, {
render: function () {
var self = this, o = this.options;
//把滚动台size改掉
BI.GridTableScrollbar.SIZE = 16;
this.element.width(36);
var throttle = BI.throttle(function () {
self.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL, self.element.scrollTop());
@ -98,7 +98,7 @@ BI.NativeTableHorizontalScrollbar = BI.inherit(BI.Widget, {
render: function () {
var self = this, o = this.options;
//把滚动台size改掉
BI.GridTableScrollbar.SIZE = 16;
this.element.height(36);
var throttle = BI.throttle(function () {
self.fireEvent(BI.NativeTableScrollbar.EVENT_SCROLL, self.element.scrollLeft());

58
src/base/table/table.collection.js

@ -173,11 +173,26 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
return this.options.isNeedFreeze ? this.options.freezeCols.length : 0;
},
_getFreezeHeaderHeight: function () {
var o = this.options;
if (o.header.length * o.headerRowSize >= this._height) {
return 0;
}
return o.header.length * o.headerRowSize;
},
_getActualItems: function () {
var o = this.options;
if (o.header.length * o.headerRowSize >= this._height) {
return o.header.concat(o.items);
}
return o.items;
},
_populateScrollbar: function () {
var o = this.options;
var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0,
summaryColumnSizeArray = [], totalRowSize = o.items.length * o.rowSize;
var freezeColLength = this._getFreezeColLength();
summaryColumnSizeArray = [];
BI.each(o.columnSize, function (i, size) {
if (o.isNeedFreeze === true && o.freezeCols.contains(i)) {
totalLeftColumnSize += size;
@ -191,8 +206,8 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size;
}
});
this.topScrollbar.setContentSize(o.items.length * o.rowSize);
this.topScrollbar.setSize(this._height - o.header.length * o.headerRowSize);
this.topScrollbar.setContentSize(this._getActualItems().length * o.rowSize);
this.topScrollbar.setSize(this._height - this._getFreezeHeaderHeight());
this.topScrollbar.setPosition(this.bottomRightCollection.getScrollTop());
this.topScrollbar.populate();
@ -207,7 +222,7 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
this.rightScrollbar.populate();
var items = this.scrollBarLayout.attr("items");
items[0].top = o.header.length * o.headerRowSize;
items[0].top = this._getFreezeHeaderHeight();
items[1].top = this._height;
items[2].top = this._height;
items[2].left = regionSize;
@ -218,8 +233,7 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
_populateTable: function () {
var self = this, o = this.options;
var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0,
summaryColumnSizeArray = [], totalRowSize = o.items.length * o.rowSize;
var freezeColLength = this._getFreezeColLength();
summaryColumnSizeArray = [];
BI.each(o.columnSize, function (i, size) {
if (o.isNeedFreeze === true && o.freezeCols.contains(i)) {
totalLeftColumnSize += size;
@ -235,13 +249,13 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
});
var otlw = regionSize;
var otlh = o.header.length * o.headerRowSize;
var otlh = this._getFreezeHeaderHeight();
var otrw = this._width - regionSize;
var otrh = o.header.length * o.headerRowSize;
var otrh = this._getFreezeHeaderHeight();
var oblw = regionSize;
var oblh = this._height - o.header.length * o.headerRowSize;
var oblh = this._height - otlh;
var obrw = this._width - regionSize;
var obrh = this._height - o.header.length * o.headerRowSize;
var obrh = this._height - otrh;
var tlw = otlw + this._scrollBarSize;
var tlh = otlh + this._scrollBarSize;
@ -285,9 +299,9 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
var items = this.contextLayout.attr("items");
items[1].left = regionSize;
items[2].top = o.header.length * o.headerRowSize;
items[2].top = this._getFreezeHeaderHeight();
items[3].left = regionSize;
items[3].top = o.header.length * o.headerRowSize;
items[3].top = this._getFreezeHeaderHeight();
this.contextLayout.attr("items", items);
this.contextLayout.resize();
@ -303,8 +317,8 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
};
run(this.topLeftItems, o.header, leftHeader);
run(this.topRightItems, o.header, rightHeader);
run(this.bottomLeftItems, o.items, leftItems);
run(this.bottomRightItems, o.items, rightItems);
run(this.bottomLeftItems, this._getActualItems(), leftItems);
run(this.bottomRightItems, this._getActualItems(), rightItems);
this.topLeftCollection._populate(leftHeader);
this.topRightCollection._populate(rightHeader);
@ -315,13 +329,23 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
_digest: function () {
var o = this.options;
var freezeColLength = this._getFreezeColLength();
//如果表头位置不够,取消表头冻结
if (this._getFreezeHeaderHeight() <= 0) {
this.topLeftItems = [];
this.topRightItems = [];
this.bottomLeftItems = this._serialize(this._getActualItems(), 0, freezeColLength, o.rowSize, o.columnSize, o.mergeCols, BI.range(o.header.length));
this.bottomRightItems = this._serialize(this._getActualItems(), freezeColLength, o.columnSize.length, o.rowSize, o.columnSize, o.mergeCols, BI.range(o.header.length));
} else {
this.topLeftItems = this._serialize(o.header, 0, freezeColLength, o.headerRowSize, o.columnSize, o.mergeCols);
this.topRightItems = this._serialize(o.header, freezeColLength, o.columnSize.length, o.headerRowSize, o.columnSize, true);
this.bottomLeftItems = this._serialize(o.items, 0, freezeColLength, o.rowSize, o.columnSize, o.mergeCols);
this.bottomRightItems = this._serialize(o.items, freezeColLength, o.columnSize.length, o.rowSize, o.columnSize, o.mergeCols);
}
},
_serialize: function (items, startCol, endCol, rowHeight, columnSize, mergeCols) {
_serialize: function (items, startCol, endCol, rowHeight, columnSize, mergeCols, mergeRows) {
mergeCols = mergeCols || [];
mergeRows = mergeRows || [];
var self = this, o = this.options;
var result = [], cache = {}, preCol = {}, preRow = {}, map = {};
var summaryColumnSize = [];
@ -371,7 +395,7 @@ BI.CollectionTable = BI.inherit(BI.Widget, {
}
cache[i][j] = cols[j];
map[i][j] = {};
if (mergeCols === true || mergeCols.indexOf(j) > -1) {
if (mergeCols === true || mergeCols.indexOf(j) > -1 || mergeRows === true || mergeRows.indexOf(i) > -1) {
if (i === 0 && j === startCol) {
createOneEl(0, startCol);
} else if (j === startCol && i > 0) {

19
src/base/table/table.collection.quick.js

@ -117,8 +117,7 @@ BI.QuickCollectionTable = BI.inherit(BI.CollectionTable, {
_populateTable: function () {
var self = this, o = this.options;
var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0,
summaryColumnSizeArray = [], totalRowSize = o.items.length * o.rowSize;
var freezeColLength = this._getFreezeColLength();
summaryColumnSizeArray = []
BI.each(o.columnSize, function (i, size) {
if (o.isNeedFreeze === true && o.freezeCols.contains(i)) {
totalLeftColumnSize += size;
@ -134,13 +133,13 @@ BI.QuickCollectionTable = BI.inherit(BI.CollectionTable, {
});
var otlw = regionSize;
var otlh = o.header.length * o.headerRowSize;
var otlh = this._getFreezeHeaderHeight();
var otrw = this._width - regionSize;
var otrh = o.header.length * o.headerRowSize;
var otrh = this._getFreezeHeaderHeight();
var oblw = regionSize;
var oblh = this._height - o.header.length * o.headerRowSize;
var oblh = this._height - otlh;
var obrw = this._width - regionSize;
var obrh = this._height - o.header.length * o.headerRowSize;
var obrh = this._height - otrh;
this.topLeft.setWidth(otlw);
this.topLeft.setHeight(otlh);
@ -162,9 +161,9 @@ BI.QuickCollectionTable = BI.inherit(BI.CollectionTable, {
var items = this.contextLayout.attr("items");
items[1].left = regionSize;
items[2].top = o.header.length * o.headerRowSize;
items[2].top = this._getFreezeHeaderHeight();
items[3].left = regionSize;
items[3].top = o.header.length * o.headerRowSize;
items[3].top = this._getFreezeHeaderHeight();
this.contextLayout.attr("items", items);
this.contextLayout.resize();
@ -180,8 +179,8 @@ BI.QuickCollectionTable = BI.inherit(BI.CollectionTable, {
};
run(this.topLeftItems, o.header, leftHeader);
run(this.topRightItems, o.header, rightHeader);
run(this.bottomLeftItems, o.items, leftItems);
run(this.bottomRightItems, o.items, rightItems);
run(this.bottomLeftItems, this._getActualItems(), leftItems);
run(this.bottomRightItems, this._getActualItems(), rightItems);
this.topLeftCollection.populate(leftHeader);
this.topRightCollection.populate(rightHeader);

41
src/base/table/table.grid.js

@ -176,11 +176,26 @@ BI.GridTable = BI.inherit(BI.Widget, {
return this.options.isNeedFreeze ? this.options.freezeCols.length : 0;
},
_getFreezeHeaderHeight: function () {
var o = this.options;
if (o.header.length * o.headerRowSize >= this._height) {
return 0;
}
return o.header.length * o.headerRowSize;
},
_getActualItems: function () {
var o = this.options;
if (o.header.length * o.headerRowSize >= this._height) {
return o.header.concat(o.items);
}
return o.items;
},
_populateScrollbar: function () {
var o = this.options;
var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0,
summaryColumnSizeArray = [], totalRowSize = o.items.length * o.rowSize;
var freezeColLength = this._getFreezeColLength();
summaryColumnSizeArray = [];
BI.each(o.columnSize, function (i, size) {
if (o.isNeedFreeze === true && o.freezeCols.contains(i)) {
totalLeftColumnSize += size;
@ -194,8 +209,8 @@ BI.GridTable = BI.inherit(BI.Widget, {
summaryColumnSizeArray[i] = summaryColumnSizeArray[i - 1] + size;
}
});
this.topScrollbar.setContentSize(o.items.length * o.rowSize);
this.topScrollbar.setSize(this._height - o.header.length * o.headerRowSize);
this.topScrollbar.setContentSize(this._getActualItems().length * o.rowSize);
this.topScrollbar.setSize(this._height - this._getFreezeHeaderHeight());
this.topScrollbar.setPosition(Math.min(this.bottomLeftGrid.getScrollTop(), this.bottomRightGrid.getScrollTop()));
this.topScrollbar.populate();
@ -210,7 +225,7 @@ BI.GridTable = BI.inherit(BI.Widget, {
this.rightScrollbar.populate();
var items = this.scrollBarLayout.attr("items");
items[0].top = o.header.length * o.headerRowSize;
items[0].top = this._getFreezeHeaderHeight();
items[1].top = this._height;
items[2].top = this._height;
items[2].left = regionSize;
@ -244,7 +259,7 @@ BI.GridTable = BI.inherit(BI.Widget, {
var o = this.options;
var freezeColLength = this._getFreezeColLength();
var leftItems = [], rightItems = [];
BI.each(o.items, function (i, cols) {
BI.each(this._getActualItems(), function (i, cols) {
leftItems[i] = [];
rightItems[i] = [];
BI.each(cols, function (j, col) {
@ -265,7 +280,7 @@ BI.GridTable = BI.inherit(BI.Widget, {
_populateTable: function () {
var self = this, o = this.options;
var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0,
summaryColumnSizeArray = [], totalRowSize = o.items.length * o.rowSize;
summaryColumnSizeArray = [];
var freezeColLength = this._getFreezeColLength();
BI.each(o.columnSize, function (i, size) {
if (o.isNeedFreeze === true && o.freezeCols.contains(i)) {
@ -282,13 +297,13 @@ BI.GridTable = BI.inherit(BI.Widget, {
});
var otlw = regionSize;
var otlh = o.header.length * o.headerRowSize;
var otlh = this._getFreezeHeaderHeight();
var otrw = this._width - regionSize;
var otrh = o.header.length * o.headerRowSize;
var otrh = this._getFreezeHeaderHeight();
var oblw = regionSize;
var oblh = this._height - o.header.length * o.headerRowSize;
var oblh = this._height - otlh;
var obrw = this._width - regionSize;
var obrh = this._height - o.header.length * o.headerRowSize;
var obrh = this._height - otrh;
var tlw = otlw + this._scrollBarSize;
var tlh = otlh + this._scrollBarSize;
@ -341,9 +356,9 @@ BI.GridTable = BI.inherit(BI.Widget, {
var items = this.contextLayout.attr("items");
items[1].left = regionSize;
items[2].top = o.header.length * o.headerRowSize;
items[2].top = this._getFreezeHeaderHeight();
items[3].left = regionSize;
items[3].top = o.header.length * o.headerRowSize;
items[3].top = this._getFreezeHeaderHeight();
this.contextLayout.attr("items", items);
this.contextLayout.resize();

16
src/base/table/table.grid.quick.js

@ -116,7 +116,7 @@ BI.QuickGridTable = BI.inherit(BI.GridTable, {
_populateTable: function () {
var self = this, o = this.options;
var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, summaryColumnSizeArray = [], totalRowSize = o.items.length * o.rowSize;
var regionSize = this.getRegionSize(), totalLeftColumnSize = 0, totalRightColumnSize = 0, totalColumnSize = 0, summaryColumnSizeArray = [];
var freezeColLength = this._getFreezeColLength();
BI.each(o.columnSize, function (i, size) {
if (o.isNeedFreeze === true && o.freezeCols.contains(i)) {
@ -133,13 +133,13 @@ BI.QuickGridTable = BI.inherit(BI.GridTable, {
});
var otlw = regionSize;
var otlh = o.header.length * o.headerRowSize;
var otlh = this._getFreezeHeaderHeight();
var otrw = this._width - regionSize;
var otrh = o.header.length * o.headerRowSize;
var otrh = this._getFreezeHeaderHeight();
var oblw = regionSize;
var oblh = this._height - o.header.length * o.headerRowSize;
var oblh = this._height - otlh;
var obrw = this._width - regionSize;
var obrh = this._height - o.header.length * o.headerRowSize;
var obrh = this._height - otrh;
this.topLeft.setWidth(otlw);
this.topLeft.setHeight(otlh);
@ -170,9 +170,9 @@ BI.QuickGridTable = BI.inherit(BI.GridTable, {
var items = this.contextLayout.attr("items");
items[1].left = regionSize;
items[2].top = o.header.length * o.headerRowSize;
items[2].top = this._getFreezeHeaderHeight();
items[3].left = regionSize;
items[3].top = o.header.length * o.headerRowSize;
items[3].top = this._getFreezeHeaderHeight();
this.contextLayout.attr("items", items);
this.contextLayout.resize();
@ -192,7 +192,7 @@ BI.QuickGridTable = BI.inherit(BI.GridTable, {
}
});
});
BI.each(o.items, function (i, cols) {
BI.each(this._getActualItems(), function (i, cols) {
leftItems[i] = [];
rightItems[i] = [];
BI.each(cols, function (j, col) {

25
src/base/table/table.resizable.cell.js

@ -11,6 +11,9 @@ BI.ResizableTableCell = BI.inherit(BI.Widget, {
return BI.extend(BI.ResizableTableCell.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-resizable-table-cell",
cell: {},
minSize: 15,
// suitableSize,
maxSize: Number.MAX_VALUE,
start: BI.emptyFn,
resize: BI.emptyFn,
stop: BI.emptyFn
@ -24,24 +27,39 @@ BI.ResizableTableCell = BI.inherit(BI.Widget, {
var startDrag = false;
var size = 0, offset = 0, defaultSize = o.width;
function optimizeSize(s) {
var optSize = BI.clamp(s, o.minSize, o.maxSize || Number.MAX_VALUE);
// if (o.suitableSize) {
// if (Math.abs(o.suitableSize - optSize) < 5) {
// optSize = o.suitableSize;
// self.handler.element.addClass("suitable");
// } else {
// self.handler.element.removeClass("suitable");
// }
// }
return optSize;
}
var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX, deltaY) {
if (mouseMoveTracker.isDragging()) {
startDrag = true;
offset += deltaX;
size = BI.clamp(defaultSize + offset, 15, Number.MAX_VALUE);
size = optimizeSize(defaultSize + offset);
self.handler.element.addClass("dragging");
o.resize(size);
}
}, function () {
if (startDrag === true) {
size = BI.clamp(size, 15, Number.MAX_VALUE);
size = optimizeSize(size);
o.stop(size);
size = 0;
offset = 0;
defaultSize = o.width;
self.handler.element.removeClass("dragging");
startDrag = false;
}
self.handler.element.removeClass("dragging");
self.handler.element.removeClass("suitable");
mouseMoveTracker.releaseMouseMoves();
}, document);
this.handler = BI.createWidget({
@ -61,6 +79,7 @@ BI.ResizableTableCell = BI.inherit(BI.Widget, {
});
this.handler.element.on("mousedown", function (event) {
defaultSize = o.width;
optimizeSize(defaultSize);
mouseMoveTracker.captureMouseMoves(event);
});
BI.createWidget({

15
src/base/table/table.resizable.js

@ -22,6 +22,8 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
mergeCols: [],
mergeRule: BI.emptyFn,
columnSize: [],
minColumnSize: [],
maxColumnSize: [],
freezeCols: [],
header: [],
items: [],
@ -214,7 +216,14 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
self.resizer.setVisible(true);
var height = o.headerRowSize + self._getRegionRowSize()[1];
self.resizer.setHeight(height);
//TODO 不知道为什么加入这段代码会使得列宽调整出问题
// if (o.minColumnSize[j]) {
// if (size === o.minColumnSize[j]) {
// self.resizer.element.addClass("suitable");
// } else {
// self.resizer.element.removeClass("suitable");
// }
// }
self._setResizerPosition(self._getResizerLeft(j) + size, (o.header.length - 1) * o.headerRowSize);
};
var stop = function (j, size) {
@ -237,6 +246,8 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
result[i][j] = {
type: "bi.resizable_table_cell",
cell: col,
suitableSize: o.minColumnSize[j],
maxSize: o.maxColumnSize[j],
resize: BI.bind(resize, null, j),
stop: BI.bind(stop, null, j)
};
@ -246,6 +257,8 @@ BI.ResizableTable = BI.inherit(BI.Widget, {
result[r - 1][j] = {
type: "bi.resizable_table_cell",
cell: result[r - 1][j],
suitableSize: o.minColumnSize[j],
maxSize: o.maxColumnSize[j],
resize: BI.bind(resize, null, j),
stop: BI.bind(stop, null, j)
};

22
src/base/tree/asynctree.js

@ -105,7 +105,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
if (treeNode.checked === true) {
} else {
var tNode = treeNode;
var pNode = this._getTree(this.selectedValues, parentValues);
var pNode = this._getTree(this.options.paras.selectedValues, parentValues);
if (BI.isNotNull(pNode[name])) {
delete pNode[name];
}
@ -113,7 +113,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
parentValues = parentValues.slice(0, parentValues.length - 1);
tNode = tNode.getParentNode();
if (tNode != null) {
pNode = this._getTree(this.selectedValues, parentValues);
pNode = this._getTree(this.options.paras.selectedValues, parentValues);
name = this._getNodeValue(tNode);
delete pNode[name];
}
@ -127,10 +127,10 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
var self = this, o = this.options;
var parentValues = treeNode.parentValues || self._getParentValues(treeNode);
var op = BI.extend({}, o.paras, {
"id": treeNode.id,
"times": 1,
"parentValues": parentValues.concat(this._getNodeValue(treeNode)),
"checkState": treeNode.getCheckStatus()
id: treeNode.id,
times: 1,
parentValues: parentValues.concat(this._getNodeValue(treeNode)),
checkState: treeNode.getCheckStatus()
});
var complete = function (d) {
var nodes = d.items || [];
@ -178,7 +178,7 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
},
hasChecked: function () {
return !BI.isEmpty(this.selectedValues) || BI.AsyncTree.superclass.hasChecked.apply(this, arguments);
return !BI.isEmpty(this.options.paras.selectedValues) || BI.AsyncTree.superclass.hasChecked.apply(this, arguments);
},
getValue: function () {
@ -187,20 +187,18 @@ BI.AsyncTree = BI.inherit(BI.TreeView, {
}
var checkedValues = this._getSelectedValues();
if (BI.isEmpty(checkedValues)) {
return BI.deepClone(this.selectedValues);
return BI.deepClone(this.options.paras.selectedValues);
}
if (BI.isEmpty(this.selectedValues)) {
if (BI.isEmpty(this.options.paras.selectedValues)) {
return checkedValues;
}
return this._join(checkedValues, this.selectedValues);
return this._join(checkedValues, this.options.paras.selectedValues);
},
//生成树方法
stroke: function (config) {
delete this.options.keyword;
BI.extend(this.options.paras, config);
//取消选中时使用
this.selectedValues = BI.deepClone(this.options.paras.selectedValues) || {};
var setting = this._configSetting();
this._initTree(setting);
}

4
src/base/tree/customtree.js

@ -113,10 +113,6 @@ BI.CustomTree = BI.inherit(BI.Widget, {
this.tree.populate.apply(this.tree, args);
},
doBehavior: function () {
this.tree.doBehavior.apply(this.tree, arguments);
},
setValue: function (v) {
this.tree && this.tree.setValue(v);
},

8
src/base/tree/parttree.js

@ -45,7 +45,7 @@ BI.PartTree = BI.inherit(BI.AsyncTree, {
BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments);
} else {
//如果选中的值中不存在该值不处理
var t = this.selectedValues;
var t = this.options.paras.selectedValues;
var p = parentValues.concat(name);
for (var i = 0, len = p.length; i < len; i++) {
t = t[p[i]];
@ -58,11 +58,10 @@ BI.PartTree = BI.inherit(BI.AsyncTree, {
}
o.itemsCreator(BI.extend({}, o.paras, {
type: BI.TreeView.REQ_TYPE_SELECT_DATA,
selectedValues: this.selectedValues,
notSelectedValue: name,
parentValues: parentValues
}), function (new_values) {
self.selectedValues = new_values;
self.options.paras.selectedValues = new_values;
BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments);
});
}
@ -159,9 +158,6 @@ BI.PartTree = BI.inherit(BI.AsyncTree, {
delete o.paras.keyword;
BI.extend(o.paras, config);
delete o.paras.lastSearchValue;
//取消选中时使用
this.selectedValues = BI.deepClone(o.paras.selectedValues) || {};
//delete this.options.paras.selectedValues;
var setting = this._configSetting();
this._initTree(setting, o.paras.keyword);
}

17
src/base/tree/treeview.js

@ -216,7 +216,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
_getNodeValue: function (node) {
//去除标红
return node.value == null ? node.text.replace(/<[^>]+>/g, "") : node.value;
return node.value == null ? node.text.replace(/<[^>]+>/g, "").replaceAll(" ", " ") : node.value;
},
//获取半选框值
@ -241,7 +241,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
this._buildTree(map, path);
return;
}
var storeValues = BI.deepClone(this.selectedValues);
var storeValues = BI.deepClone(this.options.paras.selectedValues);
var treeNode = this._getTree(storeValues, path);
this._addTreeNode(map, parent, this._getNodeValue(node), treeNode);
},
@ -436,6 +436,16 @@ BI.TreeView = BI.inherit(BI.Pane, {
},
checkAll: function (checked) {
function setNode(children) {
BI.each(children, function (i, child) {
child.halfCheck = false;
setNode(child.children);
});
}
BI.each(this.nodes.getNodes(), function (i, node) {
node.halfCheck = false;
setNode(node.children);
});
this.nodes && this.nodes.checkAllNodes(checked);
},
@ -451,8 +461,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
},
setSelectedValue: function (value) {
this.options.paras.selectedValues = value || {};
this.selectedValues = BI.deepClone(value) || {};
this.options.paras.selectedValues = BI.deepClone(value || {});
},
updateValue: function (values, param) {

1
src/case/button/treeitem/item.multilayer.icon.treeleaf.js

@ -18,6 +18,7 @@ BI.MultiLayerIconTreeLeafItem = BI.inherit(BI.BasicButton, {
var self = this, o = this.options;
this.item = BI.createWidget({
type: "bi.icon_tree_leaf_item",
cls: "bi-list-item-none",
iconCls: o.iconCls,
id: o.id,
pId: o.pId,

2
src/case/calendar/calendar.year.js

@ -9,6 +9,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
var conf = BI.YearCalendar.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: "bi-year-calendar",
behaviors: {},
logic: {
dynamic: false
},
@ -73,6 +74,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
this.years = BI.createWidget({
type: "bi.button_group",
behaviors: o.behaviors,
items: BI.createItems(items, {}),
layouts: [BI.LogicFactory.createLogic("table", BI.extend({}, o.logic, {
columns: 2,

13
src/case/colorchooser/colorchooser.trigger.js

@ -10,7 +10,7 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, {
_defaultConfig: function () {
var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger bi-card",
baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger",
height: 30
})
},
@ -18,7 +18,8 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, {
_init: function () {
BI.ColorChooserTrigger.superclass._init.apply(this, arguments);
this.colorContainer = BI.createWidget({
type: "bi.layout"
type: "bi.layout",
cls: "bi-card color-chooser-trigger-content"
});
var down = BI.createWidget({
@ -51,7 +52,13 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, {
setValue: function (color) {
BI.ColorChooserTrigger.superclass.setValue.apply(this, arguments);
this.colorContainer.element.css("background-color", color);
if (color === "") {
this.colorContainer.element.css("background-color", "").removeClass("trans-color-background").addClass("auto-color-background");
} else if (color === "transparent") {
this.colorContainer.element.css("background-color", "").removeClass("auto-color-background").addClass("trans-color-background")
} else {
this.colorContainer.element.css({"background-color": color}).removeClass("auto-color-background").removeClass("trans-color-background");
}
}
});
BI.ColorChooserTrigger.EVENT_CHANGE = "ColorChooserTrigger.EVENT_CHANGE";

48
src/case/colorchooser/colorpicker/editor.colorpicker.js

@ -40,7 +40,7 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
errorText: BI.i18nText("BI-Color_Picker_Error_Text"),
allowBlank: true,
value: 255,
width: 35,
width: 32,
height: 20
});
BI.each(Ws, function (i, w) {
@ -56,7 +56,8 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
this.B = Ws[2];
this.none = BI.createWidget({
type: "bi.checkbox"
type: "bi.checkbox",
title: BI.i18nText("BI-Basic_Auto")
});
this.none.on(BI.Checkbox.EVENT_CHANGE, function () {
if (this.isSelected()) {
@ -71,6 +72,23 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
}
});
this.transparent = BI.createWidget({
type: "bi.checkbox",
title: BI.i18nText("BI-Transparent_Color")
});
this.transparent.on(BI.Checkbox.EVENT_CHANGE, function () {
if (this.isSelected()) {
self.lastColor = self.getValue();
self.setValue("transparent");
} else {
self.setValue(self.lastColor || "#000000");
}
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {
self.colorShow.element.css("background-color", self.getValue());
self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE);
}
});
BI.createWidget({
type: "bi.htape",
element: this,
@ -80,21 +98,21 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
}, {
el: RGB[0],
lgap: 10,
width: 20
width: 16
}, {
el: this.R,
width: 32
}, {
el: RGB[1],
lgap: 10,
width: 20
width: 16
}, {
el: this.G,
width: 32
}, {
el: RGB[2],
lgap: 10,
width: 20
width: 16
}, {
el: this.B,
width: 32
@ -103,18 +121,33 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
type: "bi.center_adapt",
items: [this.none]
},
width: 20
width: 18
}, {
el: {
type: "bi.center_adapt",
items: [this.transparent]
},
width: 18
}]
})
},
setValue: function (color) {
if (color === "transparent") {
this.transparent.setSelected(true);
this.none.setSelected(false);
this.R.setValue("");
this.G.setValue("");
this.B.setValue("");
return;
}
if (!color) {
color = "";
this.none.setSelected(true);
} else {
this.none.setSelected(false);
}
this.transparent.setSelected(false);
this.colorShow.element.css("background-color", color);
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));
this.R.setValue(BI.isNull(json.r) ? "" : json.r);
@ -123,6 +156,9 @@ BI.ColorPickerEditor = BI.inherit(BI.Widget, {
},
getValue: function () {
if (this.transparent.isSelected()) {
return "transparent";
}
return BI.DOM.rgb2hex(BI.DOM.json2rgb({
r: this.R.getValue(),
g: this.G.getValue(),

6
src/case/combo/bubblecombo/combo.bubble.js

@ -129,6 +129,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
default:
break;
}
this.triangle && this.triangle.destroy();
this.triangle = BI.createWidget(op, {
type: "bi.center_adapt",
cls: "button-combo-triangle-wrapper",
@ -189,6 +190,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
this.combo.getView() && this.combo.getView().hideLine();
},
@ -201,10 +203,6 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
this.combo && this.combo.showView();
},
hasView: function () {
return BI.isNotNull(this.combo.getView());
},
isViewVisible: function () {
return this.combo.isViewVisible();
}

4
src/case/layer/pane.list.js

@ -127,10 +127,6 @@ BI.ListPane = BI.inherit(BI.Pane, {
this.button_group.empty();
},
doBehavior: function () {
this.button_group.doBehavior.apply(this.button_group, arguments);
},
setNotSelectedValue: function () {
this.button_group.setNotSelectedValue.apply(this.button_group, arguments);
},

4
src/case/list/list.select.js

@ -164,10 +164,6 @@ BI.SelectList = BI.inherit(BI.Widget, {
this.list.element.css({"max-height": h - toolHeight + "px"})
},
doBehavior: function () {
this.list.doBehavior.apply(this.list, arguments);
},
setNotSelectedValue: function () {
this.list.setNotSelectedValue.apply(this.list, arguments);
this._checkAllSelected();

4
src/case/loader/loader.lazy.js

@ -54,10 +54,6 @@ BI.LazyLoader = BI.inherit(BI.Widget, {
this.loader.empty();
},
doBehavior: function () {
this.loader.doBehavior();
},
setNotSelectedValue: function () {
this.loader.setNotSelectedValue.apply(this.loader, arguments);
},

4
src/case/loader/loader.list.js

@ -148,10 +148,6 @@ BI.ListLoader = BI.inherit(BI.Widget, {
});
},
doBehavior: function () {
this.button_group.doBehavior.apply(this.button_group, arguments);
},
setNotSelectedValue: function () {
this.button_group.setNotSelectedValue.apply(this.button_group, arguments);
},

7
src/case/loader/sort.list.js

@ -114,6 +114,9 @@ BI.SortList = BI.inherit(BI.Widget, {
},
populate: function (items) {
if (items) {
arguments[0] = this._formatItems(items);
}
this.loader.populate.apply(this.loader, arguments);
},
@ -121,10 +124,6 @@ BI.SortList = BI.inherit(BI.Widget, {
this.loader.empty();
},
doBehavior: function () {
this.loader.doBehavior.apply(this.loader, arguments);
},
setNotSelectedValue: function () {
this.loader.setNotSelectedValue.apply(this.loader, arguments);
},

5
src/case/pager/pager.all.count.js

@ -26,9 +26,10 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
vgap: 0,
value: o.curr,
errorText: BI.i18nText("BI-Please_Input_Positive_Integer"),
width: 30,
width: 35,
height: 20
});
this.pager = BI.createWidget({
type: "bi.pager",
width: 36,
@ -114,7 +115,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
BI.createWidget({
type: "bi.center_adapt",
element: this,
columnSize: ["", 30, 40, 36],
columnSize: ["", 35, 40, 36],
items: [count, this.editor, this.allPages, this.pager]
})
},

18
src/case/segment/button.segment.js

@ -7,17 +7,17 @@
*/
BI.SegmentButton = BI.inherit(BI.BasicButton, {
_defaultConfig: function() {
_defaultConfig: function () {
var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend( conf, {
baseCls : (conf.baseCls ||"")+' bi-segment-button bi-list-item-active',
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + ' bi-segment-button bi-list-item-active',
shadow: true,
readonly: true,
hgap: 10
hgap: 5
})
},
_init:function() {
_init: function () {
BI.SegmentButton.superclass._init.apply(this, arguments);
var opts = this.options, self = this;
//if (BI.isNumber(opts.height) && BI.isNull(opts.lineHeight)) {
@ -26,7 +26,7 @@ BI.SegmentButton = BI.inherit(BI.BasicButton, {
this.text = BI.createWidget({
type: "bi.label",
element: this,
height: opts.height-2,
height: opts.height - 2,
whiteSpace: opts.whiteSpace,
text: opts.text,
value: opts.value,
@ -34,16 +34,16 @@ BI.SegmentButton = BI.inherit(BI.BasicButton, {
})
},
setSelected: function(){
setSelected: function () {
BI.SegmentButton.superclass.setSelected.apply(this, arguments);
},
setText : function(text) {
setText: function (text) {
BI.SegmentButton.superclass.setText.apply(this, arguments);
this.text.setText(text);
},
destroy : function() {
destroy: function () {
BI.SegmentButton.superclass.destroy.apply(this, arguments);
}
});

2
src/case/table/table.dynamicsummarylayertree.js

@ -160,7 +160,7 @@ BI.DynamicSummaryLayerTreeTable = BI.inherit(BI.Widget, {
_recomputeColumnSize: function () {
var o = this.options;
o.regionColumnSize = this.table.getRegionColumnSize();
var columnSize = this.table.getColumnSize();
var columnSize = this.table.getColumnSize().slice();
if (o.freezeCols.length > 1) {
for (var i = 0; i < o.freezeCols.length - 1; i++) {
columnSize.splice(1, 0, 0);

4
src/case/tree/tree.level.js

@ -108,10 +108,6 @@ BI.LevelTree = BI.inherit(BI.Widget, {
this.tree.populate(items);
},
doBehavior: function () {
this.tree.doBehavior.apply(this.tree, arguments);
},
setValue: function (v) {
this.tree.setValue(v);
},

1
src/case/trigger/trigger.editor.js

@ -55,6 +55,7 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
}, {
el: {
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: o.triggerWidth
},
width: o.triggerWidth

1
src/case/trigger/trigger.text.js

@ -31,6 +31,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
cls: "bi-border-left",
width: c.triggerWidth
});

71
src/component/treevaluechooser/abstract.treevaluechooser.js

@ -80,7 +80,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
var node = self._getTreeNode(parentValues, k);
var newParents = BI.clone(parentValues);
newParents.push(node.value);
createOneJson(node, BI.last(parentValues), getCount(selected[k], newParents));
createOneJson(node, node.parent && node.parent.id, getCount(selected[k], newParents));
doCheck(newParents, node, selected[k]);
})
}
@ -126,22 +126,34 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
function dealWithSelectedValues(selectedValues) {
var p = parentValues.concat(notSelectedValue);
//存储的值中存在这个值就把它删掉
//例如选中了中国-江苏-南京, 取消中国或江苏或南京
if (canFindKey(selectedValues, p)) {
//如果搜索的值在父亲链中
if (isSearchValueInParent(p)) {
//例如选中了 中国-江苏, 搜索江苏, 取消江苏
//例如选中了 中国-江苏, 搜索江苏, 取消中国
self._deleteNode(selectedValues, p);
} else {
var searched = [];
var finded = search(parentValues, notSelectedValue, [], searched);
if (finded && BI.isNotEmptyArray(searched)) {
BI.each(searched, function (i, arr) {
var node = self._getNode(selectedValues, arr);
if (node) {
//例如选中了 中国-江苏-南京,搜索南京,取消中国
self._deleteNode(selectedValues, arr);
} else {
//例如选中了 中国-江苏,搜索南京,取消中国
expandSelectedValue(selectedValues, arr, BI.last(arr));
}
})
}
}
}
//存储的值中不存在这个值,但父亲节点是全选的情况
//例如选中了中国-江苏,取消南京
//important 选中了中国-江苏,取消了江苏,但是搜索的是南京
if (isChild(selectedValues, p)) {
var result = [], finded = false;
//如果parentValues中有匹配的值,说明搜索结果不在当前值下
@ -154,37 +166,62 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
}
if (finded === true) {
//去掉点击的节点之后的结果集
expandSelectedValue(selectedValues, p, notSelectedValue);
//添加去掉搜索的结果集
if (result.length > 0) {
BI.each(result, function (i, strs) {
self._buildTree(selectedValues, strs);
})
}
}
}
}
function expandSelectedValue(selectedValues, parents, notSelectedValue) {
var next = selectedValues;
BI.each(p, function (i, v) {
var childrenCount = [];
var path = [];
//去掉点击的节点之后的结果集
BI.some(parents, function (i, v) {
var t = next[v];
if (t == null) {
if (i === 0) {
return true;
}
if (BI.isEmpty(next)) {
var split = p.slice(0, i);
var split = parents.slice(0, i);
var expanded = self._getChildren(split);
path.push(split);
childrenCount.push(expanded.length);
//如果只有一个值且取消的就是这个值
if (i === parents.length - 1 && expanded.length === 1 && expanded[0] === notSelectedValue) {
for (var j = childrenCount.length - 1; j >= 0; j--) {
if (childrenCount[j] === 1) {
self._deleteNode(selectedValues, path[j]);
} else {
break;
}
}
} else {
BI.each(expanded, function (m, child) {
if (i === p.length - 1 && child.value === notSelectedValue) {
if (i === parents.length - 1 && child.value === notSelectedValue) {
return true;
}
next[child.value] = {};
});
}
next = next[v];
} else {
next = {};
next[v] = {};
return true;
// next = {};
// next[v] = {};
}
} else {
next = t;
}
});
if (result.length > 0) {
BI.each(result, function (i, strs) {
self._buildTree(selectedValues, strs);
})
}
}
}
}
function search(parents, current, result, searched) {
@ -551,16 +588,18 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
var name = values[values.length - 1];
var p = values.slice(0, values.length - 1);
var pNode = this._getNode(selectedValues, p);
if (pNode[name]) {
if (pNode != null && pNode[name]) {
delete pNode[name];
//递归删掉空父节点
while (p.length > 0 && BI.isEmpty(pNode)) {
name = p[p.length - 1];
p = p.slice(0, p.length - 1);
pNode = this._getNode(selectedValues, p);
if (pNode != null) {
delete pNode[name];
}
}
}
},
_buildTree: function (jo, values) {

4
src/config.js

@ -87,4 +87,8 @@ $(function () {
return ob;
}
});
//IE8下滚动条用原生的
if (BI.isIE9Below()) {
BI.GridTableScrollbar.SIZE = 18;
}
});

2
src/core/alias.js

@ -144,7 +144,7 @@
if (numReg) {
var num = numReg[0];
var orilen = num.length;
var newnum = BI.parseInt(num) + 1 + '';
var newnum = parseInt(num) + 1 + '';
//进位到整数部分
if (newnum.length > orilen) {
newnum = newnum.substr(1);

26
src/core/behavior/behavior.highlight.js

@ -5,27 +5,35 @@
* @extends BI.Behavior
*/
BI.HighlightBehavior = BI.inherit(BI.Behavior, {
_defaultConfig: function() {
return BI.extend(BI.HighlightBehavior.superclass._defaultConfig.apply(this, arguments), {
});
_defaultConfig: function () {
return BI.extend(BI.HighlightBehavior.superclass._defaultConfig.apply(this, arguments), {});
},
_init : function() {
_init: function () {
BI.HighlightBehavior.superclass._init.apply(this, arguments);
},
doBehavior: function(items){
doBehavior: function (items) {
var args = Array.prototype.slice.call(arguments, 1),
o = this.options;
BI.each(items, function(i, item){
if(item instanceof BI.Single) {
if (o.rule(item.getValue(), item)) {
BI.each(items, function (i, item) {
if (item instanceof BI.Single) {
var rule = o.rule(item.getValue(), item);
function doBe(run) {
if (run === true) {
item.doHighLight.apply(item, args);
} else {
item.unHighLight.apply(item, args);
}
}
if (BI.isFunction(rule)) {
rule(doBe);
} else {
doBe(rule);
}
} else {
item.doBehavior.apply(item, args);
}

21
src/core/controller/router.floatbox.js

@ -45,7 +45,10 @@ BI.FloatBoxRouter = BI.inherit(BI.WRouter, {
var view = this.createView(url, data, viewData, context);
isValid && context.model.addChild(modelData, view.model);
view.listenTo(view.model, "destroy", function () {
self.remove(url);
self.remove(url, context);
});
context.on(BI.Events.UNMOUNT, function () {
self.remove(url, context);
});
this.store[url].populate(view);
this.views[url] = view;
@ -54,19 +57,7 @@ BI.FloatBoxRouter = BI.inherit(BI.WRouter, {
BI.nextTick(function () {
self.close(url);
// view.end();
var t = void 0, isNew = false, keys;
if (isValid) {
keys = modelData.split('.');
BI.each(keys, function (i, k) {
if (i === 0) {
t = context.model.get(k) || (isNew = true);
} else {
t = t[k] || (isNew = true);
}
})
}
isNew && context.model.removeChild(modelData);
!isNew && (context.listenEnd.apply(context, isValid ? keys : [modelData]) !== false) && context.populate();
(context.listenEnd.apply(context, isValid ? modelData.split('.') : [modelData]) !== false) && context.populate();
}, 30)
}).on("change:" + view.cid, _.bind(context.notifyParent, context))
}
@ -84,7 +75,7 @@ BI.FloatBoxRouter = BI.inherit(BI.WRouter, {
remove: function (url, context) {
url = context.rootURL + "/" + url;
if(this.controller){
if (this.controller) {
this.controller.remove(url);
delete this.store[url];
this.views[url] && this.views[url].model.destroy();

6
src/core/events.js

@ -53,6 +53,12 @@ _.extend(BI, {
*/
DESTROY: '_DESTROY',
/**
* @static
* @property 取消挂载事件
*/
UNMOUNT: '_UNMOUNT',
/**
* @static
* @property 清除选择

2
src/core/func/dom.js

@ -19,7 +19,7 @@ BI.extend(jQuery.fn, {
* @private
*/
__textKeywordMarked__: function (text, keyword, py) {
if (!BI.isKey(keyword)) {
if (!BI.isKey(keyword) || (text + "").length > 100) {
return this.text((text + "").replaceAll(" ", " "));
}
keyword = keyword + "";

14
src/core/func/function.js

@ -104,7 +104,7 @@ BI.extend(BI.DOM, {
},
isColor: function (color) {
return this.isRGBColor(color) || this.isHexColor(color);
return color && (this.isRGBColor(color) || this.isHexColor(color));
},
isRGBColor: function (color) {
@ -122,12 +122,12 @@ BI.extend(BI.DOM, {
},
isDarkColor: function (hex) {
if (!hex) {
if (!hex || !this.isHexColor(hex)) {
return false;
}
var rgb = this.rgb2json(this.hex2rgb(hex));
var grayLevel = Math.round(rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114);
if (grayLevel < 140) {
if (grayLevel < 192/**网上给的是140**/) {
return true;
}
return false;
@ -135,7 +135,7 @@ BI.extend(BI.DOM, {
//获取对比颜色
getContrastColor: function (color) {
if (!color) {
if (!color || !this.isColor(color)) {
return "";
}
if (this.isDarkColor(color)) {
@ -162,6 +162,9 @@ BI.extend(BI.DOM, {
if (!rgbColour) {
return {};
}
if (!this.isRGBColor(rgbColour)) {
return {};
}
var rgbValues = rgbColour.match(/\d+(\.\d+)?/g);
return {
r: BI.parseInt(rgbValues[0]),
@ -207,6 +210,9 @@ BI.extend(BI.DOM, {
if (!color) {
return "";
}
if (!this.isHexColor(color)) {
return color;
}
var tempValue = "rgb(", colorArray;
if (color.length === 7) {

4
src/core/model.js

@ -203,6 +203,10 @@ BI.Model = BI.inherit(BI.M, {
var copy = BI.UUID(), newKeys = BI.clone(keys);
keys.length > 1 ? newKeys.unshift(BI.deepClone(p[keys[keys.length - 1]])) : newKeys.unshift(BI.deepClone(g));
var backup = self.similar.apply(self, newKeys);
if (BI.isKey(backup.id)) {
copy = backup.id;
delete backup.id;
}
keys.length > 1 ? (p[copy] = backup, self[sset](keys[0], g, {silent: true})) : self[sset](copy, backup, {silent: true});
keys.unshift(copy);
!BI.has(self._tmp, keys[0]) && self.parent && self.parent._change(self);

15
src/core/utils/detectElementResize.js

@ -18,10 +18,10 @@
_window = this
}
var attachEvent = typeof document !== 'undefined' && document.attachEvent;
var addEventListener = typeof document !== 'undefined' && document.addEventListener;
var stylesCreated = false;
if (!attachEvent) {
if (addEventListener) {
var requestFrame = (function () {
var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame ||
function (fn) {
@ -128,8 +128,7 @@
}
var addResizeListener = function (element, fn) {
if (attachEvent) element.attachEvent('onresize', fn);
else {
if (addEventListener){
if (!element.__resizeTriggers__) {
if (getComputedStyle(element).position === 'static') element.style.position = 'relative';
createStyles();
@ -149,17 +148,21 @@
});
}
element.__resizeListeners__.push(fn);
} else {
element.attachEvent('onresize', fn);
}
};
var removeResizeListener = function (element, fn) {
if (attachEvent) element.detachEvent('onresize', fn);
else {
if (addEventListener) {
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
if (!element.__resizeListeners__.length) {
element.removeEventListener('scroll', scrollListener, true);
element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
}
} else {
element.detachEvent('onresize', fn);
}
};

2
src/core/var.js

@ -62,7 +62,7 @@ _.extend(BI, {
Horizontal: "horizontal"
},
Selection: {
Default: -999,
Default: -2,
None: -1,
Single: 0,
Multi: 1,

6
src/core/view.js

@ -10,6 +10,8 @@ BI.View = BI.inherit(BI.V, {
created: null,
beforeDestroyed: null,
destroyed: null,
_init: function () {
@ -499,18 +501,22 @@ BI.View = BI.inherit(BI.V, {
},
_unMount: function () {
this.beforeDestroyed && this.beforeDestroyed();
BI.each(this._cardLayouts, function (name, card) {
card && card._unMount();
});
delete this._cardLayouts;
delete this._cards;
this.destroyed && this.destroyed();
this.trigger(BI.Events.UNMOUNT);
this.off();
},
_destroy: function () {
var self = this;
BI.each(this._cardLayouts, function (name, card) {
card && card._unMount();
BI.Layers.remove(name + self.cid);
});
delete this._cardLayouts;
delete this._cards;

23
src/core/widget.js

@ -37,6 +37,8 @@ BI.Widget = BI.inherit(BI.OB, {
update: function () {
},
beforeDestroyed: null,
destroyed: null,
_init: function () {
@ -198,7 +200,7 @@ BI.Widget = BI.inherit(BI.OB, {
}
//递归将所有子组件使能
BI.each(this._children, function (i, child) {
child._setEnable && child._setEnable(enable);
!child._manualSetEnable && child._setEnable && child._setEnable(enable);
});
},
@ -210,7 +212,7 @@ BI.Widget = BI.inherit(BI.OB, {
}
//递归将所有子组件使有效
BI.each(this._children, function (i, child) {
child._setValid && child._setValid(valid);
!child._manualSetValid && child._setValid && child._setValid(valid);
});
},
@ -223,6 +225,7 @@ BI.Widget = BI.inherit(BI.OB, {
},
setEnable: function (enable) {
this._manualSetEnable = true;
this._setEnable(enable);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
@ -244,7 +247,7 @@ BI.Widget = BI.inherit(BI.OB, {
},
setValid: function (valid) {
this.options.invalid = !valid;
this._manualSetValid = true;
this._setValid(valid);
if (valid === true) {
this.element.removeClass("base-invalid invalid");
@ -253,6 +256,14 @@ BI.Widget = BI.inherit(BI.OB, {
}
},
doBehavior: function () {
var args = arguments;
//递归将所有子组件使有效
BI.each(this._children, function (i, child) {
child.doBehavior && child.doBehavior.apply(child, args);
});
},
getWidth: function () {
return this.options.width;
},
@ -387,18 +398,20 @@ BI.Widget = BI.inherit(BI.OB, {
},
__d: function () {
this.beforeDestroyed && this.beforeDestroyed();
BI.each(this._children, function (i, widget) {
widget._unMount && widget._unMount();
});
this._children = {};
this._parent = null;
this._isMounted = false;
this.destroyed && this.destroyed();
},
_unMount: function () {
this.__d();
this.fireEvent(BI.Events.UNMOUNT);
this.purgeListeners();
this.destroyed && this.destroyed();
},
isolate: function () {
@ -418,14 +431,12 @@ BI.Widget = BI.inherit(BI.OB, {
_destroy: function () {
this.__d();
this.destroyed && this.destroyed();
this.element.destroy();
this.purgeListeners();
},
destroy: function () {
this.__d();
this.destroyed && this.destroyed();
this.element.destroy();
this.fireEvent(BI.Events.DESTROY);
this.purgeListeners();

7
src/core/wrapper/layout/adapt/float.center.js

@ -29,15 +29,20 @@ BI.FloatCenterAdaptLayout = BI.inherit(BI.Layout, {
},
mounted: function () {
var self = this;
var width = this.left.element.outerWidth(),
height = this.left.element.outerHeight();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.center_adapt",
element: this,
items: [this.left]
});
this.removeWidget(this.container);
},
stroke: function (items) {

7
src/core/wrapper/layout/adapt/float.horizontal.js

@ -24,15 +24,20 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
},
mounted: function () {
var self = this;
var width = this.left.element.width(),
height = this.left.element.height();
this.left.element.width(width).height(height).css("float", "none");
BI.remove(this._children, function (i, wi) {
if (wi === self.container) {
delete self._children[i];
}
});
BI.createWidget({
type: "bi.horizontal_auto",
element: this,
items: [this.left]
});
this.removeWidget(this.container);
},
_addElement: function (i, item) {

3
src/css/base/colorchooser/colorchooser.trigger.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-chooser-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;

3
src/css/base/colorchooser/colorpicker/button.colorpicker.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-picker-button .color-picker-button-mask {
border: 1px solid #1a1a1a;
}

3
src/css/base/colorchooser/colorpicker/editor.colorpicker.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-picker-editor .color-picker-editor-display {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;

3
src/css/base/combo/combo.bubble.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important;
}

3
src/css/base/combo/popup.bubble.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble-popup-view {
-webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);

1
src/css/base/dom.css

@ -1,3 +1,2 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/

3
src/css/base/editor/editor.adapt.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-adapt-editor .adapt-editor-text {
font-size: 14px;
}

3
src/css/base/editor/editor.search.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/
.bi-search-editor .close-font {
font-size: 20px;

3
src/css/base/editor/editor.search.small.css

@ -1,6 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/
.bi-small-search-editor .bi-editor {
font-size: 12px;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save