guy 7 years ago
parent
commit
8e6f703125
  1. 52
      bi/widget.js
  2. 52
      dist/bundle.js
  3. 14
      dist/bundle.min.js
  4. 52
      dist/widget.js
  5. 52
      src/widget/multiselect/multiselect.combo.js

52
bi/widget.js

@ -8637,19 +8637,23 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self._setStartValue("");
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {
if (this.getSearcher().hasMatched()) {
// if (this.getSearcher().hasMatched()) {
var keyword = this.getSearcher().getKeyword();
self._join({
type: BI.Selection.Multi,
value: [keyword]
}, function () {
//如果在不选的状态下直接把该值添加进来
if (self.storeValue.type === BI.Selection.Multi) {
self.storeValue.value.pushDistinct(keyword);
}
self.combo.setValue(self.storeValue);
self._setStartValue(keyword);
assertShowValue();
self.populate();
self._setStartValue("");
})
}
// }
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {
var last = BI.last(keywords);
@ -8864,30 +8868,32 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
_adjust: function (callback) {
var self = this, o = this.options;
if (!this._count) {
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
}, function (res) {
self._count = res.count;
adjust();
callback();
});
} else {
// if (!this._count) {
// o.itemsCreator({
// type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
// }, function (res) {
// self._count = res.count;
// adjust();
// callback();
// });
// } else {
adjust();
callback();
}
// }
function adjust() {
if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {
self.storeValue = {
type: BI.Selection.Multi,
value: []
}
} else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {
self.storeValue = {
type: BI.Selection.All,
value: []
}
}
// if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {
// self.storeValue = {
// type: BI.Selection.Multi,
// value: []
// }
// } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {
// self.storeValue = {
// type: BI.Selection.All,
// value: []
// }
// }
if (self.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;

52
dist/bundle.js vendored

@ -87116,19 +87116,23 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self._setStartValue("");
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {
if (this.getSearcher().hasMatched()) {
// if (this.getSearcher().hasMatched()) {
var keyword = this.getSearcher().getKeyword();
self._join({
type: BI.Selection.Multi,
value: [keyword]
}, function () {
//如果在不选的状态下直接把该值添加进来
if (self.storeValue.type === BI.Selection.Multi) {
self.storeValue.value.pushDistinct(keyword);
}
self.combo.setValue(self.storeValue);
self._setStartValue(keyword);
assertShowValue();
self.populate();
self._setStartValue("");
})
}
// }
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {
var last = BI.last(keywords);
@ -87343,30 +87347,32 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
_adjust: function (callback) {
var self = this, o = this.options;
if (!this._count) {
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
}, function (res) {
self._count = res.count;
adjust();
callback();
});
} else {
// if (!this._count) {
// o.itemsCreator({
// type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
// }, function (res) {
// self._count = res.count;
// adjust();
// callback();
// });
// } else {
adjust();
callback();
}
// }
function adjust() {
if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {
self.storeValue = {
type: BI.Selection.Multi,
value: []
}
} else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {
self.storeValue = {
type: BI.Selection.All,
value: []
}
}
// if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {
// self.storeValue = {
// type: BI.Selection.Multi,
// value: []
// }
// } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {
// self.storeValue = {
// type: BI.Selection.All,
// value: []
// }
// }
if (self.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;

14
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

52
dist/widget.js vendored

@ -8637,19 +8637,23 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self._setStartValue("");
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {
if (this.getSearcher().hasMatched()) {
// if (this.getSearcher().hasMatched()) {
var keyword = this.getSearcher().getKeyword();
self._join({
type: BI.Selection.Multi,
value: [keyword]
}, function () {
//如果在不选的状态下直接把该值添加进来
if (self.storeValue.type === BI.Selection.Multi) {
self.storeValue.value.pushDistinct(keyword);
}
self.combo.setValue(self.storeValue);
self._setStartValue(keyword);
assertShowValue();
self.populate();
self._setStartValue("");
})
}
// }
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {
var last = BI.last(keywords);
@ -8864,30 +8868,32 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
_adjust: function (callback) {
var self = this, o = this.options;
if (!this._count) {
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
}, function (res) {
self._count = res.count;
adjust();
callback();
});
} else {
// if (!this._count) {
// o.itemsCreator({
// type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
// }, function (res) {
// self._count = res.count;
// adjust();
// callback();
// });
// } else {
adjust();
callback();
}
// }
function adjust() {
if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {
self.storeValue = {
type: BI.Selection.Multi,
value: []
}
} else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {
self.storeValue = {
type: BI.Selection.All,
value: []
}
}
// if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {
// self.storeValue = {
// type: BI.Selection.Multi,
// value: []
// }
// } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {
// self.storeValue = {
// type: BI.Selection.All,
// value: []
// }
// }
if (self.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;

52
src/widget/multiselect/multiselect.combo.js

@ -59,19 +59,23 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self._setStartValue("");
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {
if (this.getSearcher().hasMatched()) {
// if (this.getSearcher().hasMatched()) {
var keyword = this.getSearcher().getKeyword();
self._join({
type: BI.Selection.Multi,
value: [keyword]
}, function () {
//如果在不选的状态下直接把该值添加进来
if (self.storeValue.type === BI.Selection.Multi) {
self.storeValue.value.pushDistinct(keyword);
}
self.combo.setValue(self.storeValue);
self._setStartValue(keyword);
assertShowValue();
self.populate();
self._setStartValue("");
})
}
// }
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {
var last = BI.last(keywords);
@ -286,30 +290,32 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
_adjust: function (callback) {
var self = this, o = this.options;
if (!this._count) {
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
}, function (res) {
self._count = res.count;
adjust();
callback();
});
} else {
// if (!this._count) {
// o.itemsCreator({
// type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
// }, function (res) {
// self._count = res.count;
// adjust();
// callback();
// });
// } else {
adjust();
callback();
}
// }
function adjust() {
if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {
self.storeValue = {
type: BI.Selection.Multi,
value: []
}
} else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {
self.storeValue = {
type: BI.Selection.All,
value: []
}
}
// if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {
// self.storeValue = {
// type: BI.Selection.Multi,
// value: []
// }
// } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {
// self.storeValue = {
// type: BI.Selection.All,
// value: []
// }
// }
if (self.wants2Quit === true) {
self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);
self.wants2Quit = false;

Loading…
Cancel
Save