Browse Source

Merge branch 'master' of http://cloud.finedevelop.com:2015/scm/~guy/fineui

# Conflicts:
#	dist/bundle.min.js
es6
guy 7 years ago
parent
commit
c97797e2de
  1. 2
      demo/js/base/editor/demo.sql_editor.js
  2. 4
      demo/js/widget/basewidget/demo.items.js
  3. 16
      dist/base.css
  4. 78
      dist/base.js
  5. 125
      dist/bundle.css
  6. 82
      dist/bundle.js
  7. 2
      dist/bundle.min.css
  8. 4
      dist/case.js
  9. 109
      dist/core.css
  10. 109
      dist/core_without_normalize.css
  11. 6
      dist/demo.js
  12. 2
      src/base/formula/config.js
  13. 2
      src/base/single/button/button.basic.js
  14. 4
      src/base/single/button/buttons/button.js
  15. 6
      src/base/sql/codemirrior/sql-hint.js
  16. 64
      src/base/sql/editor.sql.js
  17. 4
      src/case/checkbox/check.arrowtreegroupnode.js
  18. 2
      src/css/base/single/tip/tip.bubble.css
  19. 2
      src/css/base/single/tip/tip.toast.css
  20. 2
      src/css/base/single/tip/tip.tooltip.css
  21. 10
      src/css/base/sql/sql.css
  22. 109
      src/css/core/utils/common.css
  23. 8
      src/less/base/sql/sql.less
  24. 91
      src/less/core/utils/common.less
  25. 2
      src/less/lib/colors.less
  26. 3
      src/less/lib/constant.less

2
demo/js/base/editor/demo.sql_editor.js

