Browse Source

Merge pull request #317 in FUI/fineui from ~WINDY/fui:master to master

* commit '73d55f0e653de050b9f2c6144b2732e19010549d':
  search_text_value_combo标红
es6
guy 7 years ago
parent
commit
2e7b69f0ad
  1. 2
      demo/js/case/combo/demo.search_text_value_combo.js
  2. 40
      dist/_fineui.min.js
  3. 7
      dist/base.css
  4. 7
      dist/bundle.css
  5. 32
      dist/bundle.js
  6. 2
      dist/bundle.min.css
  7. 40
      dist/bundle.min.js
  8. 32
      dist/case.js
  9. 2
      dist/demo.js
  10. 7
      dist/fineui.css
  11. 2
      dist/fineui.min.css
  12. 40
      dist/fineui.min.js
  13. 15
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  14. 17
      src/case/combo/textvaluecombo/combo.textvalue.js
  15. 7
      src/css/base/combo/combo.css
  16. 7
      src/less/base/combo/combo.searchtextvalue.less
  17. 11
      src/less/base/combo/combo.textvalue.less

2
demo/js/case/combo/demo.search_text_value_combo.js

@ -64,7 +64,7 @@ Demo.SearchTextValueCombo = BI.inherit(BI.Widget, {
width: 90,
height: 25,
handler: function () {
combo.setValue(3);
combo.setValue(11);
}
}],
vgap: 20

40
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

7
dist/base.css vendored

@ -296,6 +296,13 @@
.bi-search-text-value-combo .trigger-icon-button {
font-size: 16px;
}
.bi-search-text-value-combo.combo-error .bi-search-text-value-trigger .bi-text-button {
color: #ff4949;
}
.bi-text-value-combo.combo-error .bi-select-text-trigger .bi-label {
color: #ff4949;
}
.bi-search-text-value-combo .trigger-icon-button {
font-size: 16px;
}

7
dist/bundle.css vendored

@ -2334,6 +2334,13 @@ textarea {
.bi-search-text-value-combo .trigger-icon-button {
font-size: 16px;
}
.bi-search-text-value-combo.combo-error .bi-search-text-value-trigger .bi-text-button {
color: #ff4949;
}
.bi-text-value-combo.combo-error .bi-select-text-trigger .bi-label {
color: #ff4949;
}
.bi-search-text-value-combo .trigger-icon-button {
font-size: 16px;
}

32
dist/bundle.js vendored

@ -77702,6 +77702,20 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
bottom: 0,
top: 0
}]
};
},
_checkError: function (v) {
if(BI.isNotNull(v)) {
v = BI.isArray(v) ? v : [v];
var result = BI.find(this.options.items, function (idx, item) {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.element.removeClass("combo-error");
}
}
},
@ -77711,6 +77725,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
setValue: function (v) {
this.combo.setValue(v);
this._checkError(v);
},
getValue: function () {
@ -78174,7 +78189,7 @@ BI.shortcut("bi.text_value_check_combo_popup", BI.TextValueCheckComboPopup);/**
BI.TextValueCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-text-value-combo",
baseCls: "bi-text-value-combo",
height: 30,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "",
@ -78218,9 +78233,24 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
});
},
_checkError: function (v) {
if(BI.isNotNull(v)) {
v = BI.isArray(v) ? v : [v];
var result = BI.find(this.options.items, function (idx, item) {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.element.removeClass("combo-error");
}
}
},
setValue: function (v) {
this.trigger.setValue(v);
this.popup.setValue(v);
this._checkError(v);
},
getValue: function () {

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

40
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

32
dist/case.js vendored

@ -5766,6 +5766,20 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
bottom: 0,
top: 0
}]
};
},
_checkError: function (v) {
if(BI.isNotNull(v)) {
v = BI.isArray(v) ? v : [v];
var result = BI.find(this.options.items, function (idx, item) {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.element.removeClass("combo-error");
}
}
},
@ -5775,6 +5789,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
setValue: function (v) {
this.combo.setValue(v);
this._checkError(v);
},
getValue: function () {
@ -6238,7 +6253,7 @@ BI.shortcut("bi.text_value_check_combo_popup", BI.TextValueCheckComboPopup);/**
BI.TextValueCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-text-value-combo",
baseCls: "bi-text-value-combo",
height: 30,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "",
@ -6282,9 +6297,24 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
});
},
_checkError: function (v) {
if(BI.isNotNull(v)) {
v = BI.isArray(v) ? v : [v];
var result = BI.find(this.options.items, function (idx, item) {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.element.removeClass("combo-error");
}
}
},
setValue: function (v) {
this.trigger.setValue(v);
this.popup.setValue(v);
this._checkError(v);
},
getValue: function () {

2
dist/demo.js vendored

@ -2091,7 +2091,7 @@ Demo.SearchTextValueCombo = BI.inherit(BI.Widget, {
width: 90,
height: 25,
handler: function () {
combo.setValue(3);
combo.setValue(11);
}
}],
vgap: 20

7
dist/fineui.css vendored

@ -2334,6 +2334,13 @@ textarea {
.bi-search-text-value-combo .trigger-icon-button {
font-size: 16px;
}
.bi-search-text-value-combo.combo-error .bi-search-text-value-trigger .bi-text-button {
color: #ff4949;
}
.bi-text-value-combo.combo-error .bi-select-text-trigger .bi-label {
color: #ff4949;
}
.bi-search-text-value-combo .trigger-icon-button {
font-size: 16px;
}

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

40
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

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

@ -101,6 +101,20 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
bottom: 0,
top: 0
}]
};
},
_checkError: function (v) {
if(BI.isNotNull(v)) {
v = BI.isArray(v) ? v : [v];
var result = BI.find(this.options.items, function (idx, item) {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.element.removeClass("combo-error");
}
}
},
@ -110,6 +124,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
setValue: function (v) {
this.combo.setValue(v);
this._checkError(v);
},
getValue: function () {

17
src/case/combo/textvaluecombo/combo.textvalue.js

@ -7,7 +7,7 @@
BI.TextValueCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseClass: "bi-text-value-combo",
baseCls: "bi-text-value-combo",
height: 30,
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
text: "",
@ -51,9 +51,24 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
});
},
_checkError: function (v) {
if(BI.isNotNull(v)) {
v = BI.isArray(v) ? v : [v];
var result = BI.find(this.options.items, function (idx, item) {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.element.removeClass("combo-error");
}
}
},
setValue: function (v) {
this.trigger.setValue(v);
this.popup.setValue(v);
this._checkError(v);
},
getValue: function () {

7
src/css/base/combo/combo.css

@ -115,3 +115,10 @@
.bi-search-text-value-combo .trigger-icon-button {
font-size: 16px;
}
.bi-search-text-value-combo.combo-error .bi-search-text-value-trigger .bi-text-button {
color: #ff4949;
}
.bi-text-value-combo.combo-error .bi-select-text-trigger .bi-label {
color: #ff4949;
}

7
src/less/base/combo/combo.searchtextvalue.less

@ -4,4 +4,11 @@
& .trigger-icon-button{
font-size: 16px;
}
&.combo-error {
& .bi-search-text-value-trigger{
& .bi-text-button {
color: @color-bi-text-failure;
}
}
}
}

11
src/less/base/combo/combo.textvalue.less

@ -0,0 +1,11 @@
@import "../../index";
.bi-text-value-combo{
&.combo-error {
& .bi-select-text-trigger {
& .bi-label{
color: @color-bi-text-failure;
}
}
}
}
Loading…
Cancel
Save