Browse Source

Merge branch 'master' of ssh://cloud.finedevelop.com:7999/~windy/fineui

es6
windy 6 years ago
parent
commit
63bf5e3082
  1. 1
      dist/base.js
  2. 175
      dist/bundle.ie.js
  3. 60
      dist/bundle.ie.min.js
  4. 117
      dist/bundle.js
  5. 52
      dist/bundle.min.js
  6. 49
      dist/case.js
  7. 20
      dist/core.js
  8. 175
      dist/fineui.ie.js
  9. 60
      dist/fineui.ie.min.js
  10. 117
      dist/fineui.js
  11. 52
      dist/fineui.min.js
  12. 116
      dist/fineui_without_jquery_polyfill.js
  13. 58
      dist/fix/fix.ie.js
  14. 20
      dist/utils.js
  15. 6
      dist/utils.min.js
  16. 47
      dist/widget.js
  17. 1
      src/base/tree/ztree/treeview.js
  18. 7
      src/case/combo/icontextvaluecombo/combo.icontextvalue.js
  19. 7
      src/case/combo/textvaluecombo/combo.textvalue.js
  20. 10
      src/case/editor/editor.state.js
  21. 8
      src/case/trigger/trigger.text.js
  22. 12
      src/case/trigger/trigger.text.select.js
  23. 1
      src/component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo.js
  24. 20
      src/core/base.js
  25. 10
      src/widget/multiselect/trigger/editor.multiselect.js
  26. 13
      src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js
  27. 10
      src/widget/searchmultitextvaluecombo/multitextvalue.combo.trigger.search.js
  28. 10
      src/widget/searchmultitextvaluecombo/trigger/searcher.multitextvalue.js

1
dist/base.js vendored

@ -1945,6 +1945,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();

175
dist/bundle.ie.js vendored

