Browse Source

Merge pull request #53 in FUI/fineui from ~GUY/fineui:master to master

* commit 'a3145b714478eeaf336a367e99c6218cadd4aa1e':
  add
  add
  边框
  add
  add
  add
  codeeditor
  add
  add
  update
  add
  add
  表格加入横向滚动事件
  给code editor加一个标红规则
  add
  add
es6
guy 7 years ago
parent
commit
b5b9461ae9
  1. 63
      bi/base.css
  2. 38
      bi/base.js
  3. 71
      bi/case.js
  4. 10
      bi/core.css
  5. 12
      bi/core.js
  6. 57
      bi/widget.css
  7. 78
      bi/widget.js
  8. 1
      demo/css/face.css
  9. 1
      demo/css/index.css
  10. 3
      demo/css/main.css
  11. 1
      demo/css/north.css
  12. 1
      demo/css/preview.css
  13. 1
      demo/css/west.css
  14. 4
      demo/js/north.js
  15. 2
      demo/less/main.less
  16. 63
      docs/base.css
  17. 38
      docs/base.js
  18. 71
      docs/case.js
  19. 10
      docs/core.css
  20. 12
      docs/core.js
  21. 8
      docs/demo.css
  22. 4
      docs/demo.js
  23. 4
      docs/resource.css
  24. 57
      docs/widget.css
  25. 78
      docs/widget.js
  26. 2
      src/base/formula/formulaeditor.js
  27. 4
      src/base/foundation/message.js
  28. 28
      src/base/single/editor/editor.code.js
  29. 4
      src/base/single/editor/editor.textarea.js
  30. 5
      src/case/colorchooser/colorchooser.trigger.js
  31. 48
      src/case/colorchooser/colorpicker/editor.colorpicker.js
  32. 18
      src/case/segment/button.segment.js
  33. 74
      src/component/treevaluechooser/abstract.treevaluechooser.js
  34. 12
      src/core/func/function.js
  35. 1
      src/css/base/colorchooser/colorchooser.trigger.css
  36. 1
      src/css/base/colorchooser/colorpicker/button.colorpicker.css
  37. 1
      src/css/base/colorchooser/colorpicker/editor.colorpicker.css
  38. 1
      src/css/base/combo/combo.bubble.css
  39. 1
      src/css/base/combo/popup.bubble.css
  40. 1
      src/css/base/dom.css
  41. 1
      src/css/base/editor/editor.adapt.css
  42. 1
      src/css/base/editor/editor.search.css
  43. 1
      src/css/base/editor/editor.search.small.css
  44. 1
      src/css/base/editor/editor.sign.initial.css
  45. 7
      src/css/base/formula/codemirror.css
  46. 1
      src/css/base/foundation/bi.message.css
  47. 1
      src/css/base/layer/layer.multiselect.css
  48. 1
      src/css/base/layer/panel.css
  49. 1
      src/css/base/pager/pager.all.count.css
  50. 1
      src/css/base/pager/pager.css
  51. 1
      src/css/base/pager/pager.direction.css
  52. 1
      src/css/base/segment/button.segment.css
  53. 1
      src/css/base/segment/segment.css
  54. 1
      src/css/base/single/bar/bar.css
  55. 1
      src/css/base/single/button/button.css
  56. 1
      src/css/base/single/button/item.multiselect.css
  57. 1
      src/css/base/single/button/item.singleselect.icontext.css
  58. 1
      src/css/base/single/button/item.singleselectradio.css
  59. 1
      src/css/base/single/button/item.texticon.css
  60. 1
      src/css/base/single/button/listitem.css
  61. 1
      src/css/base/single/editor/editor.css
  62. 1
      src/css/base/single/editor/editor.multifile.css
  63. 1
      src/css/base/single/editor/editor.shelter.css
  64. 1
      src/css/base/single/editor/editor.sign.css
  65. 1
      src/css/base/single/editor/editor.state.css
  66. 1
      src/css/base/single/editor/editor.state.simple.css
  67. 1
      src/css/base/single/editor/editor.textarea.css
  68. 1
      src/css/base/single/input/file.css
  69. 1
      src/css/base/single/input/input.css
  70. 1
      src/css/base/single/single.css
  71. 1
      src/css/base/single/text.css
  72. 1
      src/css/base/single/tip/tip.bubble.css
  73. 1
      src/css/base/single/tip/tip.css
  74. 1
      src/css/base/single/tip/tip.toast.css
  75. 1
      src/css/base/single/tip/tip.tooltip.css
  76. 1
      src/css/base/table/table.collection.cell.css
  77. 1
      src/css/base/table/table.collection.quick.css
  78. 1
      src/css/base/table/table.css
  79. 1
      src/css/base/table/table.grid.cell.css
  80. 1
      src/css/base/table/table.grid.scrollbar.css
  81. 1
      src/css/base/table/table.resizable.cell.css
  82. 1
      src/css/base/table/table.resizable.css
  83. 1
      src/css/base/table/table.tree.css
  84. 1
      src/css/base/tree/branch.tree.css
  85. 1
      src/css/base/trigger/trigger.css
  86. 1
      src/css/base/trigger/trigger.editor.css
  87. 1
      src/css/base/trigger/trigger.icon.css
  88. 1
      src/css/base/trigger/trigger.selecttext.css
  89. 1
      src/css/base/trigger/trigger.selecttextsmall.css
  90. 1
      src/css/base/view/floatboxview.css
  91. 1
      src/css/base/view/popupview.css
  92. 1
      src/css/bibase.css
  93. 1
      src/css/core/normal.css
  94. 1
      src/css/core/utils/common.css
  95. 1
      src/css/core/utils/overflow.css
  96. 1
      src/css/core/utils/pos.css
  97. 1
      src/css/core/utils/sizing.css
  98. 1
      src/css/core/wrapper/inline.center.css
  99. 1
      src/css/core/wrapper/inline.vertical.css
  100. 1
      src/css/resource/app.css
  101. Some files were not shown because too many files have changed in this diff Show More

