|
|
@ -101,18 +101,17 @@ BI.Searcher = BI.inherit(BI.Widget, { |
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
if (o.isAutoSync) { |
|
|
|
if (o.isAutoSync) { |
|
|
|
var values = o.adapter && o.adapter.getValue(); |
|
|
|
var values = o.adapter && o.adapter.getValue(); |
|
|
|
if (!obj.isSelected()) { |
|
|
|
switch (o.chooseType) { |
|
|
|
o.adapter && o.adapter.setValue(BI.deepWithout(values, obj.getValue())); |
|
|
|
case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: |
|
|
|
} else { |
|
|
|
o.adapter && o.adapter.setValue([obj.getValue()]); |
|
|
|
switch (o.chooseType) { |
|
|
|
break; |
|
|
|
case BI.ButtonGroup.CHOOSE_TYPE_SINGLE: |
|
|
|
case BI.ButtonGroup.CHOOSE_TYPE_MULTI: |
|
|
|
o.adapter && o.adapter.setValue([obj.getValue()]); |
|
|
|
if (!obj.isSelected()) { |
|
|
|
break; |
|
|
|
o.adapter && o.adapter.setValue(BI.deepWithout(values, obj.getValue())); |
|
|
|
case BI.ButtonGroup.CHOOSE_TYPE_MULTI: |
|
|
|
} |
|
|
|
values.push(obj.getValue()); |
|
|
|
values.push(obj.getValue()); |
|
|
|
o.adapter && o.adapter.setValue(values); |
|
|
|
o.adapter && o.adapter.setValue(values); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
self.fireEvent(BI.Searcher.EVENT_CHANGE, value, obj); |
|
|
|
self.fireEvent(BI.Searcher.EVENT_CHANGE, value, obj); |
|
|
|