forked from fanruan/fineui
Browse Source
* commit 'c45bce6d3b27788d7fe91794b04783ddcdc8ee6a': update update uddate combo和single destroyed 还原与包装 update BI-27919 update update 修改下mulritextvaluecombo update 更新 update DEC-3303 update BI-28087 slider控件可编辑区域值显示规范es6
windy
6 years ago
16 changed files with 291752 additions and 291481 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,57 @@
|
||||
BI.AllValueMultiTextValueCombo = BI.inherit(BI.Widget, { |
||||
|
||||
props: { |
||||
baseCls: "bi-all-value-multi-text-value-combo", |
||||
width: 200, |
||||
height: 30, |
||||
items: [] |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this, o = this.options; |
||||
return { |
||||
type: "bi.search_multi_text_value_combo", |
||||
text: o.text, |
||||
height: o.height, |
||||
items: o.items, |
||||
value: o.value, |
||||
valueFormatter: o.valueFormatter, |
||||
listeners: [{ |
||||
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM, |
||||
action: function () { |
||||
self.fireEvent(BI.AllValueMultiTextValueCombo.EVENT_CONFIRM); |
||||
} |
||||
}], |
||||
ref: function () { |
||||
self.combo = this; |
||||
} |
||||
}; |
||||
}, |
||||
|
||||
setValue: function (v) { |
||||
this.combo.setValue({ |
||||
type: BI.Selection.Multi, |
||||
value: v || [] |
||||
}); |
||||
}, |
||||
|
||||
getValue: function () { |
||||
var obj = this.combo.getValue() || {}; |
||||
obj.value = obj.value || []; |
||||
if(obj.type === BI.Selection.All) { |
||||
var values = []; |
||||
BI.each(this.options.items, function (idx, item) { |
||||
!BI.contains(obj.value, item.value) && values.push(item.value); |
||||
}); |
||||
return values; |
||||
} |
||||
return obj.value || []; |
||||
}, |
||||
|
||||
populate: function (items) { |
||||
this.options.items = items; |
||||
this.combo.populate.apply(this, arguments); |
||||
} |
||||
}); |
||||
BI.AllValueMultiTextValueCombo.EVENT_CONFIRM = "AllValueMultiTextValueCombo.EVENT_CONFIRM"; |
||||
BI.shortcut("bi.all_value_multi_text_value_combo", BI.AllValueMultiTextValueCombo); |
Loading…
Reference in new issue