|
|
@ -72791,9 +72791,6 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, { |
|
|
|
this.radio = BI.createWidget({ |
|
|
|
this.radio = BI.createWidget({ |
|
|
|
type: "bi.radio" |
|
|
|
type: "bi.radio" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.radio.on(BI.Controller.EVENT_CHANGE, function (type) { |
|
|
|
|
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.text = BI.createWidget({ |
|
|
|
this.text = BI.createWidget({ |
|
|
|
type: "bi.label", |
|
|
|
type: "bi.label", |
|
|
|
cls: "list-item-text", |
|
|
|
cls: "list-item-text", |
|
|
@ -103372,7 +103369,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
_createItems: function (items) { |
|
|
|
_createItems: function (items) { |
|
|
|
return BI.createItems(items, { |
|
|
|
return BI.createItems(items, { |
|
|
|
type: "bi.single_select_radio_item", |
|
|
|
type: "bi.single_select_combo.item", |
|
|
|
logic: { |
|
|
|
logic: { |
|
|
|
dynamic: false |
|
|
|
dynamic: false |
|
|
|
}, |
|
|
|
}, |
|
|
@ -103631,6 +103628,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { |
|
|
|
this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) { |
|
|
|
this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) { |
|
|
|
self.storeValue = this.getValue(); |
|
|
|
self.storeValue = this.getValue(); |
|
|
|
assertShowValue(); |
|
|
|
assertShowValue(); |
|
|
|
|
|
|
|
self._defaultState(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK, function () { |
|
|
|
this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK, function () { |
|
|
|
if (!self.combo.isViewVisible()) { |
|
|
|
if (!self.combo.isViewVisible()) { |
|
|
@ -103879,6 +103877,73 @@ BI.SingleSelectCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; |
|
|
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.single_select_combo", BI.SingleSelectCombo); |
|
|
|
BI.shortcut("bi.single_select_combo", BI.SingleSelectCombo); |
|
|
|
/** |
|
|
|
/** |
|
|
|
|
|
|
|
* guy |
|
|
|
|
|
|
|
* 单选框item |
|
|
|
|
|
|
|
* @type {*|void|Object} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, { |
|
|
|
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
|
|
|
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
|
|
|
extraCls: "bi-single-select-radio-item", |
|
|
|
|
|
|
|
logic: { |
|
|
|
|
|
|
|
dynamic: false |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
hgap: 10, |
|
|
|
|
|
|
|
height: 25 |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
_init: function () { |
|
|
|
|
|
|
|
BI.SingleSelectComboItem.superclass._init.apply(this, arguments); |
|
|
|
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
|
|
|
this.radio = BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.radio" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
this.text = BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.label", |
|
|
|
|
|
|
|
cls: "list-item-text", |
|
|
|
|
|
|
|
textAlign: "left", |
|
|
|
|
|
|
|
whiteSpace: "nowrap", |
|
|
|
|
|
|
|
textHeight: o.height, |
|
|
|
|
|
|
|
height: o.height, |
|
|
|
|
|
|
|
hgap: o.hgap, |
|
|
|
|
|
|
|
text: o.text, |
|
|
|
|
|
|
|
keyword: o.keyword, |
|
|
|
|
|
|
|
value: o.value, |
|
|
|
|
|
|
|
py: o.py |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BI.createWidget(BI.extend({ |
|
|
|
|
|
|
|
element: this |
|
|
|
|
|
|
|
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { |
|
|
|
|
|
|
|
items: BI.LogicFactory.createLogicItemsByDirection("left", { |
|
|
|
|
|
|
|
type: "bi.center_adapt", |
|
|
|
|
|
|
|
items: [this.radio], |
|
|
|
|
|
|
|
width: 16 |
|
|
|
|
|
|
|
}, this.text) |
|
|
|
|
|
|
|
})))); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doRedMark: function () { |
|
|
|
|
|
|
|
this.text.doRedMark.apply(this.text, arguments); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unRedMark: function () { |
|
|
|
|
|
|
|
this.text.unRedMark.apply(this.text, arguments); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doClick: function () { |
|
|
|
|
|
|
|
BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments); |
|
|
|
|
|
|
|
this.radio.setSelected(this.isSelected()); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setSelected: function (v) { |
|
|
|
|
|
|
|
BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments); |
|
|
|
|
|
|
|
this.radio.setSelected(v); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);/** |
|
|
|
* 选择列表 |
|
|
|
* 选择列表 |
|
|
|
* |
|
|
|
* |
|
|
|
* Created by GUY on 2015/11/1. |
|
|
|
* Created by GUY on 2015/11/1. |
|
|
@ -104109,7 +104174,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
_createItems: function (items) { |
|
|
|
_createItems: function (items) { |
|
|
|
return BI.createItems(items, { |
|
|
|
return BI.createItems(items, { |
|
|
|
type: "bi.single_select_radio_item", |
|
|
|
type: "bi.single_select_combo.item", |
|
|
|
logic: this.options.logic, |
|
|
|
logic: this.options.logic, |
|
|
|
height: 25, |
|
|
|
height: 25, |
|
|
|
selected: false |
|
|
|
selected: false |
|
|
@ -105002,7 +105067,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
_createItems: function (items) { |
|
|
|
_createItems: function (items) { |
|
|
|
return BI.createItems(items, { |
|
|
|
return BI.createItems(items, { |
|
|
|
type: "bi.single_select_radio_item", |
|
|
|
type: "bi.single_select_combo.item", |
|
|
|
logic: { |
|
|
|
logic: { |
|
|
|
dynamic: false |
|
|
|
dynamic: false |
|
|
|
}, |
|
|
|
}, |
|
|
@ -108465,7 +108530,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear |
|
|
|
obj.year = obj.year || 0; |
|
|
|
obj.year = obj.year || 0; |
|
|
|
obj.month = obj.month || 0; |
|
|
|
obj.month = obj.month || 0; |
|
|
|
if (obj.year === 0 || obj.month === 0 || BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) { |
|
|
|
if (obj.year === 0 || obj.month === 0 || BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) { |
|
|
|
var year = BI.getDate().getFullYear(); |
|
|
|
var year = obj.year || BI.getDate().getFullYear(); |
|
|
|
this.selectedYear = year; |
|
|
|
this.selectedYear = year; |
|
|
|
this.selectedMonth = ""; |
|
|
|
this.selectedMonth = ""; |
|
|
|
this.yearPicker.setValue(year); |
|
|
|
this.yearPicker.setValue(year); |
|
|
@ -108566,7 +108631,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, { |
|
|
|
eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE, |
|
|
|
eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE, |
|
|
|
action: function () { |
|
|
|
action: function () { |
|
|
|
var date = BI.getDate(); |
|
|
|
var date = BI.getDate(); |
|
|
|
self.setValue({year: date.getFullYear(), month: date.getMonth() + 1}); |
|
|
|
self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), month: date.getMonth() + 1}}); |
|
|
|
self.combo.hideView(); |
|
|
|
self.combo.hideView(); |
|
|
|
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); |
|
|
|
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); |
|
|
|
} |
|
|
|
} |
|
|
@ -109079,7 +109144,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY |
|
|
|
return this.yearEditor.isValid() && this.monthEditor.isValid(); |
|
|
|
return this.yearEditor.isValid() && this.monthEditor.isValid(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.DynamicYearMonthTrigger.EVENT_VALID = "EVENT_FOCUS"; |
|
|
|
BI.DynamicYearMonthTrigger.EVENT_VALID = "EVENT_VALID"; |
|
|
|
BI.DynamicYearMonthTrigger.EVENT_FOCUS = "EVENT_FOCUS"; |
|
|
|
BI.DynamicYearMonthTrigger.EVENT_FOCUS = "EVENT_FOCUS"; |
|
|
|
BI.DynamicYearMonthTrigger.EVENT_ERROR = "EVENT_ERROR"; |
|
|
|
BI.DynamicYearMonthTrigger.EVENT_ERROR = "EVENT_ERROR"; |
|
|
|
BI.DynamicYearMonthTrigger.EVENT_START = "EVENT_START"; |
|
|
|
BI.DynamicYearMonthTrigger.EVENT_START = "EVENT_START"; |
|
|
@ -109163,6 +109228,7 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year |
|
|
|
}); |
|
|
|
}); |
|
|
|
combo.on(BI.DynamicYearMonthCombo.EVENT_ERROR, function () { |
|
|
|
combo.on(BI.DynamicYearMonthCombo.EVENT_ERROR, function () { |
|
|
|
self._clearTitle(); |
|
|
|
self._clearTitle(); |
|
|
|
|
|
|
|
BI.Bubbles.hide("error"); |
|
|
|
self.element.removeClass(self.constants.timeErrorCls); |
|
|
|
self.element.removeClass(self.constants.timeErrorCls); |
|
|
|
self.fireEvent(BI.YearMonthInterval.EVENT_ERROR); |
|
|
|
self.fireEvent(BI.YearMonthInterval.EVENT_ERROR); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -109442,7 +109508,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static |
|
|
|
obj.year = obj.year || 0; |
|
|
|
obj.year = obj.year || 0; |
|
|
|
obj.quarter = obj.quarter || 0; |
|
|
|
obj.quarter = obj.quarter || 0; |
|
|
|
if (obj.quarter === 0 || obj.year === 0 || BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) { |
|
|
|
if (obj.quarter === 0 || obj.year === 0 || BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) { |
|
|
|
var year = BI.getDate().getFullYear(); |
|
|
|
var year = obj.year || BI.getDate().getFullYear(); |
|
|
|
this.selectedYear = year; |
|
|
|
this.selectedYear = year; |
|
|
|
this.selectedQuarter = ""; |
|
|
|
this.selectedQuarter = ""; |
|
|
|
this.yearPicker.setValue(year); |
|
|
|
this.yearPicker.setValue(year); |
|
|
@ -109538,7 +109604,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { |
|
|
|
eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE, |
|
|
|
eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE, |
|
|
|
action: function () { |
|
|
|
action: function () { |
|
|
|
var date = BI.getDate(); |
|
|
|
var date = BI.getDate(); |
|
|
|
self.setValue({year: date.getFullYear(), quarter: date.getQuarter()}); |
|
|
|
self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), quarter: date.getQuarter()}}); |
|
|
|
self.combo.hideView(); |
|
|
|
self.combo.hideView(); |
|
|
|
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); |
|
|
|
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM); |
|
|
|
} |
|
|
|
} |
|
|
|