|
|
|
@ -80551,7 +80551,109 @@ BI.Panel = BI.inherit(BI.Widget, {
|
|
|
|
|
}); |
|
|
|
|
BI.Panel.EVENT_CHANGE = "Panel.EVENT_CHANGE"; |
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.panel", BI.Panel);/** |
|
|
|
|
BI.shortcut("bi.panel", BI.Panel);BI.LinearSegmentButton = BI.inherit(BI.BasicButton, { |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
extraCls: "bi-line-segment-button bi-list-item-effect", |
|
|
|
|
once: true, |
|
|
|
|
readonly: true, |
|
|
|
|
hgap: 10, |
|
|
|
|
height: 25 |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
|
|
|
|
|
return [{ |
|
|
|
|
type: "bi.label", |
|
|
|
|
text: o.text, |
|
|
|
|
height: o.height, |
|
|
|
|
value: o.value, |
|
|
|
|
hgap: o.hgap, |
|
|
|
|
ref: function () { |
|
|
|
|
self.text = this; |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.layout", |
|
|
|
|
cls: "line-segment-button-line", |
|
|
|
|
height: 3, |
|
|
|
|
ref: function () { |
|
|
|
|
self.line = this; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
bottom: 0 |
|
|
|
|
}] |
|
|
|
|
}]; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setSelected: function (v) { |
|
|
|
|
BI.LinearSegmentButton.superclass.setSelected.apply(this, arguments); |
|
|
|
|
if (v) { |
|
|
|
|
this.line.element.addClass("bi-high-light-background"); |
|
|
|
|
} else { |
|
|
|
|
this.line.element.removeClass("bi-high-light-background"); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setText: function (text) { |
|
|
|
|
this.text.setText(text); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
BI.shortcut("bi.linear_segment_button", BI.LinearSegmentButton);BI.LinearSegment = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
baseCls: "bi-linear-segment bi-border-bottom", |
|
|
|
|
items: [], |
|
|
|
|
height: 29 |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
return { |
|
|
|
|
type: "bi.button_group", |
|
|
|
|
items: BI.createItems(o.items, { |
|
|
|
|
type: "bi.linear_segment_button", |
|
|
|
|
height: o.height - 1 |
|
|
|
|
}), |
|
|
|
|
layout: [{ |
|
|
|
|
type: "bi.center" |
|
|
|
|
}], |
|
|
|
|
listeners: [{ |
|
|
|
|
eventName: "__EVENT_CHANGE__", |
|
|
|
|
action: function () { |
|
|
|
|
self.fireEvent("__EVENT_CHANGE__", arguments); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
|
eventName: "EVENT_CHANGE", |
|
|
|
|
action: function () { |
|
|
|
|
self.fireEvent("EVENT_CHANGE"); |
|
|
|
|
} |
|
|
|
|
}], |
|
|
|
|
ref: function () { |
|
|
|
|
self.buttonGroup = this; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
|
this.buttonGroup.setValue(v); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setEnabledValue: function (v) { |
|
|
|
|
this.buttonGroup.setEnabledValue(v); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
|
return this.buttonGroup.getValue(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
BI.shortcut("bi.linear_segment", BI.LinearSegment);/** |
|
|
|
|
* 选择列表 |
|
|
|
|
* |
|
|
|
|
* Created by GUY on 2015/11/1. |
|
|
|
@ -89230,7 +89332,8 @@ BI.shortcut("bi.static_date_pane_card", BI.StaticDatePaneCard);BI.DynamicDatePan
|
|
|
|
|
type: "bi.vtape", |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.button_group", |
|
|
|
|
type: "bi.linear_segment", |
|
|
|
|
cls: "bi-border-bottom", |
|
|
|
|
height: 30, |
|
|
|
|
items: BI.createItems([{ |
|
|
|
|
text: BI.i18nText("BI-Multi_Date_YMD"), |
|
|
|
@ -89239,12 +89342,8 @@ BI.shortcut("bi.static_date_pane_card", BI.StaticDatePaneCard);BI.DynamicDatePan
|
|
|
|
|
text: BI.i18nText("BI-Basic_Dynamic_Title"), |
|
|
|
|
value: BI.DynamicDatePane.Dynamic |
|
|
|
|
}], { |
|
|
|
|
textAlign: "center", |
|
|
|
|
cls: "bi-list-item-active" |
|
|
|
|
textAlign: "center" |
|
|
|
|
}), |
|
|
|
|
layouts: [{ |
|
|
|
|
type: "bi.center" |
|
|
|
|
}], |
|
|
|
|
listeners: [{ |
|
|
|
|
eventName: BI.ButtonGroup.EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
@ -89584,7 +89683,7 @@ BI.StaticYearCard.EVENT_CHANGE = "EVENT_CHANGE";
|
|
|
|
|
BI.shortcut("bi.static_year_card", BI.StaticYearCard);BI.DynamicYearCombo = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
baseCls: "bi-year-combo", |
|
|
|
|
baseCls: "bi-year-combo bi-border", |
|
|
|
|
behaviors: {}, |
|
|
|
|
min: "1900-01-01", // 最小日期
|
|
|
|
|
max: "2099-12-31", // 最大日期
|
|
|
|
@ -89629,7 +89728,6 @@ BI.shortcut("bi.static_year_card", BI.StaticYearCard);BI.DynamicYearCombo = BI.i
|
|
|
|
|
|
|
|
|
|
this.combo = BI.createWidget({ |
|
|
|
|
type: "bi.combo", |
|
|
|
|
element: this, |
|
|
|
|
isNeedAdjustHeight: false, |
|
|
|
|
isNeedAdjustWidth: false, |
|
|
|
|
el: this.trigger, |
|
|
|
@ -89682,11 +89780,52 @@ BI.shortcut("bi.static_year_card", BI.StaticYearCard);BI.DynamicYearCombo = BI.i
|
|
|
|
|
self.popup.setValue(self.storeValue); |
|
|
|
|
self.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.htape", |
|
|
|
|
element: this, |
|
|
|
|
ref: function () { |
|
|
|
|
self.comboWrapper = this; |
|
|
|
|
}, |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
cls: "bi-trigger-icon-button date-change-h-font", |
|
|
|
|
width: 24, |
|
|
|
|
height: 24, |
|
|
|
|
ref: function () { |
|
|
|
|
self.changeIcon = this; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
width: 30 |
|
|
|
|
}, this.combo] |
|
|
|
|
}); |
|
|
|
|
this._checkDynamicValue(o.value); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_checkDynamicValue: function (v) { |
|
|
|
|
var type = null; |
|
|
|
|
if (BI.isNotNull(v)) { |
|
|
|
|
type = v.type; |
|
|
|
|
} |
|
|
|
|
switch (type) { |
|
|
|
|
case BI.DynamicYearCombo.Dynamic: |
|
|
|
|
this.changeIcon.setVisible(true); |
|
|
|
|
this.comboWrapper.attr("items")[0].width = 30; |
|
|
|
|
this.comboWrapper.resize(); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
this.comboWrapper.attr("items")[0].width = 0; |
|
|
|
|
this.comboWrapper.resize(); |
|
|
|
|
this.changeIcon.setVisible(false); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
|
this.storeValue = v; |
|
|
|
|
this.trigger.setValue(v); |
|
|
|
|
this._checkDynamicValue(v); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
@ -89799,6 +89938,8 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
|
|
|
|
|
self.dateTab = this; |
|
|
|
|
}, |
|
|
|
|
tab: { |
|
|
|
|
type: "bi.linear_segment", |
|
|
|
|
cls: "bi-border-bottom", |
|
|
|
|
height: this.constants.tabHeight, |
|
|
|
|
items: BI.createItems([{ |
|
|
|
|
text: BI.i18nText("BI-Basic_Year_Fen"), |
|
|
|
@ -89807,12 +89948,8 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
|
|
|
|
|
text: BI.i18nText("BI-Basic_Dynamic_Title"), |
|
|
|
|
value: BI.DynamicYearCombo.Dynamic |
|
|
|
|
}], { |
|
|
|
|
textAlign: "center", |
|
|
|
|
cls: "bi-list-item-active" |
|
|
|
|
}), |
|
|
|
|
layouts: [{ |
|
|
|
|
type: "bi.center" |
|
|
|
|
}] |
|
|
|
|
textAlign: "center" |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
cardCreator: function (v) { |
|
|
|
|
switch (v) { |
|
|
|
@ -89919,7 +90056,7 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
|
|
|
|
|
|
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
extraCls: "bi-year-trigger bi-border", |
|
|
|
|
extraCls: "bi-year-trigger", |
|
|
|
|
min: "1900-01-01", // 最小日期
|
|
|
|
|
max: "2099-12-31", // 最大日期
|
|
|
|
|
height: 24 |
|
|
|
@ -89939,6 +90076,7 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
|
|
|
|
|
}, |
|
|
|
|
hgap: c.hgap, |
|
|
|
|
vgap: c.vgap, |
|
|
|
|
watermark: BI.i18nText("BI-Basic_Unrestricted"), |
|
|
|
|
allowBlank: true, |
|
|
|
|
errorText: function (v) { |
|
|
|
|
return !BI.isPositiveInteger(v) ? c.errorText : c.errorTextInvalid; |
|
|
|
@ -89980,32 +90118,30 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
element: this, |
|
|
|
|
type: "bi.htape", |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
el: this.editor |
|
|
|
|
}, { |
|
|
|
|
el: { |
|
|
|
|
type: "bi.text_button", |
|
|
|
|
baseCls: "bi-trigger-year-text", |
|
|
|
|
text: BI.i18nText("BI-Multi_Date_Year"), |
|
|
|
|
width: o.height |
|
|
|
|
}, |
|
|
|
|
items: [{ |
|
|
|
|
el: this.editor |
|
|
|
|
}, { |
|
|
|
|
el: { |
|
|
|
|
type: "bi.text_button", |
|
|
|
|
baseCls: "bi-trigger-year-text", |
|
|
|
|
text: BI.i18nText("BI-Multi_Date_Year"), |
|
|
|
|
width: o.height |
|
|
|
|
}, { |
|
|
|
|
el: { |
|
|
|
|
type: "bi.trigger_icon_button", |
|
|
|
|
width: o.height |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
width: o.height |
|
|
|
|
}, { |
|
|
|
|
el: { |
|
|
|
|
type: "bi.trigger_icon_button", |
|
|
|
|
width: o.height |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
width: o.height |
|
|
|
|
}] |
|
|
|
|
}); |
|
|
|
|
this.setValue(o.value); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getText: function (obj) { |
|
|
|
|
var value = ""; |
|
|
|
|
if(BI.isNotNull(obj.year)) { |
|
|
|
|
if(BI.isNotNull(obj.year) && obj.year !== 0) { |
|
|
|
|
value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); |
|
|
|
|
} |
|
|
|
|
return value; |
|
|
|
@ -90015,7 +90151,7 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
|
|
|
|
|
var dateStr = date.print("%Y"); |
|
|
|
|
this.editor.setState(dateStr); |
|
|
|
|
this.editor.setValue(dateStr); |
|
|
|
|
this.setTitle(text + ":" + dateStr); |
|
|
|
|
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr)); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
@ -90034,6 +90170,7 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
|
|
|
|
|
break; |
|
|
|
|
case BI.DynamicDateCombo.Static: |
|
|
|
|
default: |
|
|
|
|
value = value || {}; |
|
|
|
|
this.editor.setState(value.year); |
|
|
|
|
this.editor.setValue(value.year); |
|
|
|
|
this.editor.setTitle(value.year); |
|
|
|
@ -90207,6 +90344,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
|
|
|
|
|
listeners: [{ |
|
|
|
|
eventName: BI.ButtonGroup.EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
|
self.selectedYear = self.yearPicker.getValue(); |
|
|
|
|
self.selectedMonth = this.getValue()[0]; |
|
|
|
|
self.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE); |
|
|
|
|
} |
|
|
|
@ -90247,7 +90385,7 @@ BI.StaticYearMonthCard.EVENT_CHANGE = "EVENT_CHANGE";
|
|
|
|
|
BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);BI.DynamicYearMonthCombo = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
baseCls: "bi-year-month-combo", |
|
|
|
|
baseCls: "bi-year-month-combo bi-border", |
|
|
|
|
behaviors: {}, |
|
|
|
|
min: "1900-01-01", // 最小日期
|
|
|
|
|
max: "2099-12-31", // 最大日期
|
|
|
|
@ -90283,7 +90421,6 @@ BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);BI.DynamicYearM
|
|
|
|
|
|
|
|
|
|
this.combo = BI.createWidget({ |
|
|
|
|
type: "bi.combo", |
|
|
|
|
element: this, |
|
|
|
|
isNeedAdjustHeight: false, |
|
|
|
|
isNeedAdjustWidth: false, |
|
|
|
|
el: this.trigger, |
|
|
|
@ -90336,11 +90473,52 @@ BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);BI.DynamicYearM
|
|
|
|
|
self.popup.setValue(self.storeValue); |
|
|
|
|
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.htape", |
|
|
|
|
element: this, |
|
|
|
|
ref: function () { |
|
|
|
|
self.comboWrapper = this; |
|
|
|
|
}, |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
cls: "bi-trigger-icon-button date-change-h-font", |
|
|
|
|
width: 24, |
|
|
|
|
height: 24, |
|
|
|
|
ref: function () { |
|
|
|
|
self.changeIcon = this; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
width: 30 |
|
|
|
|
}, this.combo] |
|
|
|
|
}); |
|
|
|
|
this._checkDynamicValue(o.value); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_checkDynamicValue: function (v) { |
|
|
|
|
var type = null; |
|
|
|
|
if (BI.isNotNull(v)) { |
|
|
|
|
type = v.type; |
|
|
|
|
} |
|
|
|
|
switch (type) { |
|
|
|
|
case BI.DynamicYearMonthCombo.Dynamic: |
|
|
|
|
this.changeIcon.setVisible(true); |
|
|
|
|
this.comboWrapper.attr("items")[0].width = 30; |
|
|
|
|
this.comboWrapper.resize(); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
this.comboWrapper.attr("items")[0].width = 0; |
|
|
|
|
this.comboWrapper.resize(); |
|
|
|
|
this.changeIcon.setVisible(false); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
|
this.storeValue = v; |
|
|
|
|
this.trigger.setValue(v); |
|
|
|
|
this._checkDynamicValue(v); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
@ -90453,6 +90631,8 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
|
|
|
|
|
self.dateTab = this; |
|
|
|
|
}, |
|
|
|
|
tab: { |
|
|
|
|
type: "bi.linear_segment", |
|
|
|
|
cls: "bi-border-bottom", |
|
|
|
|
height: this.constants.tabHeight, |
|
|
|
|
items: BI.createItems([{ |
|
|
|
|
text: BI.i18nText("BI-Basic_Year_Fen"), |
|
|
|
@ -90461,12 +90641,8 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
|
|
|
|
|
text: BI.i18nText("BI-Basic_Dynamic_Title"), |
|
|
|
|
value: BI.DynamicYearCombo.Dynamic |
|
|
|
|
}], { |
|
|
|
|
textAlign: "center", |
|
|
|
|
cls: "bi-list-item-active" |
|
|
|
|
}), |
|
|
|
|
layouts: [{ |
|
|
|
|
type: "bi.center" |
|
|
|
|
}] |
|
|
|
|
textAlign: "center" |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
cardCreator: function (v) { |
|
|
|
|
switch (v) { |
|
|
|
@ -90572,7 +90748,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
extraCls: "bi-year-month-trigger bi-border", |
|
|
|
|
extraCls: "bi-year-month-trigger", |
|
|
|
|
min: "1900-01-01", // 最小日期
|
|
|
|
|
max: "2099-12-31", // 最大日期
|
|
|
|
|
height: 24 |
|
|
|
@ -90627,11 +90803,15 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
|
|
|
|
|
type: "bi.sign_editor", |
|
|
|
|
height: o.height, |
|
|
|
|
validationChecker: function (v) { |
|
|
|
|
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(isYear ? v : BI.getDate().getFullYear(), isYear ? 1 : v, 1, o.min, o.max)[0]); |
|
|
|
|
if(isYear) { |
|
|
|
|
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]); |
|
|
|
|
} |
|
|
|
|
return v === "" || ((v >= 1 && v <= 12) && !BI.checkDateVoid(BI.getDate().getFullYear(), v, 1, o.min, o.max)[0]); |
|
|
|
|
}, |
|
|
|
|
quitChecker: function () { |
|
|
|
|
return false; |
|
|
|
|
}, |
|
|
|
|
watermark: BI.i18nText("BI-Basic_Unrestricted"), |
|
|
|
|
errorText: function (v) { |
|
|
|
|
return !BI.isPositiveInteger(v) ? c.errorText : c.errorTextInvalid; |
|
|
|
|
}, |
|
|
|
@ -90701,7 +90881,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
|
|
|
|
|
if(BI.isNotNull(obj.year)) { |
|
|
|
|
value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.month)) { |
|
|
|
|
if(BI.isNotNull(obj.month) && obj.month !== 0) { |
|
|
|
|
value += Math.abs(obj.month) + BI.i18nText("BI-Basic_Year") + (obj.month < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); |
|
|
|
|
} |
|
|
|
|
return value; |
|
|
|
@ -90711,7 +90891,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
|
|
|
|
|
var dateStr = date.print("%Y-%x"); |
|
|
|
|
this.yearEditor.setValue(date.getFullYear()); |
|
|
|
|
this.monthEditor.setValue(date.getMonth() + 1); |
|
|
|
|
this.setTitle(text + ":" + dateStr); |
|
|
|
|
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr)); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
@ -90894,6 +91074,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
|
|
|
|
|
listeners: [{ |
|
|
|
|
eventName: BI.ButtonGroup.EVENT_CHANGE, |
|
|
|
|
action: function () { |
|
|
|
|
self.selectedYear = self.yearPicker.getValue(); |
|
|
|
|
self.selectedQuarter = this.getValue()[0]; |
|
|
|
|
self.fireEvent(BI.StaticYearQuarterCard.EVENT_CHANGE); |
|
|
|
|
} |
|
|
|
@ -90934,7 +91115,7 @@ BI.StaticYearQuarterCard.EVENT_CHANGE = "EVENT_CHANGE";
|
|
|
|
|
BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
baseCls: "bi-year-quarter-combo", |
|
|
|
|
baseCls: "bi-year-quarter-combo bi-border", |
|
|
|
|
behaviors: {}, |
|
|
|
|
min: "1900-01-01", // 最小日期
|
|
|
|
|
max: "2099-12-31", // 最大日期
|
|
|
|
@ -90970,7 +91151,6 @@ BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicY
|
|
|
|
|
|
|
|
|
|
this.combo = BI.createWidget({ |
|
|
|
|
type: "bi.combo", |
|
|
|
|
element: this, |
|
|
|
|
isNeedAdjustHeight: false, |
|
|
|
|
isNeedAdjustWidth: false, |
|
|
|
|
el: this.trigger, |
|
|
|
@ -91023,11 +91203,52 @@ BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicY
|
|
|
|
|
self.popup.setValue(self.storeValue); |
|
|
|
|
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.htape", |
|
|
|
|
element: this, |
|
|
|
|
ref: function () { |
|
|
|
|
self.comboWrapper = this; |
|
|
|
|
}, |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
cls: "bi-trigger-icon-button date-change-h-font", |
|
|
|
|
width: 24, |
|
|
|
|
height: 24, |
|
|
|
|
ref: function () { |
|
|
|
|
self.changeIcon = this; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
width: 30 |
|
|
|
|
}, this.combo] |
|
|
|
|
}); |
|
|
|
|
this._checkDynamicValue(o.value); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_checkDynamicValue: function (v) { |
|
|
|
|
var type = null; |
|
|
|
|
if (BI.isNotNull(v)) { |
|
|
|
|
type = v.type; |
|
|
|
|
} |
|
|
|
|
switch (type) { |
|
|
|
|
case BI.DynamicYearQuarterCombo.Dynamic: |
|
|
|
|
this.changeIcon.setVisible(true); |
|
|
|
|
this.comboWrapper.attr("items")[0].width = 30; |
|
|
|
|
this.comboWrapper.resize(); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
this.comboWrapper.attr("items")[0].width = 0; |
|
|
|
|
this.comboWrapper.resize(); |
|
|
|
|
this.changeIcon.setVisible(false); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
|
this.storeValue = v; |
|
|
|
|
this.trigger.setValue(v); |
|
|
|
|
this._checkDynamicValue(v); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
@ -91133,6 +91354,8 @@ BI.extend(BI.DynamicYearQuarterCombo, {
|
|
|
|
|
self.dateTab = this; |
|
|
|
|
}, |
|
|
|
|
tab: { |
|
|
|
|
type: "bi.linear_segment", |
|
|
|
|
cls: "bi-border-bottom", |
|
|
|
|
height: this.constants.tabHeight, |
|
|
|
|
items: BI.createItems([{ |
|
|
|
|
text: BI.i18nText("BI-Basic_Year_Fen"), |
|
|
|
@ -91141,12 +91364,8 @@ BI.extend(BI.DynamicYearQuarterCombo, {
|
|
|
|
|
text: BI.i18nText("BI-Basic_Dynamic_Title"), |
|
|
|
|
value: BI.DynamicYearQuarterCombo.Dynamic |
|
|
|
|
}], { |
|
|
|
|
textAlign: "center", |
|
|
|
|
cls: "bi-list-item-active" |
|
|
|
|
}), |
|
|
|
|
layouts: [{ |
|
|
|
|
type: "bi.center" |
|
|
|
|
}] |
|
|
|
|
textAlign: "center" |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
cardCreator: function (v) { |
|
|
|
|
switch (v) { |
|
|
|
@ -91252,7 +91471,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
extraCls: "bi-year-quarter-trigger bi-border", |
|
|
|
|
extraCls: "bi-year-quarter-trigger", |
|
|
|
|
min: "1900-01-01", // 最小日期
|
|
|
|
|
max: "2099-12-31", // 最大日期
|
|
|
|
|
height: 24 |
|
|
|
@ -91307,7 +91526,10 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
|
|
|
|
|
type: "bi.sign_editor", |
|
|
|
|
height: o.height, |
|
|
|
|
validationChecker: function (v) { |
|
|
|
|
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(isYear ? v : BI.getDate().getFullYear(), isYear ? 1 : v, 1, o.min, o.max)[0]); |
|
|
|
|
if(isYear) { |
|
|
|
|
return v === "" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]); |
|
|
|
|
} |
|
|
|
|
return v === "" || ((v >= 1 && v <= 4) && !BI.checkDateVoid(BI.getDate().getFullYear(), v, 1, o.min, o.max)[0]); |
|
|
|
|
}, |
|
|
|
|
quitChecker: function () { |
|
|
|
|
return false; |
|
|
|
@ -91315,6 +91537,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
|
|
|
|
|
errorText: function (v) { |
|
|
|
|
return !BI.isPositiveInteger(v) ? c.errorText : c.errorTextInvalid; |
|
|
|
|
}, |
|
|
|
|
watermark: BI.i18nText("BI-Basic_Unrestricted"), |
|
|
|
|
hgap: c.hgap, |
|
|
|
|
vgap: c.vgap, |
|
|
|
|
allowBlank: true |
|
|
|
@ -91381,7 +91604,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
|
|
|
|
|
if(BI.isNotNull(obj.year)) { |
|
|
|
|
value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.quarter)) { |
|
|
|
|
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) { |
|
|
|
|
value += Math.abs(obj.quarter) + BI.i18nText("BI-Basic_Year") + (obj.quarter < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); |
|
|
|
|
} |
|
|
|
|
return value; |
|
|
|
@ -91391,7 +91614,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
|
|
|
|
|
var dateStr = date.print("%Y-%x"); |
|
|
|
|
this.yearEditor.setValue(date.getFullYear()); |
|
|
|
|
this.quarterEditor.setValue(date.getQuarter()); |
|
|
|
|
this.setTitle(text + ":" + dateStr); |
|
|
|
|
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr)); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
@ -91817,6 +92040,17 @@ BI.extend(BI.DynamicDateCard, {
|
|
|
|
|
return { |
|
|
|
|
type: "bi.htape", |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
cls: "bi-trigger-icon-button date-change-h-font", |
|
|
|
|
width: 24, |
|
|
|
|
height: 24, |
|
|
|
|
ref: function () { |
|
|
|
|
self.changeIcon = this; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
width: 30 |
|
|
|
|
}, { |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
@ -91979,19 +92213,8 @@ BI.extend(BI.DynamicDateCard, {
|
|
|
|
|
}] |
|
|
|
|
}, |
|
|
|
|
top: 0, |
|
|
|
|
left: 0 |
|
|
|
|
right: 0 |
|
|
|
|
}] |
|
|
|
|
}, { |
|
|
|
|
el: { |
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
cls: "bi-trigger-icon-button date-change-h-font", |
|
|
|
|
width: 24, |
|
|
|
|
height: 24, |
|
|
|
|
ref: function () { |
|
|
|
|
self.changeIcon = this; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
width: 30 |
|
|
|
|
}], |
|
|
|
|
ref: function (_ref) { |
|
|
|
|
self.comboWrapper = _ref; |
|
|
|
@ -92011,11 +92234,11 @@ BI.extend(BI.DynamicDateCard, {
|
|
|
|
|
switch (type) { |
|
|
|
|
case BI.DynamicDateCombo.Dynamic: |
|
|
|
|
this.changeIcon.setVisible(true); |
|
|
|
|
this.comboWrapper.attr("items")[1].width = 30; |
|
|
|
|
this.comboWrapper.attr("items")[0].width = 30; |
|
|
|
|
this.comboWrapper.resize(); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
this.comboWrapper.attr("items")[1].width = 0; |
|
|
|
|
this.comboWrapper.attr("items")[0].width = 0; |
|
|
|
|
this.comboWrapper.resize(); |
|
|
|
|
this.changeIcon.setVisible(false); |
|
|
|
|
break; |
|
|
|
@ -92076,6 +92299,13 @@ BI.extend(BI.DynamicDateCombo, {
|
|
|
|
|
ref: function () { |
|
|
|
|
self.editor = this; |
|
|
|
|
}, |
|
|
|
|
errorText: function (v) { |
|
|
|
|
if(BI.isEmptyString(v)) { |
|
|
|
|
return BI.i18nText("BI-Basic_Input_Can_Not_Null"); |
|
|
|
|
} |
|
|
|
|
return BI.i18nText("BI-Please_Input_Positive_Integer"); |
|
|
|
|
}, |
|
|
|
|
allowBlank: false, |
|
|
|
|
listeners: [{ |
|
|
|
|
eventName: BI.SignEditor.EVENT_CONFIRM, |
|
|
|
|
action: function () { |
|
|
|
@ -92235,7 +92465,8 @@ BI.shortcut("bi.dynamic_date_param_item", BI.DynamicDateParamItem);BI.DynamicDat
|
|
|
|
|
self.dateTab = this; |
|
|
|
|
}, |
|
|
|
|
tab: { |
|
|
|
|
cls: "bi-multidate-popup-tab bi-border-bottom", |
|
|
|
|
type: "bi.linear_segment", |
|
|
|
|
cls: "bi-border-bottom", |
|
|
|
|
height: this.constants.tabHeight, |
|
|
|
|
items: BI.createItems([{ |
|
|
|
|
text: BI.i18nText("BI-Multi_Date_YMD"), |
|
|
|
@ -92244,12 +92475,8 @@ BI.shortcut("bi.dynamic_date_param_item", BI.DynamicDateParamItem);BI.DynamicDat
|
|
|
|
|
text: BI.i18nText("BI-Basic_Dynamic_Title"), |
|
|
|
|
value: BI.DynamicDateCombo.Dynamic |
|
|
|
|
}], { |
|
|
|
|
textAlign: "center", |
|
|
|
|
cls: "bi-list-item-active" |
|
|
|
|
}), |
|
|
|
|
layouts: [{ |
|
|
|
|
type: "bi.center" |
|
|
|
|
}] |
|
|
|
|
textAlign: "center" |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
cardCreator: function (v) { |
|
|
|
|
switch (v) { |
|
|
|
@ -92467,10 +92694,10 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
|
|
|
|
|
type: "bi.htape", |
|
|
|
|
element: this, |
|
|
|
|
items: [{ |
|
|
|
|
el: this.editor |
|
|
|
|
}, { |
|
|
|
|
el: BI.createWidget(), |
|
|
|
|
width: 30 |
|
|
|
|
}, { |
|
|
|
|
el: this.editor |
|
|
|
|
}] |
|
|
|
|
}); |
|
|
|
|
this.setValue(o.value); |
|
|
|
@ -92515,32 +92742,32 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
|
|
|
|
|
var dateStr = date.print("%Y-%x-%e"); |
|
|
|
|
this.editor.setState(dateStr); |
|
|
|
|
this.editor.setValue(dateStr); |
|
|
|
|
this.setTitle(text + ":" + dateStr); |
|
|
|
|
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr)); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getText: function (obj) { |
|
|
|
|
var value = ""; |
|
|
|
|
if(BI.isNotNull(obj.year)) { |
|
|
|
|
if(BI.isNotNull(obj.year) && obj.year !== 0) { |
|
|
|
|
value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")) + getPositionText(BI.i18nText("BI-Basic_Year"), obj.position); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.quarter)) { |
|
|
|
|
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) { |
|
|
|
|
value += Math.abs(obj.quarter) + BI.i18nText("BI-Basic_Single_Quarter") + (obj.quarter < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")) + getPositionText(BI.i18nText("BI-Basic_Year"), obj.position); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.month)) { |
|
|
|
|
if(BI.isNotNull(obj.month) && obj.month !== 0) { |
|
|
|
|
value += Math.abs(obj.month) + BI.i18nText("BI-Basic_Month") + (obj.month < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")) + getPositionText(BI.i18nText("BI-Basic_Month"), obj.position); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.week)) { |
|
|
|
|
if(BI.isNotNull(obj.week) && obj.week !== 0) { |
|
|
|
|
value += Math.abs(obj.week) + BI.i18nText("BI-Basic_Week") + (obj.week < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")) + getPositionText(BI.i18nText("BI-Basic_Week"), obj.position); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.day)) { |
|
|
|
|
if(BI.isNotNull(obj.day) && obj.day !== 0) { |
|
|
|
|
value += Math.abs(obj.day) + BI.i18nText("BI-Basic_Day") + (obj.day < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")) + BI.size(obj) === 1 ? getPositionText(BI.i18nText("BI-Basic_Month"), obj.position) : ""; |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.workDay)) { |
|
|
|
|
if(BI.isNotNull(obj.workDay) && obj.workDay !== 0) { |
|
|
|
|
value += Math.abs(obj.workDay) + BI.i18nText("BI-Basic_Work_Day") + (obj.workDay < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); |
|
|
|
|
} |
|
|
|
|
return value; |
|
|
|
|
|
|
|
|
|
function getPositionText(baseText, position) { |
|
|
|
|
function getPositionText (baseText, position) { |
|
|
|
|
switch (position) { |
|
|
|
|
case BI.DynamicDateCard.OFFSET.BEGIN: |
|
|
|
|
return baseText + BI.i18nText("BI-Basic_Begin_Start"); |
|
|
|
@ -95271,7 +95498,7 @@ BI.MultiDatePopup = BI.inherit(BI.Widget, {
|
|
|
|
|
this.dateTab = BI.createWidget({ |
|
|
|
|
type: "bi.tab", |
|
|
|
|
tab: { |
|
|
|
|
cls: "bi-multidate-popup-tab bi-border-bottom", |
|
|
|
|
cls: "bi-border-bottom", |
|
|
|
|
height: this.constants.tabHeight, |
|
|
|
|
items: BI.createItems([{ |
|
|
|
|
text: BI.i18nText("BI-Multi_Date_YMD"), |
|
|
|
@ -110307,5 +110534,6 @@ BI.i18n = {
|
|
|
|
|
"BI-Basic_Current_Month": "本月", |
|
|
|
|
"BI-Basic_Current_Quarter": "本季度", |
|
|
|
|
"BI-Basic_Year_Month": "年月", |
|
|
|
|
"BI-Basic_Year_Quarter": "年季度" |
|
|
|
|
"BI-Basic_Year_Quarter": "年季度", |
|
|
|
|
"BI-Basic_Input_Can_Not_Null": "输入框不能为空" |
|
|
|
|
}; |