@ -11,7 +11,7 @@ Demo.SQLEditor = BI.inherit(BI.Widget, {
type : 'bi.sql_editor',
width : 300,
height : 200,
value : "select * from DEMO_CONTRACT where 合同类型 = '长期协议' and 购买数量 = sum([1,2,3,4])"
value : "select * from DEMO_CONTRACT where 合同类型 = ${长期协议} and 购买数量 = sum([1,2,3,4])"
});
BI.createWidget({
type: "bi.left",

4
demo/js/widget/basewidget/demo.items.js

@ -9,8 +9,10 @@ Demo.Items = BI.inherit(BI.Widget, {
return {
type: "bi.vertical",
items: [{
type: "bi.label",
type: "bi.text_button",
cls: "bi-list-item-select bi-high-light-border bi-border",
height: 30,
level: "warning",
text: "单选item"
}, {
type: "bi.single_select_item",

16
dist/base.css vendored

@ -997,7 +997,7 @@ body .bi-button.button-ignore.disabled.clear:active,
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background: #fddddd;
background: #ffecec;
color: #ff4949;
}
.bi-tip {
@ -1014,7 +1014,7 @@ body .bi-button.button-ignore.disabled.clear:active,
color: #5cb75d;
}
.bi-toast.toast-warning {
background: #fddddd;
background: #ffecec;
color: #ff4949;
}
.bi-tooltip {
@ -1030,7 +1030,7 @@ body .bi-button.button-ignore.disabled.clear:active,
color: #1a1a1a;
}
.bi-tooltip.tooltip-warning {
background: #fddddd;
background: #ffecec;
color: #ff4949;
border: 1px solid #f4cbcb;
}
@ -1043,6 +1043,16 @@ body .bi-button.button-ignore.disabled.clear:active,
.bi-sql-editor .cm-s-default .cm-function {
color: #3685f2;
}
.bi-sql-editor .param {
color: #ffffff;
padding: 0 5px;
margin: 1px 1px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background: #3f8ce8;
display: inline-block;
}
.CodeMirror-hints .sql-fr-function {
color: #3685f2;
}

78
dist/base.js vendored

File diff suppressed because one or more lines are too long

125
dist/bundle.css vendored

@ -900,6 +900,53 @@ i {
.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light {
color: #666666 !important;
}
.bi-list-item-active3:hover,
.bi-list-item-active3.hover {
color: #ff4949;
background-color: #ffecec;
}
.bi-list-item-active3:hover .bi-input,
.bi-list-item-active3.hover .bi-input {
color: #ff4949;
}
.bi-list-item-active3:hover .bi-textarea,
.bi-list-item-active3.hover .bi-textarea {
color: #ff4949;
}
.bi-list-item-active3.active,
.bi-list-item-active3:active {
color: #ffffff;
background-color: #ff4949;
}
.bi-list-item-active3.active .bi-input,
.bi-list-item-active3:active .bi-input {
color: #ffffff;
}
.bi-list-item-active3.active .bi-textarea,
.bi-list-item-active3:active .bi-textarea {
color: #ffffff;
}
.bi-list-item-active3.disabled,
.bi-list-item-active3.disabled:hover,
.bi-list-item-active3.disabled:active {
background-color: transparent !important;
color: #9ea6b2 !important;
}
.bi-list-item-active3.disabled .bi-input,
.bi-list-item-active3.disabled:hover .bi-input,
.bi-list-item-active3.disabled:active .bi-input {
color: #9ea6b2 !important;
}
.bi-list-item-active3.disabled .bi-textarea,
.bi-list-item-active3.disabled:hover .bi-textarea,
.bi-list-item-active3.disabled:active .bi-textarea {
color: #9ea6b2 !important;
}
.bi-list-item-active3.disabled .bi-high-light,
.bi-list-item-active3.disabled:hover .bi-high-light,
.bi-list-item-active3.disabled:active .bi-high-light {
color: #9ea6b2 !important;
}
.bi-list-item-select:hover,
.bi-list-item-select.hover {
color: #1a1a1a;
@ -931,6 +978,63 @@ i {
.bi-list-item-select.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-warning {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-input {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-high-light {
color: #ff4949;
}
.bi-list-item-select.button-warning.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.button-warning:hover,
.bi-list-item-select.button-warning.hover {
color: #ff4949;
background-color: #ffecec;
}
.bi-list-item-select.button-warning:hover .bi-input,
.bi-list-item-select.button-warning.hover .bi-input {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover .bi-textarea,
.bi-list-item-select.button-warning.hover .bi-textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover .bi-high-light,
.bi-list-item-select.button-warning.hover .bi-high-light {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover.bi-high-light-border,
.bi-list-item-select.button-warning.hover.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.button-warning:active,
.bi-list-item-select.button-warning.active {
color: #ffffff;
background-color: #ff4949;
}
.bi-list-item-select.button-warning:active .bi-input,
.bi-list-item-select.button-warning.active .bi-input {
color: #ffffff;
}
.bi-list-item-select.button-warning:active .bi-textarea,
.bi-list-item-select.button-warning.active .bi-textarea {
color: #ffffff;
}
.bi-list-item-select.button-warning:active .bi-high-light,
.bi-list-item-select.button-warning.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-warning:active.bi-high-light-border,
.bi-list-item-select.button-warning.active.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.disabled,
.bi-list-item-select.disabled:hover,
.bi-list-item-select.disabled:active {
@ -952,6 +1056,11 @@ i {
.bi-list-item-select.disabled:active .bi-high-light {
color: #9ea6b2 !important;
}
.bi-list-item-select.disabled.bi-high-light-border,
.bi-list-item-select.disabled:hover.bi-high-light-border,
.bi-list-item-select.disabled:active.bi-high-light-border {
border-color: #cccccc;
}
.bi-theme-dark .bi-list-item-select:hover,
.bi-theme-dark .bi-list-item-select.hover {
color: #ffffff;
@ -2610,7 +2719,7 @@ body .bi-button.button-ignore.disabled.clear:active,
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background: #fddddd;
background: #ffecec;
color: #ff4949;
}
.bi-tip {
@ -2627,7 +2736,7 @@ body .bi-button.button-ignore.disabled.clear:active,
color: #5cb75d;
}
.bi-toast.toast-warning {
background: #fddddd;
background: #ffecec;
color: #ff4949;
}
.bi-tooltip {
@ -2643,7 +2752,7 @@ body .bi-button.button-ignore.disabled.clear:active,
color: #1a1a1a;
}
.bi-tooltip.tooltip-warning {
background: #fddddd;
background: #ffecec;
color: #ff4949;
border: 1px solid #f4cbcb;
}
@ -2656,6 +2765,16 @@ body .bi-button.button-ignore.disabled.clear:active,
.bi-sql-editor .cm-s-default .cm-function {
color: #3685f2;
}
.bi-sql-editor .param {
color: #ffffff;
padding: 0 5px;
margin: 1px 1px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background: #3f8ce8;
display: inline-block;
}
.CodeMirror-hints .sql-fr-function {
color: #3685f2;
}

82
dist/bundle.js vendored

File diff suppressed because one or more lines are too long

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/case.js vendored

@ -2058,9 +2058,9 @@ BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
setSelected: function (v) {
BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v) {
this.element.removeClass("pull-down-font").addClass("pull-right-font");
} else {
this.element.removeClass("pull-right-font").addClass("pull-down-font");
} else {
this.element.removeClass("pull-down-font").addClass("pull-right-font");
}
}
});

109
dist/core.css vendored

@ -900,6 +900,53 @@ i {
.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light {
color: #666666 !important;
}
.bi-list-item-active3:hover,
.bi-list-item-active3.hover {
color: #ff4949;
background-color: #ffecec;
}
.bi-list-item-active3:hover .bi-input,
.bi-list-item-active3.hover .bi-input {
color: #ff4949;
}
.bi-list-item-active3:hover .bi-textarea,
.bi-list-item-active3.hover .bi-textarea {
color: #ff4949;
}
.bi-list-item-active3.active,
.bi-list-item-active3:active {
color: #ffffff;
background-color: #ff4949;
}
.bi-list-item-active3.active .bi-input,
.bi-list-item-active3:active .bi-input {
color: #ffffff;
}
.bi-list-item-active3.active .bi-textarea,
.bi-list-item-active3:active .bi-textarea {
color: #ffffff;
}
.bi-list-item-active3.disabled,
.bi-list-item-active3.disabled:hover,
.bi-list-item-active3.disabled:active {
background-color: transparent !important;
color: #9ea6b2 !important;
}
.bi-list-item-active3.disabled .bi-input,
.bi-list-item-active3.disabled:hover .bi-input,
.bi-list-item-active3.disabled:active .bi-input {
color: #9ea6b2 !important;
}
.bi-list-item-active3.disabled .bi-textarea,
.bi-list-item-active3.disabled:hover .bi-textarea,
.bi-list-item-active3.disabled:active .bi-textarea {
color: #9ea6b2 !important;
}
.bi-list-item-active3.disabled .bi-high-light,
.bi-list-item-active3.disabled:hover .bi-high-light,
.bi-list-item-active3.disabled:active .bi-high-light {
color: #9ea6b2 !important;
}
.bi-list-item-select:hover,
.bi-list-item-select.hover {
color: #1a1a1a;
@ -931,6 +978,63 @@ i {
.bi-list-item-select.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-warning {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-input {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-high-light {
color: #ff4949;
}
.bi-list-item-select.button-warning.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.button-warning:hover,
.bi-list-item-select.button-warning.hover {
color: #ff4949;
background-color: #ffecec;
}
.bi-list-item-select.button-warning:hover .bi-input,
.bi-list-item-select.button-warning.hover .bi-input {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover .bi-textarea,
.bi-list-item-select.button-warning.hover .bi-textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover .bi-high-light,
.bi-list-item-select.button-warning.hover .bi-high-light {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover.bi-high-light-border,
.bi-list-item-select.button-warning.hover.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.button-warning:active,
.bi-list-item-select.button-warning.active {
color: #ffffff;
background-color: #ff4949;
}
.bi-list-item-select.button-warning:active .bi-input,
.bi-list-item-select.button-warning.active .bi-input {
color: #ffffff;
}
.bi-list-item-select.button-warning:active .bi-textarea,
.bi-list-item-select.button-warning.active .bi-textarea {
color: #ffffff;
}
.bi-list-item-select.button-warning:active .bi-high-light,
.bi-list-item-select.button-warning.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-warning:active.bi-high-light-border,
.bi-list-item-select.button-warning.active.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.disabled,
.bi-list-item-select.disabled:hover,
.bi-list-item-select.disabled:active {
@ -952,6 +1056,11 @@ i {
.bi-list-item-select.disabled:active .bi-high-light {
color: #9ea6b2 !important;
}
.bi-list-item-select.disabled.bi-high-light-border,
.bi-list-item-select.disabled:hover.bi-high-light-border,
.bi-list-item-select.disabled:active.bi-high-light-border {
border-color: #cccccc;
}
.bi-theme-dark .bi-list-item-select:hover,
.bi-theme-dark .bi-list-item-select.hover {
color: #ffffff;

109
dist/core_without_normalize.css vendored

@ -617,6 +617,53 @@
.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light {
color: #666666 !important;
}
.bi-list-item-active3:hover,
.bi-list-item-active3.hover {
color: #ff4949;
background-color: #ffecec;
}
.bi-list-item-active3:hover .bi-input,
.bi-list-item-active3.hover .bi-input {
color: #ff4949;
}
.bi-list-item-active3:hover .bi-textarea,
.bi-list-item-active3.hover .bi-textarea {
color: #ff4949;
}
.bi-list-item-active3.active,
.bi-list-item-active3:active {
color: #ffffff;
background-color: #ff4949;
}
.bi-list-item-active3.active .bi-input,
.bi-list-item-active3:active .bi-input {
color: #ffffff;
}
.bi-list-item-active3.active .bi-textarea,
.bi-list-item-active3:active .bi-textarea {
color: #ffffff;
}
.bi-list-item-active3.disabled,
.bi-list-item-active3.disabled:hover,
.bi-list-item-active3.disabled:active {
background-color: transparent !important;
color: #9ea6b2 !important;
}
.bi-list-item-active3.disabled .bi-input,
.bi-list-item-active3.disabled:hover .bi-input,
.bi-list-item-active3.disabled:active .bi-input {
color: #9ea6b2 !important;
}
.bi-list-item-active3.disabled .bi-textarea,
.bi-list-item-active3.disabled:hover .bi-textarea,
.bi-list-item-active3.disabled:active .bi-textarea {
color: #9ea6b2 !important;
}
.bi-list-item-active3.disabled .bi-high-light,
.bi-list-item-active3.disabled:hover .bi-high-light,
.bi-list-item-active3.disabled:active .bi-high-light {
color: #9ea6b2 !important;
}
.bi-list-item-select:hover,
.bi-list-item-select.hover {
color: #1a1a1a;
@ -648,6 +695,63 @@
.bi-list-item-select.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-warning {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-input {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-high-light {
color: #ff4949;
}
.bi-list-item-select.button-warning.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.button-warning:hover,
.bi-list-item-select.button-warning.hover {
color: #ff4949;
background-color: #ffecec;
}
.bi-list-item-select.button-warning:hover .bi-input,
.bi-list-item-select.button-warning.hover .bi-input {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover .bi-textarea,
.bi-list-item-select.button-warning.hover .bi-textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover .bi-high-light,
.bi-list-item-select.button-warning.hover .bi-high-light {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover.bi-high-light-border,
.bi-list-item-select.button-warning.hover.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.button-warning:active,
.bi-list-item-select.button-warning.active {
color: #ffffff;
background-color: #ff4949;
}
.bi-list-item-select.button-warning:active .bi-input,
.bi-list-item-select.button-warning.active .bi-input {
color: #ffffff;
}
.bi-list-item-select.button-warning:active .bi-textarea,
.bi-list-item-select.button-warning.active .bi-textarea {
color: #ffffff;
}
.bi-list-item-select.button-warning:active .bi-high-light,
.bi-list-item-select.button-warning.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-warning:active.bi-high-light-border,
.bi-list-item-select.button-warning.active.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.disabled,
.bi-list-item-select.disabled:hover,
.bi-list-item-select.disabled:active {
@ -669,6 +773,11 @@
.bi-list-item-select.disabled:active .bi-high-light {
color: #9ea6b2 !important;
}
.bi-list-item-select.disabled.bi-high-light-border,
.bi-list-item-select.disabled:hover.bi-high-light-border,
.bi-list-item-select.disabled:active.bi-high-light-border {
border-color: #cccccc;
}
.bi-theme-dark .bi-list-item-select:hover,
.bi-theme-dark .bi-list-item-select.hover {
color: #ffffff;

6
dist/demo.js vendored

@ -844,7 +844,7 @@ Demo.SQLEditor = BI.inherit(BI.Widget, {
type : 'bi.sql_editor',
width : 300,
height : 200,
value : "select * from DEMO_CONTRACT where 合同类型 = '长期协议' and 购买数量 = sum([1,2,3,4])"
value : "select * from DEMO_CONTRACT where 合同类型 = ${长期协议} and 购买数量 = sum([1,2,3,4])"
});
BI.createWidget({
type: "bi.left",
@ -11854,8 +11854,10 @@ Demo.Items = BI.inherit(BI.Widget, {
return {
type: "bi.vertical",
items: [{
type: "bi.label",
type: "bi.text_button",
cls: "bi-list-item-select bi-high-light-border bi-border",
height: 30,
level: "warning",
text: "单选item"
}, {
type: "bi.single_select_item",

2
src/base/formula/config.js

File diff suppressed because one or more lines are too long

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

@ -19,6 +19,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
forceSelected: false, // 点击即选中, 选中了就不会被取消,与once的区别是forceSelected不影响事件的触发
forceNotSelected: false, // 无论怎么点击都不会被选中
disableSelected: false, // 使能选中
level: "common",
shadow: false,
isShadowShowingOnSelected: false, // 选中状态下是否显示阴影
@ -39,6 +40,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
if (opts.shadow) {
this._createShadow();
}
this.element.addClass("button-" + opts.level);
},
_createShadow: function () {

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

@ -19,7 +19,6 @@
isShadowShowingOnSelected: true,
readonly: true,
iconClass: "",
level: "common",
block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制
clear: false, // 是否去掉边框和背景
textAlign: "center",
@ -56,7 +55,7 @@
});
BI.createWidget({
type: "bi.horizontal_auto",
cls: "button-" + o.level + " " + o.iconClass,
cls: o.iconClass,
element: this,
hgap: o.hgap,
vgap: o.vgap,
@ -72,7 +71,6 @@
} else {
this.text = BI.createWidget({
type: "bi.label",
cls: "button-" + o.level,
textAlign: o.textAlign,
whiteSpace: o.whiteSpace,
forceCenter: o.forceCenter,

6
src/base/sql/codemirrior/sql-hint.js

@ -236,18 +236,16 @@
keywords = getKeywords(editor);
var keywordsCount = BI.size(keywords);
var functions = [];
var desc = {};
var cur = editor.getCursor();
var token = editor.getTokenAt(cur);
if(options.supportFunction){
BI.each(BI.FormulaCollections, function (idx, formula) {
if(formula.lastIndexOf(token.string, 0) == 0 && !BI.contains(functions, formula)) {
functions.push(formula);
}
});
BI.each(BI.FormulaJson, function (idx, formula) {
desc[formula.name.toLowerCase()] = formula.def;
});
keywords = BI.concat(BI.keys(keywords), functions);
}
identifierQuote = getIdentifierQuote(editor);
if (defaultTableName && !defaultTable) {defaultTable = findTableByAlias(defaultTableName, editor);}

64
src/base/sql/editor.sql.js

@ -7,7 +7,8 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
baseCls: "bi-sql-editor",
value: "",
lineHeight: 2,
showHint: true
showHint: true,
supportFunction: false
});
},
_init: function () {
@ -25,7 +26,8 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
self._checkWaterMark();
if (o.showHint) {
CodeMirror.showHint(cm, CodeMirror.sqlHint, {
completeSingle: false
completeSingle: false,
supportFunction: o.supportFunction
});
}
BI.nextTick(function () {
@ -82,6 +84,18 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
this.editor.focus();
},
insertParam: function (param) {
var value = param;
var from = this.editor.getCursor();
this.editor.replaceSelection(param);
var to = this.editor.getCursor();
var options = {className: "param", atomic: true};
options.value = value;
this.editor.markText(from, to, options);
this.editor.replaceSelection(" ");
this.editor.focus();
},
_checkWaterMark: function () {
var o = this.options;
if (!this.disabledWaterMark && BI.isEmptyString(this.editor.getValue()) && BI.isKey(o.watermark)) {
@ -91,12 +105,54 @@ BI.SQLEditor = BI.inherit(BI.Widget, {
}
},
_analyzeContent: function (v) {
var regx = /\$[\{][^\}]*[\}]|[^\$\{]*[^\$\{]/g;
return v.match(regx);
},
getValue: function () {
return this.editor.getValue();
return this.editor.getValue("\n", function (line) {
var rawText = line.text, value = line.text, num = 0;
value.text = rawText;
_.forEach(_.sortBy(line.markedSpans, "from"), 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) + "$\{" + i.marker.value + "\}" + value.substr(i.to + num, value.length);
// 加上${}的偏移
num += 3;
// 加上实际值和显示值的长度差的偏移
num += (i.marker.value.length - fieldNameLength);
break;
}
});
return value;
});
},
setValue: function (v) {
this.editor.setValue(v);
var self = this, result;
this.refresh();
self.editor.setValue("");
result = this._analyzeContent(v || "");
BI.each(result, function (i, item) {
var fieldRegx = /\$[\{][^\}]*[\}]/;
var str = item.match(fieldRegx);
if (BI.isNotEmptyArray(str)) {
self.insertParam(str[0].substring(2, item.length - 1));
} else {
self.insertString(item);
}
});
this._checkWaterMark();
},
refresh: function () {
var self = this;
BI.nextTick(function () {
self.editor.refresh();
});
}
});
BI.shortcut("bi.sql_editor", BI.SQLEditor);

4
src/case/checkbox/check.arrowtreegroupnode.js

@ -16,9 +16,9 @@ BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
setSelected: function (v) {
BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v) {
this.element.removeClass("pull-down-font").addClass("pull-right-font");
} else {
this.element.removeClass("pull-right-font").addClass("pull-down-font");
} else {
this.element.removeClass("pull-down-font").addClass("pull-right-font");
}
}
});

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

@ -5,6 +5,6 @@
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background: #fddddd;
background: #ffecec;
color: #ff4949;
}

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

@ -9,6 +9,6 @@
color: #5cb75d;
}
.bi-toast.toast-warning {
background: #fddddd;
background: #ffecec;
color: #ff4949;
}

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

@ -11,7 +11,7 @@
color: #1a1a1a;
}
.bi-tooltip.tooltip-warning {
background: #fddddd;
background: #ffecec;
color: #ff4949;
border: 1px solid #f4cbcb;
}

10
src/css/base/sql/sql.css

@ -7,6 +7,16 @@
.bi-sql-editor .cm-s-default .cm-function {
color: #3685f2;
}
.bi-sql-editor .param {
color: #ffffff;
padding: 0 5px;
margin: 1px 1px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
background: #3f8ce8;
display: inline-block;
}
.CodeMirror-hints .sql-fr-function {
color: #3685f2;
}

109
src/css/core/utils/common.css

@ -617,6 +617,53 @@
.bi-theme-dark .bi-list-item-active2.disabled:active .bi-high-light {
color: #666666 !important;
}
.bi-list-item-active3:hover,
.bi-list-item-active3.hover {
color: #ff4949;
background-color: #ffecec;
}
.bi-list-item-active3:hover .bi-input,
.bi-list-item-active3.hover .bi-input {
color: #ff4949;
}
.bi-list-item-active3:hover .bi-textarea,
.bi-list-item-active3.hover .bi-textarea {
color: #ff4949;
}
.bi-list-item-active3.active,
.bi-list-item-active3:active {
color: #ffffff;
background-color: #ff4949;
}
.bi-list-item-active3.active .bi-input,
.bi-list-item-active3:active .bi-input {
color: #ffffff;
}
.bi-list-item-active3.active .bi-textarea,
.bi-list-item-active3:active .bi-textarea {
color: #ffffff;
}
.bi-list-item-active3.disabled,
.bi-list-item-active3.disabled:hover,
.bi-list-item-active3.disabled:active {
background-color: transparent !important;
color: #9ea6b2 !important;
}
.bi-list-item-active3.disabled .bi-input,
.bi-list-item-active3.disabled:hover .bi-input,
.bi-list-item-active3.disabled:active .bi-input {
color: #9ea6b2 !important;
}
.bi-list-item-active3.disabled .bi-textarea,
.bi-list-item-active3.disabled:hover .bi-textarea,
.bi-list-item-active3.disabled:active .bi-textarea {
color: #9ea6b2 !important;
}
.bi-list-item-active3.disabled .bi-high-light,
.bi-list-item-active3.disabled:hover .bi-high-light,
.bi-list-item-active3.disabled:active .bi-high-light {
color: #9ea6b2 !important;
}
.bi-list-item-select:hover,
.bi-list-item-select.hover {
color: #1a1a1a;
@ -648,6 +695,63 @@
.bi-list-item-select.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-warning {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-input {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning .bi-high-light {
color: #ff4949;
}
.bi-list-item-select.button-warning.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.button-warning:hover,
.bi-list-item-select.button-warning.hover {
color: #ff4949;
background-color: #ffecec;
}
.bi-list-item-select.button-warning:hover .bi-input,
.bi-list-item-select.button-warning.hover .bi-input {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover .bi-textarea,
.bi-list-item-select.button-warning.hover .bi-textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover .bi-high-light,
.bi-list-item-select.button-warning.hover .bi-high-light {
color: #ff4949;
}
.bi-list-item-select.button-warning:hover.bi-high-light-border,
.bi-list-item-select.button-warning.hover.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.button-warning:active,
.bi-list-item-select.button-warning.active {
color: #ffffff;
background-color: #ff4949;
}
.bi-list-item-select.button-warning:active .bi-input,
.bi-list-item-select.button-warning.active .bi-input {
color: #ffffff;
}
.bi-list-item-select.button-warning:active .bi-textarea,
.bi-list-item-select.button-warning.active .bi-textarea {
color: #ffffff;
}
.bi-list-item-select.button-warning:active .bi-high-light,
.bi-list-item-select.button-warning.active .bi-high-light {
color: #ffffff;
}
.bi-list-item-select.button-warning:active.bi-high-light-border,
.bi-list-item-select.button-warning.active.bi-high-light-border {
border-color: #e85050;
}
.bi-list-item-select.disabled,
.bi-list-item-select.disabled:hover,
.bi-list-item-select.disabled:active {
@ -669,6 +773,11 @@
.bi-list-item-select.disabled:active .bi-high-light {
color: #9ea6b2 !important;
}
.bi-list-item-select.disabled.bi-high-light-border,
.bi-list-item-select.disabled:hover.bi-high-light-border,
.bi-list-item-select.disabled:active.bi-high-light-border {
border-color: #cccccc;
}
.bi-theme-dark .bi-list-item-select:hover,
.bi-theme-dark .bi-list-item-select.hover {
color: #ffffff;

8
src/less/base/sql/sql.less

@ -14,6 +14,14 @@
color: @color-bi-text-highlight;
}
& .param {
color: @color-bi-text;
padding: 0 5px;
margin: 1px 1px;
.border-radius(2px);
background: @color-bi-background-highlight;
display: inline-block;
}
}
.CodeMirror-hints {

91
src/less/core/utils/common.less

@ -611,6 +611,45 @@
}
}
// 文字和背景hover和active时变化(红)
.bi-list-item-active3 {
&:hover, &.hover {
color: @color-bi-text-failure;
& .bi-input {
color: @color-bi-text-failure;
}
& .bi-textarea {
color: @color-bi-text-failure;
}
background-color: @color-bi-background-light-failure;
}
&.active, &:active {
color: @color-bi-text;
& .bi-input {
color: @color-bi-text;
}
& .bi-textarea {
color: @color-bi-text;
}
background-color: @color-bi-background-failure;
}
&.disabled {
&, &:hover, &:active {
background-color: transparent !important;
color: @color-bi-text-disabled !important;
& .bi-input {
color: @color-bi-text-disabled !important;
}
& .bi-textarea {
color: @color-bi-text-disabled !important;
}
& .bi-high-light {
color: @color-bi-text-disabled !important;
}
}
}
}
//有选中效果
.bi-list-item-select {
&:hover, &.hover {
@ -636,6 +675,55 @@
color: @color-bi-text;
}
}
&.button-warning {
& {
color: @color-bi-text-failure;
& .bi-input {
color: @color-bi-text-failure;
}
& .bi-textarea {
color: @color-bi-text-failure;
}
& .bi-high-light {
color: @color-bi-text-failure;
}
&.bi-high-light-border{
border-color: @color-bi-border-failure;
}
}
&:hover, &.hover {
color: @color-bi-text-failure;
& .bi-input {
color: @color-bi-text-failure;
}
& .bi-textarea {
color: @color-bi-text-failure;
}
background-color: @color-bi-background-light-failure;
& .bi-high-light {
color: @color-bi-text-failure;
}
&.bi-high-light-border{
border-color: @color-bi-border-failure;
}
}
&:active, &.active {
color: @color-bi-text;
& .bi-input {
color: @color-bi-text;
}
& .bi-textarea {
color: @color-bi-text;
}
background-color: @color-bi-background-failure;
& .bi-high-light {
color: @color-bi-text;
}
&.bi-high-light-border{
border-color: @color-bi-border-failure;
}
}
}
&.disabled {
&, &:hover, &:active {
color: @color-bi-text-disabled !important;
@ -649,6 +737,9 @@
& .bi-high-light {
color: @color-bi-text-disabled !important;
}
&.bi-high-light-border{
border-color: @color-bi-border-disabled;
}
}
}
}

2
src/less/lib/colors.less

@ -56,6 +56,8 @@
@color-bi-background-warning: @background-color-warning;
//背景提亮色
@color-bi-background-highlight: @background-color-highlight;
//背景提亮色(浅)
@color-bi-background-light-highlight: @background-color-light-highlight;
//黑色边框色
@color-bi-border-black: @border-color-black;

3
src/less/lib/constant.less

@ -35,13 +35,14 @@
@background-color-default-theme-dark: #242640;//
@background-color-normal: #fafbfc;//
@background-color-normal-theme-dark: #191B2B;//
@background-color-light-highlight: #eaf2fd;
@background-color-highlight: #3f8ce8;
@background-color-dark: #d4dadd;
@background-color-gray: #999999;
@background-color-disabled: #cccccc;
@background-color-negative: #ff4949;
@background-color-light-negative: #fddddd;
@background-color-light-negative: #ffecec;
@background-color-warning: #faaa39;
@background-color-dark-success: #58cc7d;

Loading…
Cancel
Save