63
bi/base.css

@ -1,4 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-chooser-trigger {
@ -9,7 +8,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-color-picker-button .color-picker-button-mask {
@ -18,7 +16,6 @@
.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 {
@ -29,7 +26,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 {
@ -67,7 +63,6 @@
border-right: 6px solid transparent;
border-bottom: 6px solid #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble-popup-view {
@ -75,16 +70,13 @@
-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******************/
@ -94,7 +86,6 @@
.bi-search-editor .search-font {
font-size: 20px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/
@ -113,13 +104,11 @@
.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 */
@ -129,12 +118,6 @@
cursor: text;
width: 100%;
height: 100%;
color: #1a1a1a;
background-color: #ffffff;
}
.bi-theme-dark .CodeMirror {
color: #ffffff;
background-color: #242640;
}
/* PADDING */
.CodeMirror-lines {
@ -599,7 +582,6 @@ li.CodeMirror-hint-active {
background: #08f;
color: white;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-message-title {
@ -621,14 +603,12 @@ 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 {
@ -640,7 +620,6 @@ li.CodeMirror-hint-active {
cursor: text;
font-size: 14px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-all-count-pager .all-pager-prev {
@ -649,7 +628,6 @@ li.CodeMirror-hint-active {
.bi-all-count-pager .all-pager-next {
font-size: 16px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-pager .page-item {
@ -657,7 +635,6 @@ li.CodeMirror-hint-active {
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-direction-pager .direction-pager-prev {
@ -666,10 +643,8 @@ li.CodeMirror-hint-active {
.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 +679,8 @@ 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,32 +834,25 @@ 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 {
@ -895,25 +861,20 @@ li.CodeMirror-hint-active {
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,7 +888,6 @@ li.CodeMirror-hint-active {
.bi-textarea-editor .textarea-editor-content {
border: none;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-file {
@ -935,7 +895,6 @@ li.CodeMirror-hint-active {
filter: alpha(opacity=0);
z-index: 2;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-input {
@ -954,10 +913,8 @@ li.CodeMirror-hint-active {
border: none;
color: #e85050 !important;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-text {
@ -967,7 +924,6 @@ li.CodeMirror-hint-active {
white-space: nowrap;
word-break: break-word;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble {
@ -980,13 +936,11 @@ 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 {
@ -1003,7 +957,6 @@ li.CodeMirror-hint-active {
background: #fddddd;
color: #e85050;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-tooltip {
@ -1023,7 +976,6 @@ li.CodeMirror-hint-active {
color: #e85050;
border: 1px solid #f4cbcb;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-collection-table-cell {
@ -1048,7 +1000,6 @@ 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 {
@ -1056,7 +1007,6 @@ li.CodeMirror-hint-active {
overflow-x: hidden !important;
overflow-y: hidden !important;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-table > .first-col {
@ -1137,7 +1087,6 @@ li.CodeMirror-hint-active {
border-top: 1px solid #525466;
border-left: 1px solid #525466;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-grid-table-cell {
@ -1162,7 +1111,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 {
@ -1278,7 +1226,6 @@ li.CodeMirror-hint-active {
bottom: 0;
position: absolute;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-resizable-table-cell .resizable-table-cell-resizer-container {
@ -1292,7 +1239,6 @@ li.CodeMirror-hint-active {
.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob {
background-color: #58cc7d;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-resizable-table .resizable-table-resizer {
@ -1311,28 +1257,22 @@ 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 {
@ -1340,7 +1280,6 @@ li.CodeMirror-hint-active {
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-small-select-text-trigger {
@ -1348,10 +1287,8 @@ li.CodeMirror-hint-active {
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/**********BI.BIListView*************/

38
bi/base.js

@ -14254,7 +14254,7 @@ BI.FormulaCollections = ["abs","ABS","acos","ACOS","acosh","ACOSH","add2array","
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: {},
@ -14492,11 +14492,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");
@ -17706,7 +17706,7 @@ BI.shortcut("bi.text_node", BI.TextNode);/**
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: ""
});
@ -17780,16 +17780,20 @@ BI.CodeEditor = BI.inherit(BI.Single, {
this.editor.setOption("readOnly", b === true ? false : "nocursor")
},
insertParam: function(param){
insertParam: function (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';
}
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();
},
@ -17801,6 +17805,7 @@ 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);
num += 3;
@ -17832,7 +17837,20 @@ BI.CodeEditor = BI.inherit(BI.Single, {
})
},
refresh: function(){
focus: function () {
this.editor.focus();
},
setStyle: function (style) {
this.style = style;
this.element.css(style);
},
getStyle: function () {
return this.style;
},
refresh: function () {
var self = this;
BI.nextTick(function () {
self.editor.refresh();
@ -18260,7 +18278,7 @@ BI.shortcut("bi.multifile_editor", BI.MultifileEditor);/**
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: ''
});
},
@ -18272,7 +18290,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
tagName: "textarea",
width: "100%",
height: "100%",
cls: "textarea-editor-content display-block bi-card"
cls: "textarea-editor-content display-block"
});
this.content.element.css({"resize": "none"});
BI.createWidget({

71
bi/case.js

@ -3940,7 +3940,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
})
},
@ -3948,7 +3948,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"
});
var down = BI.createWidget({
@ -4274,7 +4275,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) {
@ -4290,7 +4291,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()) {
@ -4305,6 +4307,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,
@ -4314,21 +4333,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
@ -4337,18 +4356,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);
@ -4357,6 +4391,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(),
@ -9896,17 +9933,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)) {
@ -9915,7 +9952,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,
@ -9923,16 +9960,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);
}
});

10
bi/core.css

@ -1,4 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
html,
@ -2951,7 +2950,6 @@ i {
-webkit-animation-name: slideOutUp;
animation-name: slideOutUp;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.base-disabled {
@ -3505,7 +3503,6 @@ i {
cursor: move;
}
/*****************cursor*****************/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.y-overflow-auto {
@ -3546,7 +3543,6 @@ i {
overflow-y: hidden;
white-space: nowrap;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.display-block {
@ -3570,7 +3566,6 @@ i {
.horizon-left {
text-align: left;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*类似ie6的盒子模型 可以在有百分比的时候加border 支持到ie8*/
@ -3900,7 +3895,6 @@ i {
min-height: 100%;
float: left;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-inline-center-adapt-layout:after {
@ -3910,7 +3904,6 @@ i {
vertical-align: middle;
content: ' ';
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-inline-vertical-adapt-layout:after {
@ -3920,7 +3913,6 @@ i {
vertical-align: middle;
content: ' ';
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-theme-dark {
@ -3930,9 +3922,7 @@ i {
.bi-theme-dark .bi-input {
color: #ffffff;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/

12
bi/core.js

@ -16822,7 +16822,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) {
@ -16840,7 +16840,7 @@ BI.extend(BI.DOM, {
},
isDarkColor: function (hex) {
if (!hex) {
if (!hex || !this.isHexColor(hex)) {
return false;
}
var rgb = this.rgb2json(this.hex2rgb(hex));
@ -16853,7 +16853,7 @@ BI.extend(BI.DOM, {
//获取对比颜色
getContrastColor: function (color) {
if (!color) {
if (!color || !this.isColor(color)) {
return "";
}
if (this.isDarkColor(color)) {
@ -16880,6 +16880,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]),
@ -16925,6 +16928,9 @@ BI.extend(BI.DOM, {
if (!color) {
return "";
}
if (!this.isHexColor(color)) {
return color;
}
var tempValue = "rgb(", colorArray;
if (color.length === 7) {

57
bi/widget.css

@ -1,7 +1,5 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-arrangement .arrangement-helper {
@ -40,7 +38,6 @@
z-index: 1000000001;
background: #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-arrangement-droppable {
@ -112,10 +109,8 @@
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-date-trigger {
@ -123,19 +118,15 @@
-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 +135,17 @@
.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 +162,8 @@
background-color: #191b2b;
color: #999999;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-fine-tuning-number-editor {
@ -187,7 +171,6 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-interactive-arrangement .interactive-arrangement-dragtag-line {
@ -197,13 +180,10 @@
.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 +191,20 @@
-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 +212,45 @@
-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 +294,8 @@
.bi-numerical-interval.number-error .bi-input {
color: #e85050;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-page-table-cell {
@ -344,22 +306,18 @@
-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 {
@ -367,7 +325,6 @@
min-width: 80px;
max-width: 220px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-preview-table {
@ -386,7 +343,6 @@
.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 {
@ -395,13 +351,10 @@
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 +362,8 @@
-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,7 +375,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 {
@ -450,7 +400,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 {
@ -476,10 +425,8 @@
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,13 +452,10 @@
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 {
@ -529,7 +473,6 @@
.bi-theme-dark .bi-year-popup .year-popup-navigation > .first-element {
border-left: none;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-year-trigger {

78
bi/widget.js

@ -4860,7 +4860,7 @@ BI.shortcut('bi.date_triangle_trigger', BI.DateTriangleTrigger);/**
BI.DateCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-combo",
baseCls: "bi-date-combo bi-border",
height: 30
});
},
@ -4919,7 +4919,7 @@ BI.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigge
_defaultConfig: function () {
return BI.extend(BI.DateTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-date-trigger bi-border",
extraCls: "bi-date-trigger",
min: '1900-01-01', //最小日期
max: '2099-12-31', //最大日期
height: 25
@ -17319,7 +17319,7 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree
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]);
})
}
@ -17365,22 +17365,34 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree
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) {
self._deleteNode(selectedValues, 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中有匹配的值,说明搜索结果不在当前值下
@ -17393,29 +17405,9 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree
}
if (finded === true) {
var next = selectedValues;
BI.each(p, function (i, v) {
var t = next[v];
if (t == null) {
if (BI.isEmpty(next)) {
var split = p.slice(0, i);
var expanded = self._getChildren(split);
BI.each(expanded, function (m, child) {
if (i === p.length - 1 && child.value === notSelectedValue) {
return true;
}
next[child.value] = {};
});
next = next[v];
} else {
next = {};
next[v] = {};
}
} else {
next = t;
}
});
//去掉点击的节点之后的结果集
expandSelectedValue(selectedValues, p, notSelectedValue);
//添加去掉搜索的结果集
if (result.length > 0) {
BI.each(result, function (i, strs) {
self._buildTree(selectedValues, strs);
@ -17426,6 +17418,32 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree
}
function expandSelectedValue(selectedValues, parents, notSelectedValue) {
var next = selectedValues;
//去掉点击的节点之后的结果集
BI.each(parents, function (i, v) {
var t = next[v];
if (t == null) {
if (BI.isEmpty(next)) {
var split = parents.slice(0, i);
var expanded = self._getChildren(split);
BI.each(expanded, function (m, child) {
if (i === parents.length - 1 && child.value === notSelectedValue) {
return true;
}
next[child.value] = {};
});
next = next[v];
} else {
next = {};
next[v] = {};
}
} else {
next = t;
}
});
}
function search(parents, current, result, searched) {
var newParents = BI.clone(parents);
newParents.push(current);
@ -17790,14 +17808,16 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree
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);
delete pNode[name];
if (pNode != null) {
delete pNode[name];
}
}
}
},

1
demo/css/face.css

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

1
demo/css/index.css

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

3
demo/css/main.css

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

1
demo/css/north.css

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

1
demo/css/preview.css

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

1
demo/css/west.css

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

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");
}
}]
}

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;
}

63
docs/base.css

@ -1,4 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-color-chooser-trigger {
@ -9,7 +8,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-color-picker-button .color-picker-button-mask {
@ -18,7 +16,6 @@
.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 {
@ -29,7 +26,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 {
@ -67,7 +63,6 @@
border-right: 6px solid transparent;
border-bottom: 6px solid #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble-popup-view {
@ -75,16 +70,13 @@
-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******************/
@ -94,7 +86,6 @@
.bi-search-editor .search-font {
font-size: 20px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/
@ -113,13 +104,11 @@
.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 */
@ -129,12 +118,6 @@
cursor: text;
width: 100%;
height: 100%;
color: #1a1a1a;
background-color: #ffffff;
}
.bi-theme-dark .CodeMirror {
color: #ffffff;
background-color: #242640;
}
/* PADDING */
.CodeMirror-lines {
@ -599,7 +582,6 @@ li.CodeMirror-hint-active {
background: #08f;
color: white;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-message-title {
@ -621,14 +603,12 @@ 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 {
@ -640,7 +620,6 @@ li.CodeMirror-hint-active {
cursor: text;
font-size: 14px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-all-count-pager .all-pager-prev {
@ -649,7 +628,6 @@ li.CodeMirror-hint-active {
.bi-all-count-pager .all-pager-next {
font-size: 16px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-pager .page-item {
@ -657,7 +635,6 @@ li.CodeMirror-hint-active {
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-direction-pager .direction-pager-prev {
@ -666,10 +643,8 @@ li.CodeMirror-hint-active {
.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 +679,8 @@ 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,32 +834,25 @@ 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 {
@ -895,25 +861,20 @@ li.CodeMirror-hint-active {
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,7 +888,6 @@ li.CodeMirror-hint-active {
.bi-textarea-editor .textarea-editor-content {
border: none;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-file {
@ -935,7 +895,6 @@ li.CodeMirror-hint-active {
filter: alpha(opacity=0);
z-index: 2;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-input {
@ -954,10 +913,8 @@ li.CodeMirror-hint-active {
border: none;
color: #e85050 !important;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-text {
@ -967,7 +924,6 @@ li.CodeMirror-hint-active {
white-space: nowrap;
word-break: break-word;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble {
@ -980,13 +936,11 @@ 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 {
@ -1003,7 +957,6 @@ li.CodeMirror-hint-active {
background: #fddddd;
color: #e85050;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-tooltip {
@ -1023,7 +976,6 @@ li.CodeMirror-hint-active {
color: #e85050;
border: 1px solid #f4cbcb;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-collection-table-cell {
@ -1048,7 +1000,6 @@ 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 {
@ -1056,7 +1007,6 @@ li.CodeMirror-hint-active {
overflow-x: hidden !important;
overflow-y: hidden !important;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-table > .first-col {
@ -1137,7 +1087,6 @@ li.CodeMirror-hint-active {
border-top: 1px solid #525466;
border-left: 1px solid #525466;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-grid-table-cell {
@ -1162,7 +1111,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 {
@ -1278,7 +1226,6 @@ li.CodeMirror-hint-active {
bottom: 0;
position: absolute;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-resizable-table-cell .resizable-table-cell-resizer-container {
@ -1292,7 +1239,6 @@ li.CodeMirror-hint-active {
.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob {
background-color: #58cc7d;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-resizable-table .resizable-table-resizer {
@ -1311,28 +1257,22 @@ 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 {
@ -1340,7 +1280,6 @@ li.CodeMirror-hint-active {
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-small-select-text-trigger {
@ -1348,10 +1287,8 @@ li.CodeMirror-hint-active {
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/**********BI.BIListView*************/

38
docs/base.js

@ -14254,7 +14254,7 @@ BI.FormulaCollections = ["abs","ABS","acos","ACOS","acosh","ACOSH","add2array","
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: {},
@ -14492,11 +14492,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");
@ -17706,7 +17706,7 @@ BI.shortcut("bi.text_node", BI.TextNode);/**
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: ""
});
@ -17780,16 +17780,20 @@ BI.CodeEditor = BI.inherit(BI.Single, {
this.editor.setOption("readOnly", b === true ? false : "nocursor")
},
insertParam: function(param){
insertParam: function (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';
}
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();
},
@ -17801,6 +17805,7 @@ 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);
num += 3;
@ -17832,7 +17837,20 @@ BI.CodeEditor = BI.inherit(BI.Single, {
})
},
refresh: function(){
focus: function () {
this.editor.focus();
},
setStyle: function (style) {
this.style = style;
this.element.css(style);
},
getStyle: function () {
return this.style;
},
refresh: function () {
var self = this;
BI.nextTick(function () {
self.editor.refresh();
@ -18260,7 +18278,7 @@ BI.shortcut("bi.multifile_editor", BI.MultifileEditor);/**
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: ''
});
},
@ -18272,7 +18290,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
tagName: "textarea",
width: "100%",
height: "100%",
cls: "textarea-editor-content display-block bi-card"
cls: "textarea-editor-content display-block"
});
this.content.element.css({"resize": "none"});
BI.createWidget({

71
docs/case.js

@ -3940,7 +3940,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
})
},
@ -3948,7 +3948,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"
});
var down = BI.createWidget({
@ -4274,7 +4275,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) {
@ -4290,7 +4291,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()) {
@ -4305,6 +4307,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,
@ -4314,21 +4333,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
@ -4337,18 +4356,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);
@ -4357,6 +4391,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(),
@ -9896,17 +9933,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)) {
@ -9915,7 +9952,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,
@ -9923,16 +9960,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);
}
});

10
docs/core.css

@ -1,4 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
html,
@ -2951,7 +2950,6 @@ i {
-webkit-animation-name: slideOutUp;
animation-name: slideOutUp;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.base-disabled {
@ -3505,7 +3503,6 @@ i {
cursor: move;
}
/*****************cursor*****************/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.y-overflow-auto {
@ -3546,7 +3543,6 @@ i {
overflow-y: hidden;
white-space: nowrap;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.display-block {
@ -3570,7 +3566,6 @@ i {
.horizon-left {
text-align: left;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*类似ie6的盒子模型 可以在有百分比的时候加border 支持到ie8*/
@ -3900,7 +3895,6 @@ i {
min-height: 100%;
float: left;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-inline-center-adapt-layout:after {
@ -3910,7 +3904,6 @@ i {
vertical-align: middle;
content: ' ';
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-inline-vertical-adapt-layout:after {
@ -3920,7 +3913,6 @@ i {
vertical-align: middle;
content: ' ';
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-theme-dark {
@ -3930,9 +3922,7 @@ i {
.bi-theme-dark .bi-input {
color: #ffffff;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/

12
docs/core.js

@ -22840,7 +22840,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) {
@ -22858,7 +22858,7 @@ BI.extend(BI.DOM, {
},
isDarkColor: function (hex) {
if (!hex) {
if (!hex || !this.isHexColor(hex)) {
return false;
}
var rgb = this.rgb2json(this.hex2rgb(hex));
@ -22871,7 +22871,7 @@ BI.extend(BI.DOM, {
//获取对比颜色
getContrastColor: function (color) {
if (!color) {
if (!color || !this.isColor(color)) {
return "";
}
if (this.isDarkColor(color)) {
@ -22898,6 +22898,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]),
@ -22943,6 +22946,9 @@ BI.extend(BI.DOM, {
if (!color) {
return "";
}
if (!this.isHexColor(color)) {
return color;
}
var tempValue = "rgb(", colorArray;
if (color.length === 7) {

8
docs/demo.css

@ -1,13 +1,10 @@
/****添加计算宽度的--运算符直接需要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 {
@ -54,10 +51,9 @@
body {
background-color: #eff1f4;
}
body.bi-theme-dark {
.bi-theme-dark body {
background-color: #191B2B;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.demo-north {
@ -70,9 +66,7 @@ body.bi-theme-dark {
font-size: 20px;
font-weight: 300;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/

4
docs/demo.js

@ -5585,13 +5585,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");
}
}]
}

4
docs/resource.css

@ -1,4 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
html,
@ -1246,7 +1245,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 {
@ -1283,7 +1281,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 * {
@ -1321,7 +1318,6 @@ email: hunter.z@263.net
website: http://code.google.com/p/jquerytree/
-------------------------------------*/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.ztree * {

57
docs/widget.css

@ -1,7 +1,5 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-arrangement .arrangement-helper {
@ -40,7 +38,6 @@
z-index: 1000000001;
background: #3f8ce8;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-arrangement-droppable {
@ -112,10 +109,8 @@
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*************BI.SearchEditor******************/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-date-trigger {
@ -123,19 +118,15 @@
-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 +135,17 @@
.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 +162,8 @@
background-color: #191b2b;
color: #999999;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-fine-tuning-number-editor {
@ -187,7 +171,6 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-interactive-arrangement .interactive-arrangement-dragtag-line {
@ -197,13 +180,10 @@
.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 +191,20 @@
-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 +212,45 @@
-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 +294,8 @@
.bi-numerical-interval.number-error .bi-input {
color: #e85050;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-page-table-cell {
@ -344,22 +306,18 @@
-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 {
@ -367,7 +325,6 @@
min-width: 80px;
max-width: 220px;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-preview-table {
@ -386,7 +343,6 @@
.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 {
@ -395,13 +351,10 @@
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 +362,8 @@
-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,7 +375,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 {
@ -450,7 +400,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 {
@ -476,10 +425,8 @@
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,13 +452,10 @@
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 {
@ -529,7 +473,6 @@
.bi-theme-dark .bi-year-popup .year-popup-navigation > .first-element {
border-left: none;
}
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-year-trigger {

78
docs/widget.js

@ -4860,7 +4860,7 @@ BI.shortcut('bi.date_triangle_trigger', BI.DateTriangleTrigger);/**
BI.DateCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-date-combo",
baseCls: "bi-date-combo bi-border",
height: 30
});
},
@ -4919,7 +4919,7 @@ BI.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigge
_defaultConfig: function () {
return BI.extend(BI.DateTrigger.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-date-trigger bi-border",
extraCls: "bi-date-trigger",
min: '1900-01-01', //最小日期
max: '2099-12-31', //最大日期
height: 25
@ -17319,7 +17319,7 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree
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]);
})
}
@ -17365,22 +17365,34 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree
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) {
self._deleteNode(selectedValues, 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中有匹配的值,说明搜索结果不在当前值下
@ -17393,29 +17405,9 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree
}
if (finded === true) {
var next = selectedValues;
BI.each(p, function (i, v) {
var t = next[v];
if (t == null) {
if (BI.isEmpty(next)) {
var split = p.slice(0, i);
var expanded = self._getChildren(split);
BI.each(expanded, function (m, child) {
if (i === p.length - 1 && child.value === notSelectedValue) {
return true;
}
next[child.value] = {};
});
next = next[v];
} else {
next = {};
next[v] = {};
}
} else {
next = t;
}
});
//去掉点击的节点之后的结果集
expandSelectedValue(selectedValues, p, notSelectedValue);
//添加去掉搜索的结果集
if (result.length > 0) {
BI.each(result, function (i, strs) {
self._buildTree(selectedValues, strs);
@ -17426,6 +17418,32 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree
}
function expandSelectedValue(selectedValues, parents, notSelectedValue) {
var next = selectedValues;
//去掉点击的节点之后的结果集
BI.each(parents, function (i, v) {
var t = next[v];
if (t == null) {
if (BI.isEmpty(next)) {
var split = parents.slice(0, i);
var expanded = self._getChildren(split);
BI.each(expanded, function (m, child) {
if (i === parents.length - 1 && child.value === notSelectedValue) {
return true;
}
next[child.value] = {};
});
next = next[v];
} else {
next = {};
next[v] = {};
}
} else {
next = t;
}
});
}
function search(parents, current, result, searched) {
var newParents = BI.clone(parents);
newParents.push(current);
@ -17790,14 +17808,16 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree
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);
delete pNode[name];
if (pNode != null) {
delete pNode[name];
}
}
}
},

2
src/base/formula/formulaeditor.js

@ -6,7 +6,7 @@
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: {},

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");

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

@ -7,7 +7,7 @@
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: ""
});
@ -81,16 +81,20 @@ BI.CodeEditor = BI.inherit(BI.Single, {
this.editor.setOption("readOnly", b === true ? false : "nocursor")
},
insertParam: function(param){
insertParam: function (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';
}
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,6 +106,7 @@ 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);
num += 3;
@ -133,7 +138,20 @@ BI.CodeEditor = BI.inherit(BI.Single, {
})
},
refresh: function(){
focus: function () {
this.editor.focus();
},
setStyle: function (style) {
this.style = style;
this.element.css(style);
},
getStyle: function () {
return this.style;
},
refresh: function () {
var self = this;
BI.nextTick(function () {
self.editor.refresh();

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: "textarea-editor-content display-block"
});
this.content.element.css({"resize": "none"});
BI.createWidget({

5
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"
});
var down = BI.createWidget({

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(),

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);
}
});

74
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) {
self._deleteNode(selectedValues, 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,29 +166,9 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
}
if (finded === true) {
var next = selectedValues;
BI.each(p, function (i, v) {
var t = next[v];
if (t == null) {
if (BI.isEmpty(next)) {
var split = p.slice(0, i);
var expanded = self._getChildren(split);
BI.each(expanded, function (m, child) {
if (i === p.length - 1 && child.value === notSelectedValue) {
return true;
}
next[child.value] = {};
});
next = next[v];
} else {
next = {};
next[v] = {};
}
} else {
next = t;
}
});
//去掉点击的节点之后的结果集
expandSelectedValue(selectedValues, p, notSelectedValue);
//添加去掉搜索的结果集
if (result.length > 0) {
BI.each(result, function (i, strs) {
self._buildTree(selectedValues, strs);
@ -187,6 +179,32 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
}
function expandSelectedValue(selectedValues, parents, notSelectedValue) {
var next = selectedValues;
//去掉点击的节点之后的结果集
BI.each(parents, function (i, v) {
var t = next[v];
if (t == null) {
if (BI.isEmpty(next)) {
var split = parents.slice(0, i);
var expanded = self._getChildren(split);
BI.each(expanded, function (m, child) {
if (i === parents.length - 1 && child.value === notSelectedValue) {
return true;
}
next[child.value] = {};
});
next = next[v];
} else {
next = {};
next[v] = {};
}
} else {
next = t;
}
});
}
function search(parents, current, result, searched) {
var newParents = BI.clone(parents);
newParents.push(current);
@ -551,14 +569,16 @@ 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);
delete pNode[name];
if (pNode != null) {
delete pNode[name];
}
}
}
},

12
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,7 +122,7 @@ BI.extend(BI.DOM, {
},
isDarkColor: function (hex) {
if (!hex) {
if (!hex || !this.isHexColor(hex)) {
return false;
}
var rgb = this.rgb2json(this.hex2rgb(hex));
@ -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) {

1
src/css/base/colorchooser/colorchooser.trigger.css

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

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

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

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

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

1
src/css/base/combo/combo.bubble.css

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

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

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

1
src/css/base/dom.css

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

1
src/css/base/editor/editor.adapt.css

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

1
src/css/base/editor/editor.search.css

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

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

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

1
src/css/base/editor/editor.sign.initial.css

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

7
src/css/base/formula/codemirror.css

@ -1,4 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/* BASICS */
@ -8,12 +7,6 @@
cursor: text;
width: 100%;
height: 100%;
color: #1a1a1a;
background-color: #ffffff;
}
.bi-theme-dark .CodeMirror {
color: #ffffff;
background-color: #242640;
}
/* PADDING */
.CodeMirror-lines {

1
src/css/base/foundation/bi.message.css

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

1
src/css/base/layer/layer.multiselect.css

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

1
src/css/base/layer/panel.css

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

1
src/css/base/pager/pager.all.count.css

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

1
src/css/base/pager/pager.css

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

1
src/css/base/pager/pager.direction.css

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

1
src/css/base/segment/button.segment.css

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

1
src/css/base/segment/segment.css

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

1
src/css/base/single/bar/bar.css

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

1
src/css/base/single/button/button.css

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

1
src/css/base/single/button/item.multiselect.css

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

1
src/css/base/single/button/item.singleselect.icontext.css

@ -1,4 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-single-select-icon-text-item:active .b-font:before,

1
src/css/base/single/button/item.singleselectradio.css

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

1
src/css/base/single/button/item.texticon.css

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

1
src/css/base/single/button/listitem.css

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

1
src/css/base/single/editor/editor.css

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

1
src/css/base/single/editor/editor.multifile.css

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

1
src/css/base/single/editor/editor.shelter.css

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

1
src/css/base/single/editor/editor.sign.css

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

1
src/css/base/single/editor/editor.state.css

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

1
src/css/base/single/editor/editor.state.simple.css

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

1
src/css/base/single/editor/editor.textarea.css

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

1
src/css/base/single/input/file.css

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

1
src/css/base/single/input/input.css

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

1
src/css/base/single/single.css

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

1
src/css/base/single/text.css

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

1
src/css/base/single/tip/tip.bubble.css

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

1
src/css/base/single/tip/tip.css

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

1
src/css/base/single/tip/tip.toast.css

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

1
src/css/base/single/tip/tip.tooltip.css

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

1
src/css/base/table/table.collection.cell.css

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

1
src/css/base/table/table.collection.quick.css

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

1
src/css/base/table/table.css

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

1
src/css/base/table/table.grid.cell.css

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

1
src/css/base/table/table.grid.scrollbar.css

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

1
src/css/base/table/table.resizable.cell.css

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

1
src/css/base/table/table.resizable.css

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

1
src/css/base/table/table.tree.css

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

1
src/css/base/tree/branch.tree.css

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

1
src/css/base/trigger/trigger.css

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

1
src/css/base/trigger/trigger.editor.css

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

1
src/css/base/trigger/trigger.icon.css

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

1
src/css/base/trigger/trigger.selecttext.css

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

1
src/css/base/trigger/trigger.selecttextsmall.css

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

1
src/css/base/view/floatboxview.css

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

1
src/css/base/view/popupview.css

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

1
src/css/bibase.css

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

1
src/css/core/normal.css

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

1
src/css/core/utils/common.css

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

1
src/css/core/utils/overflow.css

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

1
src/css/core/utils/pos.css

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

1
src/css/core/utils/sizing.css

@ -1,4 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
/*类似ie6的盒子模型 可以在有百分比的时候加border 支持到ie8*/

1
src/css/core/wrapper/inline.center.css

@ -1,4 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-inline-center-adapt-layout:after {

1
src/css/core/wrapper/inline.vertical.css

@ -1,4 +1,3 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-inline-vertical-adapt-layout:after {

1
src/css/resource/app.css

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

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

Loading…
Cancel
Save