@ -10156,9 +10156,17 @@ if (!_global.BI) {
}
var len = arguments.length;
if (len > 1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
@ -10567,7 +10575,7 @@ if (!_global.BI) {
};
}
var F = function () {
}, spp = sp.prototype;
}, spp = sp.prototype;
F.prototype = spp;
sb.prototype = new F();
sb.superclass = spp;
@ -10801,7 +10809,7 @@ if (!_global.BI) {
var pending = false;
var timerFunc;
function nextTickHandler () {
function nextTickHandler() {
pending = false;
var copies = callbacks.slice(0);
callbacks = [];
@ -10834,7 +10842,7 @@ if (!_global.BI) {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick (cb) {
return function queueNextTick(cb) {
var _resolve;
var args = [].slice.call(arguments, 1);
callbacks.push(function () {
@ -34221,7 +34229,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var model = vm;
if (!model.addWatch && model.$vm) {
if (!model.$watch && model.$vm) {
model = model.$vm;
}
if (isPlainObject(cb)) {
@ -34235,7 +34243,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
options.user = true;
var exps = void 0;
if (_$1.isFunction(expOrFn) || !(exps = expOrFn.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g)) || exps.length === 1 && !/\*/.test(expOrFn)) {
model.addWatch(expOrFn, cb, options);
model.$watch(expOrFn, cb, options);
return [];
}
@ -34290,7 +34298,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return result;
};
model.addWatch(getter, function (newValue, oldValue, attrs) {
model.$watch(getter, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));
}, _$1.extend(options, {
deep: isGlobal
@ -34334,13 +34342,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return currentModels;
};
model.addWatch(_getter, function (newValue, oldValue, attrs) {
model.$watch(_getter, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));
}, options);
return;
}
model.addWatch(exp, function (newValue, oldValue, attrs) {
model.$watch(exp, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));
}, options);
});
@ -34472,26 +34480,37 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var allModelInstances = {};
var emptyFn = function emptyFn() {};
var Watcher = function Watcher(_ref) {
var get = _ref.get,
last = _ref.last,
listener = _ref.listener,
sync = _ref.sync,
deep = _ref.deep;
var Watcher = function () {
function Watcher(_ref) {
var get = _ref.get,
last = _ref.last,
listener = _ref.listener,
sync = _ref.sync,
deep = _ref.deep;
_classCallCheck(this, Watcher);
_classCallCheck(this, Watcher);
this.get = get;
this.last = cloneShadow(last);
this.listener = listener || emptyFn;
this.sync = sync || false;
this.get = get;
this.last = cloneShadow(last);
this.listener = listener || emptyFn;
this.sync = sync || false;
return {
get: this.get,
last: this.last,
listener: this.listener
return {
get: this.get,
last: this.last,
listener: this.listener
};
}
// 不要去掉,为了兼容IE8,IE8下instance of Constructor如果不绑定函数会出错
Watcher.prototype.getInstance = function getInstance() {
return this;
};
};
return Watcher;
}();
function initState(vm, state) {
var watchers = vm._stateWatchers = {};
@ -34613,7 +34632,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var p = vm._parent;
while (p) {
if (p.childContext && p.childContext.indexOf(key) > -1) {
p.addWatch(key, function (cur, last, p) {
p.$watch(key, function (cur, last, p) {
if (!vm.alive) return;
vm.model[key] = cur;
vm._contextWatchers[key].last = cloneShadow(cur); // 避免重复调用(可以改成给watch添加一个参数保证下次比较一定相同)
@ -34734,6 +34753,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var watchers = [].concat(vm._watchers);
_$1.each(watchers, function (watcher) {
if (!watcher) return;
var cur = watcher.get();
var last = watcher.last;
@ -34801,7 +34821,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
Model.prototype._init = function _init() {};
Model.prototype.addWatch = function addWatch(expOrFn, cb, options) {
Model.prototype.$watch = function $watch(expOrFn, cb, options) {
var watcher = createWatcher(this, expOrFn, cb, options);
this._watchers.push(watcher);
};
@ -36815,6 +36835,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
@ -52845,7 +52866,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
iconWrapperWidth: o.iconWrapperWidth,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
@ -52886,8 +52908,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.options.tipType = "warning";
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
}
}
@ -52910,7 +52934,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
}
});
BI.IconTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);/**
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
/**
* Created by Windy on 2017/12/12.
*/
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
@ -53548,7 +53573,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height,
text: o.text,
value: o.value
value: o.value,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
@ -53587,8 +53613,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error");
}
}
@ -53611,7 +53639,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
}
});
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
* @extend BI.Widget
* combo : text + icon, popup : text
@ -54643,7 +54672,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
title = self.stateValue[0];
}
return title;
}
},
warningTitle: o.warningTitle,
tipType: o.tipType
});
this.text.on(BI.TextButton.EVENT_CHANGE, function () {
BI.nextTick(function () {
@ -54833,6 +54864,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.removeClass("state-editor-infinite-text");
}
}
},
setTipType: function (v) {
this.text.options.tipType = v;
}
});
BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE";
@ -54853,7 +54888,8 @@ BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT";
BI.StateEditor.EVENT_SPACE = "EVENT_SPACE";
BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY";
BI.shortcut("bi.state_editor", BI.StateEditor);/**
BI.shortcut("bi.state_editor", BI.StateEditor);
/**
* 无限制-已选择状态输入框
* Created by GUY on 2016/5/18.
* @class BI.SimpleStateEditor
@ -57892,6 +57928,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () {
return self.text.getText();
},
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap,
readonly: o.readonly
});
@ -57916,9 +57954,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (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
*
* Created by GUY on 2015/9/15.
@ -57943,10 +57986,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
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){
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
@ -57969,11 +58014,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items));
},
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) {
this.options.items = items;
}
});
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/**
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的
*
* @class BI.SmallSelectTextTrigger
@ -69039,7 +69089,9 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle,
});
this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -69070,6 +69122,10 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
this.editor.setValue(v);
},
setTipType: function (v) {
this.editor.setTipType(v);
},
getValue: function () {
var v = this.editor.getState();
if (BI.isArray(v) && v.length > 0) {
@ -69093,7 +69149,8 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
}
});
BI.MultiSelectEditor.EVENT_PAUSE = "MultiSelectEditor.EVENT_PAUSE";
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);/**
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);
/**
* searcher
* Created by guy on 15/11/3.
* @class BI.MultiSelectInsertSearcher
@ -72576,7 +72633,8 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
callback.apply(self, arguments);
});
},
value: this.storeValue
value: this.storeValue,
warningTitle: o.warningTitle
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {
@ -72950,12 +73008,20 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return !BI.contains(v, value);
});
if (BI.isNull(result)) {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
} else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
} else {
v.length === this.allValue.length ? this.element.removeClass("combo-error") : this.element.addClass("combo-error");
if(v.length === this.allValue.length){
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
}else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
}
},
@ -73034,7 +73100,9 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
adapter: o.adapter,
masker: o.masker,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {
self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START);
@ -73127,6 +73195,10 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
this.numberCounter.setValue(ob);
},
setTipType: function (v) {
this.searcher.setTipType(v);
},
getKey: function () {
return this.searcher.getKey();
},
@ -73145,7 +73217,8 @@ BI.SearchMultiSelectTrigger.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectTrigger.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = "EVENT_BEFORE_COUNTER_POPUPVIEW";
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);/**
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);
/**
* 多选加载数据面板
* Created by guy on 15/11/2.
* @class BI.SearchMultiSelectLoader
@ -73426,7 +73499,9 @@ BI.shortcut("bi.search_multi_select_popup_view", BI.SearchMultiSelectPopupView);
this.editor = BI.createWidget(o.el, {
type: "bi.multi_select_editor",
height: o.height,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher = BI.createWidget({
@ -73551,6 +73626,10 @@ BI.shortcut("bi.search_multi_select_popup_view", BI.SearchMultiSelectPopupView);
}
},
setTipType: function (v) {
this.editor.setTipType(v);
},
setValue: function (ob) {
this.setState(ob);
this.searcher.setValue(ob);
@ -73575,7 +73654,8 @@ BI.SearchMultiSelectSearcher.EVENT_START = "EVENT_START";
BI.SearchMultiSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SearchMultiSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);/**
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);
/**
* 加号表示的组节点
* Created by GUY on 2015/9/6.
* @class BI.SelectTreeFirstPlusGroupNode
@ -80454,6 +80534,7 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
value: value,
numOfPage: 100,
valueFormatter: o.valueFormatter,
warningTitle: o.warningTitle,
listeners: [{
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,
action: function () {

60
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

117
dist/bundle.js vendored

@ -10156,9 +10156,17 @@ if (!_global.BI) {
}
var len = arguments.length;
if (len > 1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
@ -10567,7 +10575,7 @@ if (!_global.BI) {
};
}
var F = function () {
}, spp = sp.prototype;
}, spp = sp.prototype;
F.prototype = spp;
sb.prototype = new F();
sb.superclass = spp;
@ -10801,7 +10809,7 @@ if (!_global.BI) {
var pending = false;
var timerFunc;
function nextTickHandler () {
function nextTickHandler() {
pending = false;
var copies = callbacks.slice(0);
callbacks = [];
@ -10834,7 +10842,7 @@ if (!_global.BI) {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick (cb) {
return function queueNextTick(cb) {
var _resolve;
var args = [].slice.call(arguments, 1);
callbacks.push(function () {
@ -37366,6 +37374,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
@ -53396,7 +53405,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
iconWrapperWidth: o.iconWrapperWidth,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
@ -53437,8 +53447,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.options.tipType = "warning";
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
}
}
@ -53461,7 +53473,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
}
});
BI.IconTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);/**
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
/**
* Created by Windy on 2017/12/12.
*/
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
@ -54099,7 +54112,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height,
text: o.text,
value: o.value
value: o.value,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
@ -54138,8 +54152,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error");
}
}
@ -54162,7 +54178,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
}
});
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
* @extend BI.Widget
* combo : text + icon, popup : text
@ -55194,7 +55211,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
title = self.stateValue[0];
}
return title;
}
},
warningTitle: o.warningTitle,
tipType: o.tipType
});
this.text.on(BI.TextButton.EVENT_CHANGE, function () {
BI.nextTick(function () {
@ -55384,6 +55403,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.removeClass("state-editor-infinite-text");
}
}
},
setTipType: function (v) {
this.text.options.tipType = v;
}
});
BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE";
@ -55404,7 +55427,8 @@ BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT";
BI.StateEditor.EVENT_SPACE = "EVENT_SPACE";
BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY";
BI.shortcut("bi.state_editor", BI.StateEditor);/**
BI.shortcut("bi.state_editor", BI.StateEditor);
/**
* 无限制-已选择状态输入框
* Created by GUY on 2016/5/18.
* @class BI.SimpleStateEditor
@ -58443,6 +58467,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () {
return self.text.getText();
},
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap,
readonly: o.readonly
});
@ -58467,9 +58493,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (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
*
* Created by GUY on 2015/9/15.
@ -58494,10 +58525,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
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){
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
@ -58520,11 +58553,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items));
},
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) {
this.options.items = items;
}
});
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/**
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的
*
* @class BI.SmallSelectTextTrigger
@ -69590,7 +69628,9 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle,
});
this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -69621,6 +69661,10 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
this.editor.setValue(v);
},
setTipType: function (v) {
this.editor.setTipType(v);
},
getValue: function () {
var v = this.editor.getState();
if (BI.isArray(v) && v.length > 0) {
@ -69644,7 +69688,8 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
}
});
BI.MultiSelectEditor.EVENT_PAUSE = "MultiSelectEditor.EVENT_PAUSE";
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);/**
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);
/**
* searcher
* Created by guy on 15/11/3.
* @class BI.MultiSelectInsertSearcher
@ -73127,7 +73172,8 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
callback.apply(self, arguments);
});
},
value: this.storeValue
value: this.storeValue,
warningTitle: o.warningTitle
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {
@ -73501,12 +73547,20 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return !BI.contains(v, value);
});
if (BI.isNull(result)) {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
} else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
} else {
v.length === this.allValue.length ? this.element.removeClass("combo-error") : this.element.addClass("combo-error");
if(v.length === this.allValue.length){
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
}else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
}
},
@ -73585,7 +73639,9 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
adapter: o.adapter,
masker: o.masker,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {
self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START);
@ -73678,6 +73734,10 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
this.numberCounter.setValue(ob);
},
setTipType: function (v) {
this.searcher.setTipType(v);
},
getKey: function () {
return this.searcher.getKey();
},
@ -73696,7 +73756,8 @@ BI.SearchMultiSelectTrigger.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectTrigger.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = "EVENT_BEFORE_COUNTER_POPUPVIEW";
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);/**
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);
/**
* 多选加载数据面板
* Created by guy on 15/11/2.
* @class BI.SearchMultiSelectLoader
@ -73977,7 +74038,9 @@ BI.shortcut("bi.search_multi_select_popup_view", BI.SearchMultiSelectPopupView);
this.editor = BI.createWidget(o.el, {
type: "bi.multi_select_editor",
height: o.height,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher = BI.createWidget({
@ -74102,6 +74165,10 @@ BI.shortcut("bi.search_multi_select_popup_view", BI.SearchMultiSelectPopupView);
}
},
setTipType: function (v) {
this.editor.setTipType(v);
},
setValue: function (ob) {
this.setState(ob);
this.searcher.setValue(ob);
@ -74126,7 +74193,8 @@ BI.SearchMultiSelectSearcher.EVENT_START = "EVENT_START";
BI.SearchMultiSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SearchMultiSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);/**
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);
/**
* 加号表示的组节点
* Created by GUY on 2015/9/6.
* @class BI.SelectTreeFirstPlusGroupNode
@ -81005,6 +81073,7 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
value: value,
numOfPage: 100,
valueFormatter: o.valueFormatter,
warningTitle: o.warningTitle,
listeners: [{
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,
action: function () {

52
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

49
dist/case.js vendored

@ -4543,7 +4543,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
iconWrapperWidth: o.iconWrapperWidth,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
@ -4584,8 +4585,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.options.tipType = "warning";
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
}
}
@ -4608,7 +4611,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
}
});
BI.IconTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);/**
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
/**
* Created by Windy on 2017/12/12.
*/
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
@ -5246,7 +5250,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height,
text: o.text,
value: o.value
value: o.value,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
@ -5285,8 +5290,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error");
}
}
@ -5309,7 +5316,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
}
});
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
* @extend BI.Widget
* combo : text + icon, popup : text
@ -6341,7 +6349,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
title = self.stateValue[0];
}
return title;
}
},
warningTitle: o.warningTitle,
tipType: o.tipType
});
this.text.on(BI.TextButton.EVENT_CHANGE, function () {
BI.nextTick(function () {
@ -6531,6 +6541,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.removeClass("state-editor-infinite-text");
}
}
},
setTipType: function (v) {
this.text.options.tipType = v;
}
});
BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE";
@ -6551,7 +6565,8 @@ BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT";
BI.StateEditor.EVENT_SPACE = "EVENT_SPACE";
BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY";
BI.shortcut("bi.state_editor", BI.StateEditor);/**
BI.shortcut("bi.state_editor", BI.StateEditor);
/**
* 无限制-已选择状态输入框
* Created by GUY on 2016/5/18.
* @class BI.SimpleStateEditor
@ -9590,6 +9605,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () {
return self.text.getText();
},
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap,
readonly: o.readonly
});
@ -9614,9 +9631,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (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
*
* Created by GUY on 2015/9/15.
@ -9641,10 +9663,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
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){
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
@ -9667,11 +9691,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items));
},
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) {
this.options.items = items;
}
});
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/**
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的
*
* @class BI.SmallSelectTextTrigger

20
dist/core.js vendored

@ -10156,9 +10156,17 @@ if (!_global.BI) {
}
var len = arguments.length;
if (len > 1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
@ -10567,7 +10575,7 @@ if (!_global.BI) {
};
}
var F = function () {
}, spp = sp.prototype;
}, spp = sp.prototype;
F.prototype = spp;
sb.prototype = new F();
sb.superclass = spp;
@ -10801,7 +10809,7 @@ if (!_global.BI) {
var pending = false;
var timerFunc;
function nextTickHandler () {
function nextTickHandler() {
pending = false;
var copies = callbacks.slice(0);
callbacks = [];
@ -10834,7 +10842,7 @@ if (!_global.BI) {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick (cb) {
return function queueNextTick(cb) {
var _resolve;
var args = [].slice.call(arguments, 1);
callbacks.push(function () {

175
dist/fineui.ie.js vendored

@ -10398,9 +10398,17 @@ if (!_global.BI) {
}
var len = arguments.length;
if (len > 1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
@ -10809,7 +10817,7 @@ if (!_global.BI) {
};
}
var F = function () {
}, spp = sp.prototype;
}, spp = sp.prototype;
F.prototype = spp;
sb.prototype = new F();
sb.superclass = spp;
@ -11043,7 +11051,7 @@ if (!_global.BI) {
var pending = false;
var timerFunc;
function nextTickHandler () {
function nextTickHandler() {
pending = false;
var copies = callbacks.slice(0);
callbacks = [];
@ -11076,7 +11084,7 @@ if (!_global.BI) {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick (cb) {
return function queueNextTick(cb) {
var _resolve;
var args = [].slice.call(arguments, 1);
callbacks.push(function () {
@ -34463,7 +34471,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var model = vm;
if (!model.addWatch && model.$vm) {
if (!model.$watch && model.$vm) {
model = model.$vm;
}
if (isPlainObject(cb)) {
@ -34477,7 +34485,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
options.user = true;
var exps = void 0;
if (_$1.isFunction(expOrFn) || !(exps = expOrFn.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g)) || exps.length === 1 && !/\*/.test(expOrFn)) {
model.addWatch(expOrFn, cb, options);
model.$watch(expOrFn, cb, options);
return [];
}
@ -34532,7 +34540,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return result;
};
model.addWatch(getter, function (newValue, oldValue, attrs) {
model.$watch(getter, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));
}, _$1.extend(options, {
deep: isGlobal
@ -34576,13 +34584,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return currentModels;
};
model.addWatch(_getter, function (newValue, oldValue, attrs) {
model.$watch(_getter, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));
}, options);
return;
}
model.addWatch(exp, function (newValue, oldValue, attrs) {
model.$watch(exp, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));
}, options);
});
@ -34714,26 +34722,37 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var allModelInstances = {};
var emptyFn = function emptyFn() {};
var Watcher = function Watcher(_ref) {
var get = _ref.get,
last = _ref.last,
listener = _ref.listener,
sync = _ref.sync,
deep = _ref.deep;
var Watcher = function () {
function Watcher(_ref) {
var get = _ref.get,
last = _ref.last,
listener = _ref.listener,
sync = _ref.sync,
deep = _ref.deep;
_classCallCheck(this, Watcher);
_classCallCheck(this, Watcher);
this.get = get;
this.last = cloneShadow(last);
this.listener = listener || emptyFn;
this.sync = sync || false;
this.get = get;
this.last = cloneShadow(last);
this.listener = listener || emptyFn;
this.sync = sync || false;
return {
get: this.get,
last: this.last,
listener: this.listener
return {
get: this.get,
last: this.last,
listener: this.listener
};
}
// 不要去掉,为了兼容IE8,IE8下instance of Constructor如果不绑定函数会出错
Watcher.prototype.getInstance = function getInstance() {
return this;
};
};
return Watcher;
}();
function initState(vm, state) {
var watchers = vm._stateWatchers = {};
@ -34855,7 +34874,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var p = vm._parent;
while (p) {
if (p.childContext && p.childContext.indexOf(key) > -1) {
p.addWatch(key, function (cur, last, p) {
p.$watch(key, function (cur, last, p) {
if (!vm.alive) return;
vm.model[key] = cur;
vm._contextWatchers[key].last = cloneShadow(cur); // 避免重复调用(可以改成给watch添加一个参数保证下次比较一定相同)
@ -34976,6 +34995,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var watchers = [].concat(vm._watchers);
_$1.each(watchers, function (watcher) {
if (!watcher) return;
var cur = watcher.get();
var last = watcher.last;
@ -35043,7 +35063,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
Model.prototype._init = function _init() {};
Model.prototype.addWatch = function addWatch(expOrFn, cb, options) {
Model.prototype.$watch = function $watch(expOrFn, cb, options) {
var watcher = createWatcher(this, expOrFn, cb, options);
this._watchers.push(watcher);
};
@ -37057,6 +37077,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
@ -53087,7 +53108,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
iconWrapperWidth: o.iconWrapperWidth,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
@ -53128,8 +53150,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.options.tipType = "warning";
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
}
}
@ -53152,7 +53176,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
}
});
BI.IconTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);/**
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
/**
* Created by Windy on 2017/12/12.
*/
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
@ -53790,7 +53815,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height,
text: o.text,
value: o.value
value: o.value,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
@ -53829,8 +53855,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error");
}
}
@ -53853,7 +53881,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
}
});
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
* @extend BI.Widget
* combo : text + icon, popup : text
@ -54885,7 +54914,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
title = self.stateValue[0];
}
return title;
}
},
warningTitle: o.warningTitle,
tipType: o.tipType
});
this.text.on(BI.TextButton.EVENT_CHANGE, function () {
BI.nextTick(function () {
@ -55075,6 +55106,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.removeClass("state-editor-infinite-text");
}
}
},
setTipType: function (v) {
this.text.options.tipType = v;
}
});
BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE";
@ -55095,7 +55130,8 @@ BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT";
BI.StateEditor.EVENT_SPACE = "EVENT_SPACE";
BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY";
BI.shortcut("bi.state_editor", BI.StateEditor);/**
BI.shortcut("bi.state_editor", BI.StateEditor);
/**
* 无限制-已选择状态输入框
* Created by GUY on 2016/5/18.
* @class BI.SimpleStateEditor
@ -58134,6 +58170,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () {
return self.text.getText();
},
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap,
readonly: o.readonly
});
@ -58158,9 +58196,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (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
*
* Created by GUY on 2015/9/15.
@ -58185,10 +58228,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
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){
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
@ -58211,11 +58256,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items));
},
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) {
this.options.items = items;
}
});
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/**
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的
*
* @class BI.SmallSelectTextTrigger
@ -69281,7 +69331,9 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle,
});
this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -69312,6 +69364,10 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
this.editor.setValue(v);
},
setTipType: function (v) {
this.editor.setTipType(v);
},
getValue: function () {
var v = this.editor.getState();
if (BI.isArray(v) && v.length > 0) {
@ -69335,7 +69391,8 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
}
});
BI.MultiSelectEditor.EVENT_PAUSE = "MultiSelectEditor.EVENT_PAUSE";
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);/**
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);
/**
* searcher
* Created by guy on 15/11/3.
* @class BI.MultiSelectInsertSearcher
@ -72818,7 +72875,8 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
callback.apply(self, arguments);
});
},
value: this.storeValue
value: this.storeValue,
warningTitle: o.warningTitle
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {
@ -73192,12 +73250,20 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return !BI.contains(v, value);
});
if (BI.isNull(result)) {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
} else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
} else {
v.length === this.allValue.length ? this.element.removeClass("combo-error") : this.element.addClass("combo-error");
if(v.length === this.allValue.length){
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
}else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
}
},
@ -73276,7 +73342,9 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
adapter: o.adapter,
masker: o.masker,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {
self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START);
@ -73369,6 +73437,10 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
this.numberCounter.setValue(ob);
},
setTipType: function (v) {
this.searcher.setTipType(v);
},
getKey: function () {
return this.searcher.getKey();
},
@ -73387,7 +73459,8 @@ BI.SearchMultiSelectTrigger.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectTrigger.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = "EVENT_BEFORE_COUNTER_POPUPVIEW";
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);/**
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);
/**
* 多选加载数据面板
* Created by guy on 15/11/2.
* @class BI.SearchMultiSelectLoader
@ -73668,7 +73741,9 @@ BI.shortcut("bi.search_multi_select_popup_view", BI.SearchMultiSelectPopupView);
this.editor = BI.createWidget(o.el, {
type: "bi.multi_select_editor",
height: o.height,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher = BI.createWidget({
@ -73793,6 +73868,10 @@ BI.shortcut("bi.search_multi_select_popup_view", BI.SearchMultiSelectPopupView);
}
},
setTipType: function (v) {
this.editor.setTipType(v);
},
setValue: function (ob) {
this.setState(ob);
this.searcher.setValue(ob);
@ -73817,7 +73896,8 @@ BI.SearchMultiSelectSearcher.EVENT_START = "EVENT_START";
BI.SearchMultiSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SearchMultiSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);/**
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);
/**
* 加号表示的组节点
* Created by GUY on 2015/9/6.
* @class BI.SelectTreeFirstPlusGroupNode
@ -80696,6 +80776,7 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
value: value,
numOfPage: 100,
valueFormatter: o.valueFormatter,
warningTitle: o.warningTitle,
listeners: [{
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,
action: function () {

60
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

117
dist/fineui.js vendored

@ -10398,9 +10398,17 @@ if (!_global.BI) {
}
var len = arguments.length;
if (len > 1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
@ -10809,7 +10817,7 @@ if (!_global.BI) {
};
}
var F = function () {
}, spp = sp.prototype;
}, spp = sp.prototype;
F.prototype = spp;
sb.prototype = new F();
sb.superclass = spp;
@ -11043,7 +11051,7 @@ if (!_global.BI) {
var pending = false;
var timerFunc;
function nextTickHandler () {
function nextTickHandler() {
pending = false;
var copies = callbacks.slice(0);
callbacks = [];
@ -11076,7 +11084,7 @@ if (!_global.BI) {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick (cb) {
return function queueNextTick(cb) {
var _resolve;
var args = [].slice.call(arguments, 1);
callbacks.push(function () {
@ -37608,6 +37616,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();
@ -53638,7 +53647,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
iconWrapperWidth: o.iconWrapperWidth,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
@ -53679,8 +53689,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.options.tipType = "warning";
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
}
}
@ -53703,7 +53715,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
}
});
BI.IconTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);/**
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
/**
* Created by Windy on 2017/12/12.
*/
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
@ -54341,7 +54354,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height,
text: o.text,
value: o.value
value: o.value,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
@ -54380,8 +54394,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error");
}
}
@ -54404,7 +54420,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
}
});
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
* @extend BI.Widget
* combo : text + icon, popup : text
@ -55436,7 +55453,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
title = self.stateValue[0];
}
return title;
}
},
warningTitle: o.warningTitle,
tipType: o.tipType
});
this.text.on(BI.TextButton.EVENT_CHANGE, function () {
BI.nextTick(function () {
@ -55626,6 +55645,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.removeClass("state-editor-infinite-text");
}
}
},
setTipType: function (v) {
this.text.options.tipType = v;
}
});
BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE";
@ -55646,7 +55669,8 @@ BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT";
BI.StateEditor.EVENT_SPACE = "EVENT_SPACE";
BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY";
BI.shortcut("bi.state_editor", BI.StateEditor);/**
BI.shortcut("bi.state_editor", BI.StateEditor);
/**
* 无限制-已选择状态输入框
* Created by GUY on 2016/5/18.
* @class BI.SimpleStateEditor
@ -58685,6 +58709,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () {
return self.text.getText();
},
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap,
readonly: o.readonly
});
@ -58709,9 +58735,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (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
*
* Created by GUY on 2015/9/15.
@ -58736,10 +58767,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
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){
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
@ -58762,11 +58795,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items));
},
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) {
this.options.items = items;
}
});
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/**
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的
*
* @class BI.SmallSelectTextTrigger
@ -69832,7 +69870,9 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle,
});
this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -69863,6 +69903,10 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
this.editor.setValue(v);
},
setTipType: function (v) {
this.editor.setTipType(v);
},
getValue: function () {
var v = this.editor.getState();
if (BI.isArray(v) && v.length > 0) {
@ -69886,7 +69930,8 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
}
});
BI.MultiSelectEditor.EVENT_PAUSE = "MultiSelectEditor.EVENT_PAUSE";
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);/**
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);
/**
* searcher
* Created by guy on 15/11/3.
* @class BI.MultiSelectInsertSearcher
@ -73369,7 +73414,8 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
callback.apply(self, arguments);
});
},
value: this.storeValue
value: this.storeValue,
warningTitle: o.warningTitle
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {
@ -73743,12 +73789,20 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return !BI.contains(v, value);
});
if (BI.isNull(result)) {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
} else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
} else {
v.length === this.allValue.length ? this.element.removeClass("combo-error") : this.element.addClass("combo-error");
if(v.length === this.allValue.length){
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
}else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
}
},
@ -73827,7 +73881,9 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
adapter: o.adapter,
masker: o.masker,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {
self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START);
@ -73920,6 +73976,10 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
this.numberCounter.setValue(ob);
},
setTipType: function (v) {
this.searcher.setTipType(v);
},
getKey: function () {
return this.searcher.getKey();
},
@ -73938,7 +73998,8 @@ BI.SearchMultiSelectTrigger.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectTrigger.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = "EVENT_BEFORE_COUNTER_POPUPVIEW";
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);/**
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);
/**
* 多选加载数据面板
* Created by guy on 15/11/2.
* @class BI.SearchMultiSelectLoader
@ -74219,7 +74280,9 @@ BI.shortcut("bi.search_multi_select_popup_view", BI.SearchMultiSelectPopupView);
this.editor = BI.createWidget(o.el, {
type: "bi.multi_select_editor",
height: o.height,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher = BI.createWidget({
@ -74344,6 +74407,10 @@ BI.shortcut("bi.search_multi_select_popup_view", BI.SearchMultiSelectPopupView);
}
},
setTipType: function (v) {
this.editor.setTipType(v);
},
setValue: function (ob) {
this.setState(ob);
this.searcher.setValue(ob);
@ -74368,7 +74435,8 @@ BI.SearchMultiSelectSearcher.EVENT_START = "EVENT_START";
BI.SearchMultiSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SearchMultiSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);/**
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);
/**
* 加号表示的组节点
* Created by GUY on 2015/9/6.
* @class BI.SelectTreeFirstPlusGroupNode
@ -81247,6 +81315,7 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
value: value,
numOfPage: 100,
valueFormatter: o.valueFormatter,
warningTitle: o.warningTitle,
listeners: [{
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,
action: function () {

52
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

116
dist/fineui_without_jquery_polyfill.js vendored

@ -10156,9 +10156,17 @@ if (!_global.BI) {
}
var len = arguments.length;
if (len > 1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
@ -10567,7 +10575,7 @@ if (!_global.BI) {
};
}
var F = function () {
}, spp = sp.prototype;
}, spp = sp.prototype;
F.prototype = spp;
sb.prototype = new F();
sb.superclass = spp;
@ -10801,7 +10809,7 @@ if (!_global.BI) {
var pending = false;
var timerFunc;
function nextTickHandler () {
function nextTickHandler() {
pending = false;
var copies = callbacks.slice(0);
callbacks = [];
@ -10834,7 +10842,7 @@ if (!_global.BI) {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick (cb) {
return function queueNextTick(cb) {
var _resolve;
var args = [].slice.call(arguments, 1);
callbacks.push(function () {
@ -36720,7 +36728,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
iconWrapperWidth: o.iconWrapperWidth,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
@ -36761,8 +36770,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.options.tipType = "warning";
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
}
}
@ -36785,7 +36796,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
}
});
BI.IconTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);/**
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
/**
* Created by Windy on 2017/12/12.
*/
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
@ -37423,7 +37435,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height,
text: o.text,
value: o.value
value: o.value,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
@ -37462,8 +37475,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error");
}
}
@ -37486,7 +37501,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
}
});
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
* @extend BI.Widget
* combo : text + icon, popup : text
@ -38518,7 +38534,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
title = self.stateValue[0];
}
return title;
}
},
warningTitle: o.warningTitle,
tipType: o.tipType
});
this.text.on(BI.TextButton.EVENT_CHANGE, function () {
BI.nextTick(function () {
@ -38708,6 +38726,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.removeClass("state-editor-infinite-text");
}
}
},
setTipType: function (v) {
this.text.options.tipType = v;
}
});
BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE";
@ -38728,7 +38750,8 @@ BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT";
BI.StateEditor.EVENT_SPACE = "EVENT_SPACE";
BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY";
BI.shortcut("bi.state_editor", BI.StateEditor);/**
BI.shortcut("bi.state_editor", BI.StateEditor);
/**
* 无限制-已选择状态输入框
* Created by GUY on 2016/5/18.
* @class BI.SimpleStateEditor
@ -41569,6 +41592,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () {
return self.text.getText();
},
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap,
readonly: o.readonly
});
@ -41593,9 +41618,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (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
*
* Created by GUY on 2015/9/15.
@ -41620,10 +41650,12 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
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){
var o = this.options;
vals = BI.isArray(vals) ? vals : [vals];
@ -41646,11 +41678,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items));
},
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) {
this.options.items = items;
}
});
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/**
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的
*
* @class BI.SmallSelectTextTrigger
@ -52716,7 +52753,9 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle,
});
this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -52747,6 +52786,10 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
this.editor.setValue(v);
},
setTipType: function (v) {
this.editor.setTipType(v);
},
getValue: function () {
var v = this.editor.getState();
if (BI.isArray(v) && v.length > 0) {
@ -52770,7 +52813,8 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
}
});
BI.MultiSelectEditor.EVENT_PAUSE = "MultiSelectEditor.EVENT_PAUSE";
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);/**
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);
/**
* searcher
* Created by guy on 15/11/3.
* @class BI.MultiSelectInsertSearcher
@ -56253,7 +56297,8 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
callback.apply(self, arguments);
});
},
value: this.storeValue
value: this.storeValue,
warningTitle: o.warningTitle
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {
@ -56627,12 +56672,20 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return !BI.contains(v, value);
});
if (BI.isNull(result)) {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
} else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
} else {
v.length === this.allValue.length ? this.element.removeClass("combo-error") : this.element.addClass("combo-error");
if(v.length === this.allValue.length){
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
}else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
}
},
@ -56711,7 +56764,9 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
adapter: o.adapter,
masker: o.masker,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {
self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START);
@ -56804,6 +56859,10 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
this.numberCounter.setValue(ob);
},
setTipType: function (v) {
this.searcher.setTipType(v);
},
getKey: function () {
return this.searcher.getKey();
},
@ -56822,7 +56881,8 @@ BI.SearchMultiSelectTrigger.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectTrigger.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = "EVENT_BEFORE_COUNTER_POPUPVIEW";
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);/**
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);
/**
* 多选加载数据面板
* Created by guy on 15/11/2.
* @class BI.SearchMultiSelectLoader
@ -57103,7 +57163,9 @@ BI.shortcut("bi.search_multi_select_popup_view", BI.SearchMultiSelectPopupView);
this.editor = BI.createWidget(o.el, {
type: "bi.multi_select_editor",
height: o.height,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher = BI.createWidget({
@ -57228,6 +57290,10 @@ BI.shortcut("bi.search_multi_select_popup_view", BI.SearchMultiSelectPopupView);
}
},
setTipType: function (v) {
this.editor.setTipType(v);
},
setValue: function (ob) {
this.setState(ob);
this.searcher.setValue(ob);
@ -57252,7 +57318,8 @@ BI.SearchMultiSelectSearcher.EVENT_START = "EVENT_START";
BI.SearchMultiSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SearchMultiSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);/**
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);
/**
* 加号表示的组节点
* Created by GUY on 2015/9/6.
* @class BI.SelectTreeFirstPlusGroupNode
@ -64131,6 +64198,7 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
value: value,
numOfPage: 100,
valueFormatter: o.valueFormatter,
warningTitle: o.warningTitle,
listeners: [{
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,
action: function () {

58
dist/fix/fix.ie.js vendored

@ -236,7 +236,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var model = vm;
if (!model.addWatch && model.$vm) {
if (!model.$watch && model.$vm) {
model = model.$vm;
}
if (isPlainObject(cb)) {
@ -250,7 +250,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
options.user = true;
var exps = void 0;
if (_$1.isFunction(expOrFn) || !(exps = expOrFn.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g)) || exps.length === 1 && !/\*/.test(expOrFn)) {
model.addWatch(expOrFn, cb, options);
model.$watch(expOrFn, cb, options);
return [];
}
@ -305,7 +305,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return result;
};
model.addWatch(getter, function (newValue, oldValue, attrs) {
model.$watch(getter, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));
}, _$1.extend(options, {
deep: isGlobal
@ -349,13 +349,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return currentModels;
};
model.addWatch(_getter, function (newValue, oldValue, attrs) {
model.$watch(_getter, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));
}, options);
return;
}
model.addWatch(exp, function (newValue, oldValue, attrs) {
model.$watch(exp, function (newValue, oldValue, attrs) {
callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));
}, options);
});
@ -487,26 +487,37 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var allModelInstances = {};
var emptyFn = function emptyFn() {};
var Watcher = function Watcher(_ref) {
var get = _ref.get,
last = _ref.last,
listener = _ref.listener,
sync = _ref.sync,
deep = _ref.deep;
var Watcher = function () {
function Watcher(_ref) {
var get = _ref.get,
last = _ref.last,
listener = _ref.listener,
sync = _ref.sync,
deep = _ref.deep;
_classCallCheck(this, Watcher);
this.get = get;
this.last = cloneShadow(last);
this.listener = listener || emptyFn;
this.sync = sync || false;
return {
get: this.get,
last: this.last,
listener: this.listener
};
}
_classCallCheck(this, Watcher);
// 不要去掉,为了兼容IE8,IE8下instance of Constructor如果不绑定函数会出错
this.get = get;
this.last = cloneShadow(last);
this.listener = listener || emptyFn;
this.sync = sync || false;
return {
get: this.get,
last: this.last,
listener: this.listener
Watcher.prototype.getInstance = function getInstance() {
return this;
};
};
return Watcher;
}();
function initState(vm, state) {
var watchers = vm._stateWatchers = {};
@ -628,7 +639,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var p = vm._parent;
while (p) {
if (p.childContext && p.childContext.indexOf(key) > -1) {
p.addWatch(key, function (cur, last, p) {
p.$watch(key, function (cur, last, p) {
if (!vm.alive) return;
vm.model[key] = cur;
vm._contextWatchers[key].last = cloneShadow(cur); // 避免重复调用(可以改成给watch添加一个参数保证下次比较一定相同)
@ -749,6 +760,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var watchers = [].concat(vm._watchers);
_$1.each(watchers, function (watcher) {
if (!watcher) return;
var cur = watcher.get();
var last = watcher.last;
@ -816,7 +828,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
Model.prototype._init = function _init() {};
Model.prototype.addWatch = function addWatch(expOrFn, cb, options) {
Model.prototype.$watch = function $watch(expOrFn, cb, options) {
var watcher = createWatcher(this, expOrFn, cb, options);
this._watchers.push(watcher);
};

20
dist/utils.js vendored

@ -10918,9 +10918,17 @@ if (!_global.BI) {
}
var len = arguments.length;
if (len > 1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
@ -11329,7 +11337,7 @@ if (!_global.BI) {
};
}
var F = function () {
}, spp = sp.prototype;
}, spp = sp.prototype;
F.prototype = spp;
sb.prototype = new F();
sb.superclass = spp;
@ -11563,7 +11571,7 @@ if (!_global.BI) {
var pending = false;
var timerFunc;
function nextTickHandler () {
function nextTickHandler() {
pending = false;
var copies = callbacks.slice(0);
callbacks = [];
@ -11596,7 +11604,7 @@ if (!_global.BI) {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick (cb) {
return function queueNextTick(cb) {
var _resolve;
var args = [].slice.call(arguments, 1);
callbacks.push(function () {

6
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

47
dist/widget.js vendored

@ -10945,7 +10945,9 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle,
});
this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -10976,6 +10978,10 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
this.editor.setValue(v);
},
setTipType: function (v) {
this.editor.setTipType(v);
},
getValue: function () {
var v = this.editor.getState();
if (BI.isArray(v) && v.length > 0) {
@ -10999,7 +11005,8 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
}
});
BI.MultiSelectEditor.EVENT_PAUSE = "MultiSelectEditor.EVENT_PAUSE";
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);/**
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);
/**
* searcher
* Created by guy on 15/11/3.
* @class BI.MultiSelectInsertSearcher
@ -14482,7 +14489,8 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
callback.apply(self, arguments);
});
},
value: this.storeValue
value: this.storeValue,
warningTitle: o.warningTitle
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {
@ -14856,12 +14864,20 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return !BI.contains(v, value);
});
if (BI.isNull(result)) {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
} else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
} else {
v.length === this.allValue.length ? this.element.removeClass("combo-error") : this.element.addClass("combo-error");
if(v.length === this.allValue.length){
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
}else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
}
},
@ -14940,7 +14956,9 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
adapter: o.adapter,
masker: o.masker,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {
self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START);
@ -15033,6 +15051,10 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
this.numberCounter.setValue(ob);
},
setTipType: function (v) {
this.searcher.setTipType(v);
},
getKey: function () {
return this.searcher.getKey();
},
@ -15051,7 +15073,8 @@ BI.SearchMultiSelectTrigger.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectTrigger.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = "EVENT_BEFORE_COUNTER_POPUPVIEW";
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);/**
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);
/**
* 多选加载数据面板
* Created by guy on 15/11/2.
* @class BI.SearchMultiSelectLoader
@ -15332,7 +15355,9 @@ BI.shortcut("bi.search_multi_select_popup_view", BI.SearchMultiSelectPopupView);
this.editor = BI.createWidget(o.el, {
type: "bi.multi_select_editor",
height: o.height,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher = BI.createWidget({
@ -15457,6 +15482,10 @@ BI.shortcut("bi.search_multi_select_popup_view", BI.SearchMultiSelectPopupView);
}
},
setTipType: function (v) {
this.editor.setTipType(v);
},
setValue: function (ob) {
this.setState(ob);
this.searcher.setValue(ob);
@ -15481,7 +15510,8 @@ BI.SearchMultiSelectSearcher.EVENT_START = "EVENT_START";
BI.SearchMultiSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SearchMultiSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);/**
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);
/**
* 加号表示的组节点
* Created by GUY on 2015/9/6.
* @class BI.SelectTreeFirstPlusGroupNode
@ -22360,6 +22390,7 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
value: value,
numOfPage: 100,
valueFormatter: o.valueFormatter,
warningTitle: o.warningTitle,
listeners: [{
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,
action: function () {

1
src/base/tree/ztree/treeview.js

@ -318,6 +318,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();

7
src/case/combo/icontextvaluecombo/combo.icontextvalue.js

@ -29,7 +29,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
iconWrapperWidth: o.iconWrapperWidth,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
@ -70,8 +71,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.options.tipType = "warning";
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
}
}
@ -94,4 +97,4 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
}
});
BI.IconTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);

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

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

10
src/case/editor/editor.state.js

@ -65,7 +65,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
title = self.stateValue[0];
}
return title;
}
},
warningTitle: o.warningTitle,
tipType: o.tipType
});
this.text.on(BI.TextButton.EVENT_CHANGE, function () {
BI.nextTick(function () {
@ -255,6 +257,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.removeClass("state-editor-infinite-text");
}
}
},
setTipType: function (v) {
this.text.options.tipType = v;
}
});
BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE";
@ -275,4 +281,4 @@ BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT";
BI.StateEditor.EVENT_SPACE = "EVENT_SPACE";
BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY";
BI.shortcut("bi.state_editor", BI.StateEditor);
BI.shortcut("bi.state_editor", BI.StateEditor);

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

@ -30,6 +30,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () {
return self.text.getText();
},
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap,
readonly: o.readonly
});
@ -54,6 +56,10 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (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,
height: o.height,
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){
var o = this.options;
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));
},
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) {
this.options.items = items;
}
});
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);

1
src/component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo.js

@ -18,6 +18,7 @@ BI.AllValueMultiTextValueCombo = BI.inherit(BI.Widget, {
value: value,
numOfPage: 100,
valueFormatter: o.valueFormatter,
warningTitle: o.warningTitle,
listeners: [{
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,
action: function () {

20
src/core/base.js

@ -45,9 +45,17 @@ if (!_global.BI) {
}
var len = arguments.length;
if (len > 1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
@ -456,7 +464,7 @@ if (!_global.BI) {
};
}
var F = function () {
}, spp = sp.prototype;
}, spp = sp.prototype;
F.prototype = spp;
sb.prototype = new F();
sb.superclass = spp;
@ -690,7 +698,7 @@ if (!_global.BI) {
var pending = false;
var timerFunc;
function nextTickHandler () {
function nextTickHandler() {
pending = false;
var copies = callbacks.slice(0);
callbacks = [];
@ -723,7 +731,7 @@ if (!_global.BI) {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick (cb) {
return function queueNextTick(cb) {
var _resolve;
var args = [].slice.call(arguments, 1);
callbacks.push(function () {

10
src/widget/multiselect/trigger/editor.multiselect.js

@ -23,7 +23,9 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
watermark: BI.i18nText("BI-Basic_Search"),
allowBlank: true,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle,
});
this.editor.on(BI.Controller.EVENT_CHANGE, function () {
@ -54,6 +56,10 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
this.editor.setValue(v);
},
setTipType: function (v) {
this.editor.setTipType(v);
},
getValue: function () {
var v = this.editor.getState();
if (BI.isArray(v) && v.length > 0) {
@ -77,4 +83,4 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
}
});
BI.MultiSelectEditor.EVENT_PAUSE = "MultiSelectEditor.EVENT_PAUSE";
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);
BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor);

13
src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js

@ -58,7 +58,8 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
callback.apply(self, arguments);
});
},
value: this.storeValue
value: this.storeValue,
warningTitle: o.warningTitle
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {
@ -432,12 +433,20 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return !BI.contains(v, value);
});
if (BI.isNull(result)) {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
} else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
} else {
v.length === this.allValue.length ? this.element.removeClass("combo-error") : this.element.addClass("combo-error");
if(v.length === this.allValue.length){
BI.isNotNull(this.trigger) && (this.trigger.setTipType("success"));
this.element.removeClass("combo-error");
}else {
BI.isNotNull(this.trigger) && (this.trigger.setTipType("warning"));
this.element.addClass("combo-error");
}
}
},

10
src/widget/searchmultitextvaluecombo/multitextvalue.combo.trigger.search.js

@ -37,7 +37,9 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
adapter: o.adapter,
masker: o.masker,
value: o.value,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {
self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START);
@ -130,6 +132,10 @@ BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
this.numberCounter.setValue(ob);
},
setTipType: function (v) {
this.searcher.setTipType(v);
},
getKey: function () {
return this.searcher.getKey();
},
@ -148,4 +154,4 @@ BI.SearchMultiSelectTrigger.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectTrigger.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = "EVENT_BEFORE_COUNTER_POPUPVIEW";
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);
BI.shortcut("bi.search_multi_select_trigger", BI.SearchMultiSelectTrigger);

10
src/widget/searchmultitextvaluecombo/trigger/searcher.multitextvalue.js

@ -18,7 +18,9 @@ BI.SearchMultiSelectSearcher = BI.inherit(BI.Widget, {
this.editor = BI.createWidget(o.el, {
type: "bi.multi_select_editor",
height: o.height,
text: o.text
text: o.text,
tipType: o.tipType,
warningTitle: o.warningTitle
});
this.searcher = BI.createWidget({
@ -143,6 +145,10 @@ BI.SearchMultiSelectSearcher = BI.inherit(BI.Widget, {
}
},
setTipType: function (v) {
this.editor.setTipType(v);
},
setValue: function (ob) {
this.setState(ob);
this.searcher.setValue(ob);
@ -167,4 +173,4 @@ BI.SearchMultiSelectSearcher.EVENT_START = "EVENT_START";
BI.SearchMultiSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SearchMultiSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchMultiSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);
BI.shortcut("bi.search_multi_select_searcher", BI.SearchMultiSelectSearcher);

Loading…
Cancel
Save