Browse Source

combo.text.value支持warningTitle提示,用于支持行列转化的标红

master
MrErHu 6 years ago
parent
commit
876c1e57aa
  1. 30
      dist/bundle.ie.js
  2. 36
      dist/bundle.ie.min.js
  3. 30
      dist/bundle.js
  4. 36
      dist/bundle.min.js
  5. 30
      dist/case.js
  6. 30
      dist/fineui.ie.js
  7. 36
      dist/fineui.ie.min.js
  8. 30
      dist/fineui.js
  9. 36
      dist/fineui.min.js
  10. 30
      dist/fineui_without_jquery_polyfill.js
  11. 2
      dist/utils.min.js
  12. 7
      src/case/combo/textvaluecombo/combo.textvalue.js
  13. 8
      src/case/trigger/trigger.text.js
  14. 12
      src/case/trigger/trigger.text.select.js

30
dist/bundle.ie.js vendored

@ -53548,7 +53548,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items, items: o.items,
height: o.height, height: o.height,
text: o.text, text: o.text,
value: o.value value: o.value,
warningTitle: o.warningTitle
}); });
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.text_value_combo_popup", type: "bi.text_value_combo_popup",
@ -53587,8 +53588,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value); return BI.contains(v, item.value);
}); });
if (BI.isNull(result)) { if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error"); this.element.removeClass("combo-error").addClass("combo-error");
} else { } else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error"); this.element.removeClass("combo-error");
} }
} }
@ -53611,7 +53614,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
} }
}); });
BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.text_value_combo", BI.TextValueCombo);/** BI.shortcut("bi.text_value_combo", BI.TextValueCombo);
/**
* @class BI.SmallTextValueCombo * @class BI.SmallTextValueCombo
* @extend BI.Widget * @extend BI.Widget
* combo : text + icon, popup : text * combo : text + icon, popup : text
@ -57892,6 +57896,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () { title: function () {
return self.text.getText(); return self.text.getText();
}, },
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap, hgap: c.hgap,
readonly: o.readonly readonly: o.readonly
}); });
@ -57916,9 +57922,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (text) { setText: function (text) {
this.text.setText(text); this.text.setText(text);
},
setTipType: function (v) {
this.text.options.tipType = v;
} }
}); });
BI.shortcut("bi.text_trigger", BI.TextTrigger);/** BI.shortcut("bi.text_trigger", BI.TextTrigger);
/**
* 选择字段trigger * 选择字段trigger
* *
* Created by GUY on 2015/9/15. * Created by GUY on 2015/9/15.
@ -57943,10 +57954,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this, element: this,
height: o.height, height: o.height,
readonly: o.readonly, readonly: o.readonly,
text: this._digest(o.value, o.items) text: this._digest(o.value, o.items),
tipType: o.tipType,
warningTitle: o.warningTitle
}); });
}, },
_digest: function(vals, items){ _digest: function(vals, items){
var o = this.options; var o = this.options;
vals = BI.isArray(vals) ? vals : [vals]; vals = BI.isArray(vals) ? vals : [vals];
@ -57969,11 +57982,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items)); this.trigger.setText(this._digest(vals, this.options.items));
}, },
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) { populate: function (items) {
this.options.items = items; this.options.items = items;
} }
}); });
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/** BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的 * 选择字段trigger小一号的
* *
* @class BI.SmallSelectTextTrigger * @class BI.SmallSelectTextTrigger

36
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/bundle.js vendored

@ -54099,7 +54099,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items, items: o.items,
height: o.height, height: o.height,
text: o.text, text: o.text,
value: o.value value: o.value,
warningTitle: o.warningTitle
}); });
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.text_value_combo_popup", type: "bi.text_value_combo_popup",
@ -54138,8 +54139,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value); return BI.contains(v, item.value);
}); });
if (BI.isNull(result)) { if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error"); this.element.removeClass("combo-error").addClass("combo-error");
} else { } else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error"); this.element.removeClass("combo-error");
} }
} }
@ -54162,7 +54165,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
} }
}); });
BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.text_value_combo", BI.TextValueCombo);/** BI.shortcut("bi.text_value_combo", BI.TextValueCombo);
/**
* @class BI.SmallTextValueCombo * @class BI.SmallTextValueCombo
* @extend BI.Widget * @extend BI.Widget
* combo : text + icon, popup : text * combo : text + icon, popup : text
@ -58443,6 +58447,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () { title: function () {
return self.text.getText(); return self.text.getText();
}, },
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap, hgap: c.hgap,
readonly: o.readonly readonly: o.readonly
}); });
@ -58467,9 +58473,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (text) { setText: function (text) {
this.text.setText(text); this.text.setText(text);
},
setTipType: function (v) {
this.text.options.tipType = v;
} }
}); });
BI.shortcut("bi.text_trigger", BI.TextTrigger);/** BI.shortcut("bi.text_trigger", BI.TextTrigger);
/**
* 选择字段trigger * 选择字段trigger
* *
* Created by GUY on 2015/9/15. * Created by GUY on 2015/9/15.
@ -58494,10 +58505,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this, element: this,
height: o.height, height: o.height,
readonly: o.readonly, readonly: o.readonly,
text: this._digest(o.value, o.items) text: this._digest(o.value, o.items),
tipType: o.tipType,
warningTitle: o.warningTitle
}); });
}, },
_digest: function(vals, items){ _digest: function(vals, items){
var o = this.options; var o = this.options;
vals = BI.isArray(vals) ? vals : [vals]; vals = BI.isArray(vals) ? vals : [vals];
@ -58520,11 +58533,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items)); this.trigger.setText(this._digest(vals, this.options.items));
}, },
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) { populate: function (items) {
this.options.items = items; this.options.items = items;
} }
}); });
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/** BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的 * 选择字段trigger小一号的
* *
* @class BI.SmallSelectTextTrigger * @class BI.SmallSelectTextTrigger

36
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/case.js vendored

@ -5246,7 +5246,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items, items: o.items,
height: o.height, height: o.height,
text: o.text, text: o.text,
value: o.value value: o.value,
warningTitle: o.warningTitle
}); });
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.text_value_combo_popup", type: "bi.text_value_combo_popup",
@ -5285,8 +5286,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value); return BI.contains(v, item.value);
}); });
if (BI.isNull(result)) { if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error"); this.element.removeClass("combo-error").addClass("combo-error");
} else { } else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error"); this.element.removeClass("combo-error");
} }
} }
@ -5309,7 +5312,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
} }
}); });
BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.text_value_combo", BI.TextValueCombo);/** BI.shortcut("bi.text_value_combo", BI.TextValueCombo);
/**
* @class BI.SmallTextValueCombo * @class BI.SmallTextValueCombo
* @extend BI.Widget * @extend BI.Widget
* combo : text + icon, popup : text * combo : text + icon, popup : text
@ -9590,6 +9594,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () { title: function () {
return self.text.getText(); return self.text.getText();
}, },
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap, hgap: c.hgap,
readonly: o.readonly readonly: o.readonly
}); });
@ -9614,9 +9620,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (text) { setText: function (text) {
this.text.setText(text); this.text.setText(text);
},
setTipType: function (v) {
this.text.options.tipType = v;
} }
}); });
BI.shortcut("bi.text_trigger", BI.TextTrigger);/** BI.shortcut("bi.text_trigger", BI.TextTrigger);
/**
* 选择字段trigger * 选择字段trigger
* *
* Created by GUY on 2015/9/15. * Created by GUY on 2015/9/15.
@ -9641,10 +9652,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this, element: this,
height: o.height, height: o.height,
readonly: o.readonly, readonly: o.readonly,
text: this._digest(o.value, o.items) text: this._digest(o.value, o.items),
tipType: o.tipType,
warningTitle: o.warningTitle
}); });
}, },
_digest: function(vals, items){ _digest: function(vals, items){
var o = this.options; var o = this.options;
vals = BI.isArray(vals) ? vals : [vals]; vals = BI.isArray(vals) ? vals : [vals];
@ -9667,11 +9680,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items)); this.trigger.setText(this._digest(vals, this.options.items));
}, },
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) { populate: function (items) {
this.options.items = items; this.options.items = items;
} }
}); });
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/** BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的 * 选择字段trigger小一号的
* *
* @class BI.SmallSelectTextTrigger * @class BI.SmallSelectTextTrigger

30
dist/fineui.ie.js vendored

@ -53790,7 +53790,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items, items: o.items,
height: o.height, height: o.height,
text: o.text, text: o.text,
value: o.value value: o.value,
warningTitle: o.warningTitle
}); });
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.text_value_combo_popup", type: "bi.text_value_combo_popup",
@ -53829,8 +53830,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value); return BI.contains(v, item.value);
}); });
if (BI.isNull(result)) { if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error"); this.element.removeClass("combo-error").addClass("combo-error");
} else { } else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error"); this.element.removeClass("combo-error");
} }
} }
@ -53853,7 +53856,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
} }
}); });
BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.text_value_combo", BI.TextValueCombo);/** BI.shortcut("bi.text_value_combo", BI.TextValueCombo);
/**
* @class BI.SmallTextValueCombo * @class BI.SmallTextValueCombo
* @extend BI.Widget * @extend BI.Widget
* combo : text + icon, popup : text * combo : text + icon, popup : text
@ -58134,6 +58138,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () { title: function () {
return self.text.getText(); return self.text.getText();
}, },
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap, hgap: c.hgap,
readonly: o.readonly readonly: o.readonly
}); });
@ -58158,9 +58164,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (text) { setText: function (text) {
this.text.setText(text); this.text.setText(text);
},
setTipType: function (v) {
this.text.options.tipType = v;
} }
}); });
BI.shortcut("bi.text_trigger", BI.TextTrigger);/** BI.shortcut("bi.text_trigger", BI.TextTrigger);
/**
* 选择字段trigger * 选择字段trigger
* *
* Created by GUY on 2015/9/15. * Created by GUY on 2015/9/15.
@ -58185,10 +58196,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this, element: this,
height: o.height, height: o.height,
readonly: o.readonly, readonly: o.readonly,
text: this._digest(o.value, o.items) text: this._digest(o.value, o.items),
tipType: o.tipType,
warningTitle: o.warningTitle
}); });
}, },
_digest: function(vals, items){ _digest: function(vals, items){
var o = this.options; var o = this.options;
vals = BI.isArray(vals) ? vals : [vals]; vals = BI.isArray(vals) ? vals : [vals];
@ -58211,11 +58224,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items)); this.trigger.setText(this._digest(vals, this.options.items));
}, },
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) { populate: function (items) {
this.options.items = items; this.options.items = items;
} }
}); });
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/** BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的 * 选择字段trigger小一号的
* *
* @class BI.SmallSelectTextTrigger * @class BI.SmallSelectTextTrigger

36
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/fineui.js vendored

@ -54341,7 +54341,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items, items: o.items,
height: o.height, height: o.height,
text: o.text, text: o.text,
value: o.value value: o.value,
warningTitle: o.warningTitle
}); });
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.text_value_combo_popup", type: "bi.text_value_combo_popup",
@ -54380,8 +54381,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value); return BI.contains(v, item.value);
}); });
if (BI.isNull(result)) { if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error"); this.element.removeClass("combo-error").addClass("combo-error");
} else { } else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error"); this.element.removeClass("combo-error");
} }
} }
@ -54404,7 +54407,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
} }
}); });
BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.text_value_combo", BI.TextValueCombo);/** BI.shortcut("bi.text_value_combo", BI.TextValueCombo);
/**
* @class BI.SmallTextValueCombo * @class BI.SmallTextValueCombo
* @extend BI.Widget * @extend BI.Widget
* combo : text + icon, popup : text * combo : text + icon, popup : text
@ -58685,6 +58689,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () { title: function () {
return self.text.getText(); return self.text.getText();
}, },
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap, hgap: c.hgap,
readonly: o.readonly readonly: o.readonly
}); });
@ -58709,9 +58715,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (text) { setText: function (text) {
this.text.setText(text); this.text.setText(text);
},
setTipType: function (v) {
this.text.options.tipType = v;
} }
}); });
BI.shortcut("bi.text_trigger", BI.TextTrigger);/** BI.shortcut("bi.text_trigger", BI.TextTrigger);
/**
* 选择字段trigger * 选择字段trigger
* *
* Created by GUY on 2015/9/15. * Created by GUY on 2015/9/15.
@ -58736,10 +58747,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this, element: this,
height: o.height, height: o.height,
readonly: o.readonly, readonly: o.readonly,
text: this._digest(o.value, o.items) text: this._digest(o.value, o.items),
tipType: o.tipType,
warningTitle: o.warningTitle
}); });
}, },
_digest: function(vals, items){ _digest: function(vals, items){
var o = this.options; var o = this.options;
vals = BI.isArray(vals) ? vals : [vals]; vals = BI.isArray(vals) ? vals : [vals];
@ -58762,11 +58775,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items)); this.trigger.setText(this._digest(vals, this.options.items));
}, },
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) { populate: function (items) {
this.options.items = items; this.options.items = items;
} }
}); });
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/** BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的 * 选择字段trigger小一号的
* *
* @class BI.SmallSelectTextTrigger * @class BI.SmallSelectTextTrigger

36
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/fineui_without_jquery_polyfill.js vendored

@ -37423,7 +37423,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items, items: o.items,
height: o.height, height: o.height,
text: o.text, text: o.text,
value: o.value value: o.value,
warningTitle: o.warningTitle
}); });
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.text_value_combo_popup", type: "bi.text_value_combo_popup",
@ -37462,8 +37463,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value); return BI.contains(v, item.value);
}); });
if (BI.isNull(result)) { if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error"); this.element.removeClass("combo-error").addClass("combo-error");
} else { } else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error"); this.element.removeClass("combo-error");
} }
} }
@ -37486,7 +37489,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
} }
}); });
BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.text_value_combo", BI.TextValueCombo);/** BI.shortcut("bi.text_value_combo", BI.TextValueCombo);
/**
* @class BI.SmallTextValueCombo * @class BI.SmallTextValueCombo
* @extend BI.Widget * @extend BI.Widget
* combo : text + icon, popup : text * combo : text + icon, popup : text
@ -41569,6 +41573,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () { title: function () {
return self.text.getText(); return self.text.getText();
}, },
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap, hgap: c.hgap,
readonly: o.readonly readonly: o.readonly
}); });
@ -41593,9 +41599,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (text) { setText: function (text) {
this.text.setText(text); this.text.setText(text);
},
setTipType: function (v) {
this.text.options.tipType = v;
} }
}); });
BI.shortcut("bi.text_trigger", BI.TextTrigger);/** BI.shortcut("bi.text_trigger", BI.TextTrigger);
/**
* 选择字段trigger * 选择字段trigger
* *
* Created by GUY on 2015/9/15. * Created by GUY on 2015/9/15.
@ -41620,10 +41631,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this, element: this,
height: o.height, height: o.height,
readonly: o.readonly, readonly: o.readonly,
text: this._digest(o.value, o.items) text: this._digest(o.value, o.items),
tipType: o.tipType,
warningTitle: o.warningTitle
}); });
}, },
_digest: function(vals, items){ _digest: function(vals, items){
var o = this.options; var o = this.options;
vals = BI.isArray(vals) ? vals : [vals]; vals = BI.isArray(vals) ? vals : [vals];
@ -41646,11 +41659,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items)); this.trigger.setText(this._digest(vals, this.options.items));
}, },
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) { populate: function (items) {
this.options.items = items; this.options.items = items;
} }
}); });
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/** BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的 * 选择字段trigger小一号的
* *
* @class BI.SmallSelectTextTrigger * @class BI.SmallSelectTextTrigger

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

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

@ -27,7 +27,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items, items: o.items,
height: o.height, height: o.height,
text: o.text, text: o.text,
value: o.value value: o.value,
warningTitle: o.warningTitle
}); });
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.text_value_combo_popup", type: "bi.text_value_combo_popup",
@ -66,8 +67,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value); return BI.contains(v, item.value);
}); });
if (BI.isNull(result)) { if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error"); this.element.removeClass("combo-error").addClass("combo-error");
} else { } else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error"); this.element.removeClass("combo-error");
} }
} }
@ -90,4 +93,4 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
} }
}); });
BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.text_value_combo", BI.TextValueCombo); BI.shortcut("bi.text_value_combo", BI.TextValueCombo);

8
src/case/trigger/trigger.text.js

@ -30,6 +30,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () { title: function () {
return self.text.getText(); return self.text.getText();
}, },
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap, hgap: c.hgap,
readonly: o.readonly readonly: o.readonly
}); });
@ -54,6 +56,10 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (text) { setText: function (text) {
this.text.setText(text); this.text.setText(text);
},
setTipType: function (v) {
this.text.options.tipType = v;
} }
}); });
BI.shortcut("bi.text_trigger", BI.TextTrigger); BI.shortcut("bi.text_trigger", BI.TextTrigger);

12
src/case/trigger/trigger.text.select.js

@ -23,10 +23,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this, element: this,
height: o.height, height: o.height,
readonly: o.readonly, readonly: o.readonly,
text: this._digest(o.value, o.items) text: this._digest(o.value, o.items),
tipType: o.tipType,
warningTitle: o.warningTitle
}); });
}, },
_digest: function(vals, items){ _digest: function(vals, items){
var o = this.options; var o = this.options;
vals = BI.isArray(vals) ? vals : [vals]; vals = BI.isArray(vals) ? vals : [vals];
@ -49,8 +51,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items)); this.trigger.setText(this._digest(vals, this.options.items));
}, },
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) { populate: function (items) {
this.options.items = items; this.options.items = items;
} }
}); });
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger); BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);

Loading…
Cancel
Save