|
|
|
@ -77537,7 +77537,7 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
|
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
extraCls: "bi-bubble-bar-popup-view", |
|
|
|
|
buttons: [{value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}, {value: BI.i18nText("BI-Basic_Cancel"), level: "ignore"}] |
|
|
|
|
buttons: [{value: BI.i18nText("BI-Basic_Cancel"), level: "ignore"}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
_init: function () { |
|
|
|
@ -77547,7 +77547,7 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
|
|
|
|
|
var o = this.options, self = this; |
|
|
|
|
|
|
|
|
|
var items = []; |
|
|
|
|
BI.each(o.buttons.reverse(), function (i, buttonOpt) { |
|
|
|
|
BI.each(o.buttons, function (i, buttonOpt) { |
|
|
|
|
if(BI.isWidget(buttonOpt)) { |
|
|
|
|
items.push(buttonOpt); |
|
|
|
|
}else{ |
|
|
|
@ -87722,7 +87722,7 @@ BI.DatePicker = BI.inherit(BI.Widget, {
|
|
|
|
|
height: 25 |
|
|
|
|
}); |
|
|
|
|
this.left.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
|
if (self._month === 0) { |
|
|
|
|
if (self._month === 1) { |
|
|
|
|
self.setValue({ |
|
|
|
|
year: self.year.getValue() - 1, |
|
|
|
|
month: 12 |
|
|
|
@ -87746,7 +87746,7 @@ BI.DatePicker = BI.inherit(BI.Widget, {
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
this.right.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
|
if (self._month === 11) { |
|
|
|
|
if (self._month === 12) { |
|
|
|
|
self.setValue({ |
|
|
|
|
year: self.year.getValue() + 1, |
|
|
|
|
month: 0 |
|
|
|
@ -91313,9 +91313,10 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_monthCheck: function (v) { |
|
|
|
|
var date = BI.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d"); |
|
|
|
|
return (BI.parseDateTime(v, "%Y-%X").print("%Y-%X") === v || |
|
|
|
|
BI.parseDateTime(v, "%Y-%x").print("%Y-%x") === v) && date >= this.options.min && date <= this.options.max; |
|
|
|
|
var date = BI.parseDateTime(v, "%Y-%X-%d"); |
|
|
|
|
var dateStr = date.print("%Y-%X-%d"); |
|
|
|
|
return (date.getMonth() > 0 && (BI.parseDateTime(v, "%Y-%X").print("%Y-%X") === v || |
|
|
|
|
BI.parseDateTime(v, "%Y-%x").print("%Y-%x") === v)) && dateStr >= this.options.min && dateStr <= this.options.max; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_setInnerValue: function (date, text) { |
|
|
|
@ -91328,24 +91329,34 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
|
|
|
|
|
_getText: function (obj) { |
|
|
|
|
var value = ""; |
|
|
|
|
var endText = ""; |
|
|
|
|
if(BI.isNotNull(obj.year) && BI.parseInt(obj.year) !== 0) { |
|
|
|
|
if(BI.isNotNull(obj.year)) { |
|
|
|
|
if(BI.parseInt(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")); |
|
|
|
|
} |
|
|
|
|
endText = getPositionText(BI.i18nText("BI-Basic_Year"), obj.position); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.quarter) && BI.parseInt(obj.quarter) !== 0) { |
|
|
|
|
if(BI.isNotNull(obj.quarter)) { |
|
|
|
|
if(BI.parseInt(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")); |
|
|
|
|
} |
|
|
|
|
endText = getPositionText(BI.i18nText("BI-Basic_Single_Quarter"), obj.position); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.month) && BI.parseInt(obj.month) !== 0) { |
|
|
|
|
if(BI.isNotNull(obj.month)) { |
|
|
|
|
if(BI.parseInt(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")); |
|
|
|
|
} |
|
|
|
|
endText = getPositionText(BI.i18nText("BI-Basic_Month"), obj.position); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.week) && BI.parseInt(obj.week) !== 0) { |
|
|
|
|
if(BI.isNotNull(obj.week)) { |
|
|
|
|
if(BI.parseInt(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")); |
|
|
|
|
} |
|
|
|
|
endText = getPositionText(BI.i18nText("BI-Basic_Week"), obj.position); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.day) && BI.parseInt(obj.day) !== 0) { |
|
|
|
|
if(BI.isNotNull(obj.day)) { |
|
|
|
|
if(BI.parseInt(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")); |
|
|
|
|
} |
|
|
|
|
endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText("BI-Basic_Month"), obj.position) : ""; |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.workDay) && BI.parseInt(obj.workDay) !== 0) { |
|
|
|
@ -91387,7 +91398,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
|
|
|
|
|
this.editor.setValue(""); |
|
|
|
|
this.setTitle(""); |
|
|
|
|
} else { |
|
|
|
|
var dateStr = value.year + "-" + (value.month) + "-" + value.day; |
|
|
|
|
var dateStr = BI.getDate(value.year, (value.month - 1), value.day).print("%Y-%X-%d"); |
|
|
|
|
this.editor.setState(dateStr); |
|
|
|
|
this.editor.setValue(dateStr); |
|
|
|
|
this.setTitle(dateStr); |
|
|
|
@ -92208,9 +92219,10 @@ BI.extend(BI.DynamicDateTimeSelect, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_monthCheck: function (v) { |
|
|
|
|
var date = BI.parseDateTime(v, "%Y-%X-%d").print("%Y-%X-%d"); |
|
|
|
|
return (BI.parseDateTime(v, "%Y-%X").print("%Y-%X") === v || |
|
|
|
|
BI.parseDateTime(v, "%Y-%x").print("%Y-%x") === v) && date >= this.options.min && date <= this.options.max; |
|
|
|
|
var date = BI.parseDateTime(v, "%Y-%X-%d"); |
|
|
|
|
var dateStr = date.print("%Y-%X-%d"); |
|
|
|
|
return (date.getMonth() > 0 && (BI.parseDateTime(v, "%Y-%X").print("%Y-%X") === v || |
|
|
|
|
BI.parseDateTime(v, "%Y-%x").print("%Y-%x") === v)) && dateStr >= this.options.min && dateStr <= this.options.max; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_setInnerValue: function (date, text) { |
|
|
|
@ -92222,25 +92234,41 @@ BI.extend(BI.DynamicDateTimeSelect, {
|
|
|
|
|
|
|
|
|
|
_getText: function (obj) { |
|
|
|
|
var value = ""; |
|
|
|
|
if(BI.isNotNull(obj.year) && BI.parseInt(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); |
|
|
|
|
var endText = ""; |
|
|
|
|
if(BI.isNotNull(obj.year)) { |
|
|
|
|
if(BI.parseInt(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")); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.quarter) && BI.parseInt(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); |
|
|
|
|
endText = getPositionText(BI.i18nText("BI-Basic_Year"), obj.position); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.month) && BI.parseInt(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.quarter)) { |
|
|
|
|
if(BI.parseInt(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")); |
|
|
|
|
} |
|
|
|
|
endText = getPositionText(BI.i18nText("BI-Basic_Single_Quarter"), obj.position); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.month)) { |
|
|
|
|
if(BI.parseInt(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")); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.week) && BI.parseInt(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); |
|
|
|
|
endText = getPositionText(BI.i18nText("BI-Basic_Month"), obj.position); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.day) && BI.parseInt(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.week)) { |
|
|
|
|
if(BI.parseInt(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")); |
|
|
|
|
} |
|
|
|
|
endText = getPositionText(BI.i18nText("BI-Basic_Week"), obj.position); |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.day)) { |
|
|
|
|
if(BI.parseInt(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")); |
|
|
|
|
} |
|
|
|
|
endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText("BI-Basic_Month"), obj.position) : ""; |
|
|
|
|
} |
|
|
|
|
if(BI.isNotNull(obj.workDay) && BI.parseInt(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; |
|
|
|
|
return value + endText; |
|
|
|
|
|
|
|
|
|
function getPositionText (baseText, position) { |
|
|
|
|
switch (position) { |
|
|
|
@ -97169,7 +97197,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
|
|
|
|
|
self.trigger.getSearcher().setState(self.storeValue); |
|
|
|
|
self.trigger.getCounter().setButtonChecked(self.storeValue); |
|
|
|
|
}; |
|
|
|
|
this.storeValue = {}; |
|
|
|
|
this.storeValue = o.value || {}; |
|
|
|
|
// 标记正在请求数据
|
|
|
|
|
this.requesting = false; |
|
|
|
|
|
|
|
|
@ -108823,6 +108851,7 @@ BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);BI.DynamicYearM
|
|
|
|
|
BI.DynamicYearMonthCombo.superclass._init.apply(this, arguments); |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
this.storeValue = o.value; |
|
|
|
|
this.storeTriggerValue = ""; |
|
|
|
|
this.trigger = BI.createWidget({ |
|
|
|
|
type: "bi.dynamic_year_month_trigger", |
|
|
|
|
min: o.min, |
|
|
|
@ -108846,11 +108875,17 @@ BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);BI.DynamicYearM
|
|
|
|
|
if (self.combo.isViewVisible()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var dateStore = self.storeTriggerValue; |
|
|
|
|
var dateObj = self.trigger.getKey(); |
|
|
|
|
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) { |
|
|
|
|
self.storeValue = self.trigger.getValue(); |
|
|
|
|
self.setValue(self.trigger.getValue()); |
|
|
|
|
} |
|
|
|
|
self._checkDynamicValue(self.storeValue); |
|
|
|
|
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM); |
|
|
|
|
}); |
|
|
|
|
this.trigger.on(BI.DynamicYearMonthCombo.EVENT_FOCUS, function () { |
|
|
|
|
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_FOCUS, function () { |
|
|
|
|
self.storeTriggerValue = self.trigger.getKey(); |
|
|
|
|
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -109778,6 +109813,7 @@ BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicY
|
|
|
|
|
BI.DynamicYearQuarterCombo.superclass._init.apply(this, arguments); |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
this.storeValue = o.value; |
|
|
|
|
self.storeTriggerValue = ""; |
|
|
|
|
this.trigger = BI.createWidget({ |
|
|
|
|
type: "bi.dynamic_year_quarter_trigger", |
|
|
|
|
min: o.min, |
|
|
|
@ -109797,10 +109833,19 @@ BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicY
|
|
|
|
|
if (self.combo.isViewVisible()) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var dateStore = self.storeTriggerValue; |
|
|
|
|
var dateObj = self.trigger.getKey(); |
|
|
|
|
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) { |
|
|
|
|
self.storeValue = self.trigger.getValue(); |
|
|
|
|
self.setValue(self.trigger.getValue()); |
|
|
|
|
} |
|
|
|
|
self._checkDynamicValue(self.storeValue); |
|
|
|
|
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM); |
|
|
|
|
}); |
|
|
|
|
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS, function () { |
|
|
|
|
self.storeTriggerValue = self.trigger.getKey(); |
|
|
|
|
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_FOCUS); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
this.combo = BI.createWidget({ |
|
|
|
|
type: "bi.combo", |
|
|
|
@ -112411,7 +112456,7 @@ BI.i18n = {
|
|
|
|
|
"BI-Transparent_Color": "透明", |
|
|
|
|
"BI-Basic_Simple_Monday": "一", |
|
|
|
|
"BI-Multi_Date_Year_End": "年末", |
|
|
|
|
"BI-Time_Interval_Error_Text": "请保证前面时间小于/等于后面的时间", |
|
|
|
|
"BI-Time_Interval_Error_Text": "请保证开始时间早于/等于结束时间", |
|
|
|
|
"BI-Basic_Time": "时间", |
|
|
|
|
"BI-Basic_OK": "确定", |
|
|
|
|
"BI-Basic_Sure": "确定", |
|
|
|
|