Browse Source

BI-28309

1. bi.all_value_multi_text_value_combo控件render中value值设置的不对
2. 增加参数控制每页的显示的项目数
es6
MrErHu 6 years ago
parent
commit
95fe04f094
  1. 16
      dist/_fineui.min.js
  2. 60
      dist/bundle.js
  3. 38
      dist/bundle.min.js
  4. 32
      dist/case.js
  5. 60
      dist/fineui.js
  6. 16
      dist/fineui.min.js
  7. 28
      dist/widget.js
  8. 19
      src/component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo.js
  9. 7
      src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js

16
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

60
dist/bundle.js vendored

@ -83405,6 +83405,12 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
* @extends BI.Widget * @extends BI.Widget
*/ */
!(function () { !(function () {
function isIE11Below () {
if (!BI.isIE()) {
return false;
}
return BI.getIEVersion() < 11;
}
BI.NicEditor = BI.inherit(BI.Widget, { BI.NicEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.NicEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.NicEditor.superclass._defaultConfig.apply(this, arguments), {
@ -83458,6 +83464,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
selectCheck: function (e) { selectCheck: function (e) {
var t = e.target; var t = e.target;
var self = this;
var found = false; var found = false;
do { do {
if (t.nodeName !== "svg" && t.className && t.className.indexOf(prefix) != -1) { if (t.nodeName !== "svg" && t.className && t.className.indexOf(prefix) != -1) {
@ -83466,6 +83473,10 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
} }
if (this.instance.checkToolbar(t)) { if (this.instance.checkToolbar(t)) {
this.instance.saveRng(); this.instance.saveRng();
// 如果是点击在toolbar内恢复选取(IE中出现的问题)
BI.defer(function () {
self.instance.restoreRng();
});
return; return;
} }
} while (t = t.parentNode); } while (t = t.parentNode);
@ -83484,8 +83495,8 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}, },
setValue: function (v) { setValue: function (v) {
v = v || ""; v = v || ( isIE11Below() ? "" : "<br>");
v = v.startWith("<div>") ? v : "<div>" + v + "</div>"; v = ($(v)[0] && $(v)[0].nodeName === "P") ? v : "<p>" + v + "</p>";
this.instance.setContent(v); this.instance.setContent(v);
}, },
@ -83520,7 +83531,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
nicEditorInstance.superclass._init.apply(this, arguments); nicEditorInstance.superclass._init.apply(this, arguments);
var o = this.options; var o = this.options;
var initValue = o.value || "<br>"; var initValue = o.value || "<br>";
initValue = initValue.startWith("<div>") ? initValue : "<div>" + initValue + "</div>"; initValue = initValue.startWith("<p>") ? initValue : "<p>" + initValue + "</p>";
this.ne = this.options.ne; this.ne = this.options.ne;
this.elm = BI.createWidget({ this.elm = BI.createWidget({
type: "bi.layout", type: "bi.layout",
@ -83680,7 +83691,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
keyDown: function (e, t) { keyDown: function (e, t) {
if (e.keyCode === 8) { if (e.keyCode === 8) {
var html = this.elm.element.html().toLowerCase().trim(); var html = this.elm.element.html().toLowerCase().trim();
if (html === "<div><br></div>" || html === "<div></div>") { if (html === "<p><br></p>" || html === "<p></p>") {
e.preventDefault() e.preventDefault()
return; return;
} }
@ -83714,7 +83725,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
var newLine; var newLine;
var html = this.elm.element.html().toLowerCase().trim(); var html = this.elm.element.html().toLowerCase().trim();
if (!html || html === '<br>') { if (!html || html === '<br>') {
newLine = $("<div></div>"); newLine = $(this._getNewLine());
this.elm.element.html(''); this.elm.element.html('');
this.elm.element.append(newLine); this.elm.element.append(newLine);
this.setFocus(newLine[0]); this.setFocus(newLine[0]);
@ -83817,7 +83828,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
// 新增一个空行 // 新增一个空行
var html = last.html().toLowerCase(); var html = last.html().toLowerCase();
var nodeName = last.nodeName; var nodeName = last.nodeName;
if ((html !== "<br>" && html !== "<br\/>") || nodeName !== "DIV") { if ((html !== "<br>" && html !== "<br\/>") || nodeName !== "P") {
// 最后一个元素不是空行,添加一个空行,重新设置选区 // 最后一个元素不是空行,添加一个空行,重新设置选区
el.append(newLineHtml); el.append(newLineHtml);
this.initSelection(); this.initSelection();
@ -83829,7 +83840,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}, },
_getNewLine: function () { _getNewLine: function () {
return "<div><br></div>"; return isIE11Below() ? "<p></p>" : "<p><br></p>";
}, },
_isChildOf: function(child, parent) { _isChildOf: function(child, parent) {
@ -83846,12 +83857,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
return false; return false;
}, },
_isIE11Below: function() {
if (!BI.isIE()) {
return false;
}
return BI.getIEVersion() < 11;
}
}); });
}()); }());
/** /**
@ -104118,6 +104124,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo", baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo",
height: 24, height: 24,
numOfPage: 10,
items: [] items: []
}); });
}, },
@ -104485,14 +104492,14 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
_getItemsByTimes: function (items, times) { _getItemsByTimes: function (items, times) {
var res = []; var res = [];
for (var i = (times - 1) * 10; items[i] && i < times * 10; i++) { for (var i = (times - 1) * this.options.numOfPage; items[i] && i < times * this.options.numOfPage; i++) {
res.push(items[i]); res.push(items[i]);
} }
return res; return res;
}, },
_hasNextByTimes: function (items, times) { _hasNextByTimes: function (items, times) {
return times * 10 < items.length; return times * this.options.numOfPage < items.length;
}, },
_itemsCreator: function (options, callback) { _itemsCreator: function (options, callback) {
@ -104580,7 +104587,8 @@ BI.extend(BI.SearchMultiTextValueCombo, {
BI.SearchMultiTextValueCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SearchMultiTextValueCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.search_multi_text_value_combo", BI.SearchMultiTextValueCombo);BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, { BI.shortcut("bi.search_multi_text_value_combo", BI.SearchMultiTextValueCombo);
BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
constants: { constants: {
height: 14, height: 14,
@ -112575,12 +112583,14 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
var value = this._digestValue(o.value);
return { return {
type: "bi.search_multi_text_value_combo", type: "bi.search_multi_text_value_combo",
text: o.text, text: o.text,
height: o.height, height: o.height,
items: o.items, items: o.items,
value: o.value, value: value,
numOfPage: 100,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
listeners: [{ listeners: [{
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM, eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,
@ -112595,10 +112605,8 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
}, },
setValue: function (v) { setValue: function (v) {
this.combo.setValue({ var value = this._digestValue(v);
type: BI.Selection.Multi, this.combo.setValue(value);
value: v || []
});
}, },
getValue: function () { getValue: function () {
@ -112617,10 +112625,18 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
populate: function (items) { populate: function (items) {
this.options.items = items; this.options.items = items;
this.combo.populate.apply(this, arguments); this.combo.populate.apply(this, arguments);
},
_digestValue: function (v) {
return {
type: BI.Selection.Multi,
value: v || []
};
} }
}); });
BI.AllValueMultiTextValueCombo.EVENT_CONFIRM = "AllValueMultiTextValueCombo.EVENT_CONFIRM"; BI.AllValueMultiTextValueCombo.EVENT_CONFIRM = "AllValueMultiTextValueCombo.EVENT_CONFIRM";
BI.shortcut("bi.all_value_multi_text_value_combo", BI.AllValueMultiTextValueCombo);BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { BI.shortcut("bi.all_value_multi_text_value_combo", BI.AllValueMultiTextValueCombo);
BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
_const: { _const: {
perPage: 100 perPage: 100

38
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

32
dist/case.js vendored

@ -10742,6 +10742,12 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
* @extends BI.Widget * @extends BI.Widget
*/ */
!(function () { !(function () {
function isIE11Below () {
if (!BI.isIE()) {
return false;
}
return BI.getIEVersion() < 11;
}
BI.NicEditor = BI.inherit(BI.Widget, { BI.NicEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.NicEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.NicEditor.superclass._defaultConfig.apply(this, arguments), {
@ -10795,6 +10801,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
selectCheck: function (e) { selectCheck: function (e) {
var t = e.target; var t = e.target;
var self = this;
var found = false; var found = false;
do { do {
if (t.nodeName !== "svg" && t.className && t.className.indexOf(prefix) != -1) { if (t.nodeName !== "svg" && t.className && t.className.indexOf(prefix) != -1) {
@ -10803,6 +10810,10 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
} }
if (this.instance.checkToolbar(t)) { if (this.instance.checkToolbar(t)) {
this.instance.saveRng(); this.instance.saveRng();
// 如果是点击在toolbar内恢复选取(IE中出现的问题)
BI.defer(function () {
self.instance.restoreRng();
});
return; return;
} }
} while (t = t.parentNode); } while (t = t.parentNode);
@ -10821,8 +10832,8 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}, },
setValue: function (v) { setValue: function (v) {
v = v || ""; v = v || ( isIE11Below() ? "" : "<br>");
v = v.startWith("<div>") ? v : "<div>" + v + "</div>"; v = ($(v)[0] && $(v)[0].nodeName === "P") ? v : "<p>" + v + "</p>";
this.instance.setContent(v); this.instance.setContent(v);
}, },
@ -10857,7 +10868,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
nicEditorInstance.superclass._init.apply(this, arguments); nicEditorInstance.superclass._init.apply(this, arguments);
var o = this.options; var o = this.options;
var initValue = o.value || "<br>"; var initValue = o.value || "<br>";
initValue = initValue.startWith("<div>") ? initValue : "<div>" + initValue + "</div>"; initValue = initValue.startWith("<p>") ? initValue : "<p>" + initValue + "</p>";
this.ne = this.options.ne; this.ne = this.options.ne;
this.elm = BI.createWidget({ this.elm = BI.createWidget({
type: "bi.layout", type: "bi.layout",
@ -11017,7 +11028,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
keyDown: function (e, t) { keyDown: function (e, t) {
if (e.keyCode === 8) { if (e.keyCode === 8) {
var html = this.elm.element.html().toLowerCase().trim(); var html = this.elm.element.html().toLowerCase().trim();
if (html === "<div><br></div>" || html === "<div></div>") { if (html === "<p><br></p>" || html === "<p></p>") {
e.preventDefault() e.preventDefault()
return; return;
} }
@ -11051,7 +11062,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
var newLine; var newLine;
var html = this.elm.element.html().toLowerCase().trim(); var html = this.elm.element.html().toLowerCase().trim();
if (!html || html === '<br>') { if (!html || html === '<br>') {
newLine = $("<div></div>"); newLine = $(this._getNewLine());
this.elm.element.html(''); this.elm.element.html('');
this.elm.element.append(newLine); this.elm.element.append(newLine);
this.setFocus(newLine[0]); this.setFocus(newLine[0]);
@ -11154,7 +11165,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
// 新增一个空行 // 新增一个空行
var html = last.html().toLowerCase(); var html = last.html().toLowerCase();
var nodeName = last.nodeName; var nodeName = last.nodeName;
if ((html !== "<br>" && html !== "<br\/>") || nodeName !== "DIV") { if ((html !== "<br>" && html !== "<br\/>") || nodeName !== "P") {
// 最后一个元素不是空行,添加一个空行,重新设置选区 // 最后一个元素不是空行,添加一个空行,重新设置选区
el.append(newLineHtml); el.append(newLineHtml);
this.initSelection(); this.initSelection();
@ -11166,7 +11177,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}, },
_getNewLine: function () { _getNewLine: function () {
return "<div><br></div>"; return isIE11Below() ? "<p></p>" : "<p><br></p>";
}, },
_isChildOf: function(child, parent) { _isChildOf: function(child, parent) {
@ -11183,12 +11194,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
return false; return false;
}, },
_isIE11Below: function() {
if (!BI.isIE()) {
return false;
}
return BI.getIEVersion() < 11;
}
}); });
}()); }());
/** /**

60
dist/fineui.js vendored

@ -83654,6 +83654,12 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
* @extends BI.Widget * @extends BI.Widget
*/ */
!(function () { !(function () {
function isIE11Below () {
if (!BI.isIE()) {
return false;
}
return BI.getIEVersion() < 11;
}
BI.NicEditor = BI.inherit(BI.Widget, { BI.NicEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.NicEditor.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.NicEditor.superclass._defaultConfig.apply(this, arguments), {
@ -83707,6 +83713,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
selectCheck: function (e) { selectCheck: function (e) {
var t = e.target; var t = e.target;
var self = this;
var found = false; var found = false;
do { do {
if (t.nodeName !== "svg" && t.className && t.className.indexOf(prefix) != -1) { if (t.nodeName !== "svg" && t.className && t.className.indexOf(prefix) != -1) {
@ -83715,6 +83722,10 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
} }
if (this.instance.checkToolbar(t)) { if (this.instance.checkToolbar(t)) {
this.instance.saveRng(); this.instance.saveRng();
// 如果是点击在toolbar内恢复选取(IE中出现的问题)
BI.defer(function () {
self.instance.restoreRng();
});
return; return;
} }
} while (t = t.parentNode); } while (t = t.parentNode);
@ -83733,8 +83744,8 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}, },
setValue: function (v) { setValue: function (v) {
v = v || ""; v = v || ( isIE11Below() ? "" : "<br>");
v = v.startWith("<div>") ? v : "<div>" + v + "</div>"; v = ($(v)[0] && $(v)[0].nodeName === "P") ? v : "<p>" + v + "</p>";
this.instance.setContent(v); this.instance.setContent(v);
}, },
@ -83769,7 +83780,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
nicEditorInstance.superclass._init.apply(this, arguments); nicEditorInstance.superclass._init.apply(this, arguments);
var o = this.options; var o = this.options;
var initValue = o.value || "<br>"; var initValue = o.value || "<br>";
initValue = initValue.startWith("<div>") ? initValue : "<div>" + initValue + "</div>"; initValue = initValue.startWith("<p>") ? initValue : "<p>" + initValue + "</p>";
this.ne = this.options.ne; this.ne = this.options.ne;
this.elm = BI.createWidget({ this.elm = BI.createWidget({
type: "bi.layout", type: "bi.layout",
@ -83929,7 +83940,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
keyDown: function (e, t) { keyDown: function (e, t) {
if (e.keyCode === 8) { if (e.keyCode === 8) {
var html = this.elm.element.html().toLowerCase().trim(); var html = this.elm.element.html().toLowerCase().trim();
if (html === "<div><br></div>" || html === "<div></div>") { if (html === "<p><br></p>" || html === "<p></p>") {
e.preventDefault() e.preventDefault()
return; return;
} }
@ -83963,7 +83974,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
var newLine; var newLine;
var html = this.elm.element.html().toLowerCase().trim(); var html = this.elm.element.html().toLowerCase().trim();
if (!html || html === '<br>') { if (!html || html === '<br>') {
newLine = $("<div></div>"); newLine = $(this._getNewLine());
this.elm.element.html(''); this.elm.element.html('');
this.elm.element.append(newLine); this.elm.element.append(newLine);
this.setFocus(newLine[0]); this.setFocus(newLine[0]);
@ -84066,7 +84077,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
// 新增一个空行 // 新增一个空行
var html = last.html().toLowerCase(); var html = last.html().toLowerCase();
var nodeName = last.nodeName; var nodeName = last.nodeName;
if ((html !== "<br>" && html !== "<br\/>") || nodeName !== "DIV") { if ((html !== "<br>" && html !== "<br\/>") || nodeName !== "P") {
// 最后一个元素不是空行,添加一个空行,重新设置选区 // 最后一个元素不是空行,添加一个空行,重新设置选区
el.append(newLineHtml); el.append(newLineHtml);
this.initSelection(); this.initSelection();
@ -84078,7 +84089,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
}, },
_getNewLine: function () { _getNewLine: function () {
return "<div><br></div>"; return isIE11Below() ? "<p></p>" : "<p><br></p>";
}, },
_isChildOf: function(child, parent) { _isChildOf: function(child, parent) {
@ -84095,12 +84106,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
return false; return false;
}, },
_isIE11Below: function() {
if (!BI.isIE()) {
return false;
}
return BI.getIEVersion() < 11;
}
}); });
}()); }());
/** /**
@ -104367,6 +104373,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo", baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo",
height: 24, height: 24,
numOfPage: 10,
items: [] items: []
}); });
}, },
@ -104734,14 +104741,14 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
_getItemsByTimes: function (items, times) { _getItemsByTimes: function (items, times) {
var res = []; var res = [];
for (var i = (times - 1) * 10; items[i] && i < times * 10; i++) { for (var i = (times - 1) * this.options.numOfPage; items[i] && i < times * this.options.numOfPage; i++) {
res.push(items[i]); res.push(items[i]);
} }
return res; return res;
}, },
_hasNextByTimes: function (items, times) { _hasNextByTimes: function (items, times) {
return times * 10 < items.length; return times * this.options.numOfPage < items.length;
}, },
_itemsCreator: function (options, callback) { _itemsCreator: function (options, callback) {
@ -104829,7 +104836,8 @@ BI.extend(BI.SearchMultiTextValueCombo, {
BI.SearchMultiTextValueCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SearchMultiTextValueCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.search_multi_text_value_combo", BI.SearchMultiTextValueCombo);BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, { BI.shortcut("bi.search_multi_text_value_combo", BI.SearchMultiTextValueCombo);
BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
constants: { constants: {
height: 14, height: 14,
@ -112824,12 +112832,14 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
var value = this._digestValue(o.value);
return { return {
type: "bi.search_multi_text_value_combo", type: "bi.search_multi_text_value_combo",
text: o.text, text: o.text,
height: o.height, height: o.height,
items: o.items, items: o.items,
value: o.value, value: value,
numOfPage: 100,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
listeners: [{ listeners: [{
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM, eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,
@ -112844,10 +112854,8 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
}, },
setValue: function (v) { setValue: function (v) {
this.combo.setValue({ var value = this._digestValue(v);
type: BI.Selection.Multi, this.combo.setValue(value);
value: v || []
});
}, },
getValue: function () { getValue: function () {
@ -112866,10 +112874,18 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
populate: function (items) { populate: function (items) {
this.options.items = items; this.options.items = items;
this.combo.populate.apply(this, arguments); this.combo.populate.apply(this, arguments);
},
_digestValue: function (v) {
return {
type: BI.Selection.Multi,
value: v || []
};
} }
}); });
BI.AllValueMultiTextValueCombo.EVENT_CONFIRM = "AllValueMultiTextValueCombo.EVENT_CONFIRM"; BI.AllValueMultiTextValueCombo.EVENT_CONFIRM = "AllValueMultiTextValueCombo.EVENT_CONFIRM";
BI.shortcut("bi.all_value_multi_text_value_combo", BI.AllValueMultiTextValueCombo);BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { BI.shortcut("bi.all_value_multi_text_value_combo", BI.AllValueMultiTextValueCombo);
BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
_const: { _const: {
perPage: 100 perPage: 100

16
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

28
dist/widget.js vendored

@ -16115,6 +16115,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo", baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo",
height: 24, height: 24,
numOfPage: 10,
items: [] items: []
}); });
}, },
@ -16482,14 +16483,14 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
_getItemsByTimes: function (items, times) { _getItemsByTimes: function (items, times) {
var res = []; var res = [];
for (var i = (times - 1) * 10; items[i] && i < times * 10; i++) { for (var i = (times - 1) * this.options.numOfPage; items[i] && i < times * this.options.numOfPage; i++) {
res.push(items[i]); res.push(items[i]);
} }
return res; return res;
}, },
_hasNextByTimes: function (items, times) { _hasNextByTimes: function (items, times) {
return times * 10 < items.length; return times * this.options.numOfPage < items.length;
}, },
_itemsCreator: function (options, callback) { _itemsCreator: function (options, callback) {
@ -16577,7 +16578,8 @@ BI.extend(BI.SearchMultiTextValueCombo, {
BI.SearchMultiTextValueCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SearchMultiTextValueCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.search_multi_text_value_combo", BI.SearchMultiTextValueCombo);BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, { BI.shortcut("bi.search_multi_text_value_combo", BI.SearchMultiTextValueCombo);
BI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {
constants: { constants: {
height: 14, height: 14,
@ -24572,12 +24574,14 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
var value = this._digestValue(o.value);
return { return {
type: "bi.search_multi_text_value_combo", type: "bi.search_multi_text_value_combo",
text: o.text, text: o.text,
height: o.height, height: o.height,
items: o.items, items: o.items,
value: o.value, value: value,
numOfPage: 100,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
listeners: [{ listeners: [{
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM, eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,
@ -24592,10 +24596,8 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
}, },
setValue: function (v) { setValue: function (v) {
this.combo.setValue({ var value = this._digestValue(v);
type: BI.Selection.Multi, this.combo.setValue(value);
value: v || []
});
}, },
getValue: function () { getValue: function () {
@ -24614,10 +24616,18 @@ BI.shortcut("bi.all_value_chooser_pane", BI.AllValueChooserPane);BI.AllValueMult
populate: function (items) { populate: function (items) {
this.options.items = items; this.options.items = items;
this.combo.populate.apply(this, arguments); this.combo.populate.apply(this, arguments);
},
_digestValue: function (v) {
return {
type: BI.Selection.Multi,
value: v || []
};
} }
}); });
BI.AllValueMultiTextValueCombo.EVENT_CONFIRM = "AllValueMultiTextValueCombo.EVENT_CONFIRM"; BI.AllValueMultiTextValueCombo.EVENT_CONFIRM = "AllValueMultiTextValueCombo.EVENT_CONFIRM";
BI.shortcut("bi.all_value_multi_text_value_combo", BI.AllValueMultiTextValueCombo);BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { BI.shortcut("bi.all_value_multi_text_value_combo", BI.AllValueMultiTextValueCombo);
BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {
_const: { _const: {
perPage: 100 perPage: 100

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

@ -9,12 +9,14 @@ BI.AllValueMultiTextValueCombo = BI.inherit(BI.Widget, {
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
var value = this._digestValue(o.value);
return { return {
type: "bi.search_multi_text_value_combo", type: "bi.search_multi_text_value_combo",
text: o.text, text: o.text,
height: o.height, height: o.height,
items: o.items, items: o.items,
value: o.value, value: value,
numOfPage: 100,
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
listeners: [{ listeners: [{
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM, eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,
@ -29,10 +31,8 @@ BI.AllValueMultiTextValueCombo = BI.inherit(BI.Widget, {
}, },
setValue: function (v) { setValue: function (v) {
this.combo.setValue({ var value = this._digestValue(v);
type: BI.Selection.Multi, this.combo.setValue(value);
value: v || []
});
}, },
getValue: function () { getValue: function () {
@ -51,7 +51,14 @@ BI.AllValueMultiTextValueCombo = BI.inherit(BI.Widget, {
populate: function (items) { populate: function (items) {
this.options.items = items; this.options.items = items;
this.combo.populate.apply(this, arguments); this.combo.populate.apply(this, arguments);
},
_digestValue: function (v) {
return {
type: BI.Selection.Multi,
value: v || []
};
} }
}); });
BI.AllValueMultiTextValueCombo.EVENT_CONFIRM = "AllValueMultiTextValueCombo.EVENT_CONFIRM"; BI.AllValueMultiTextValueCombo.EVENT_CONFIRM = "AllValueMultiTextValueCombo.EVENT_CONFIRM";
BI.shortcut("bi.all_value_multi_text_value_combo", BI.AllValueMultiTextValueCombo); BI.shortcut("bi.all_value_multi_text_value_combo", BI.AllValueMultiTextValueCombo);

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

@ -9,6 +9,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo", baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo",
height: 24, height: 24,
numOfPage: 10,
items: [] items: []
}); });
}, },
@ -376,14 +377,14 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
_getItemsByTimes: function (items, times) { _getItemsByTimes: function (items, times) {
var res = []; var res = [];
for (var i = (times - 1) * 10; items[i] && i < times * 10; i++) { for (var i = (times - 1) * this.options.numOfPage; items[i] && i < times * this.options.numOfPage; i++) {
res.push(items[i]); res.push(items[i]);
} }
return res; return res;
}, },
_hasNextByTimes: function (items, times) { _hasNextByTimes: function (items, times) {
return times * 10 < items.length; return times * this.options.numOfPage < items.length;
}, },
_itemsCreator: function (options, callback) { _itemsCreator: function (options, callback) {
@ -471,4 +472,4 @@ BI.extend(BI.SearchMultiTextValueCombo, {
BI.SearchMultiTextValueCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SearchMultiTextValueCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.search_multi_text_value_combo", BI.SearchMultiTextValueCombo); BI.shortcut("bi.search_multi_text_value_combo", BI.SearchMultiTextValueCombo);

Loading…
Cancel
Save