Browse Source

BI-18326 && BI-18585

master
windy 7 years ago
parent
commit
c99c2a610a
  1. 34
      dist/bundle.js
  2. 34
      dist/widget.js
  3. 18
      src/widget/dynamicdate/dynamicdate.trigger.js
  4. 18
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js
  5. 2
      src/widget/year/trigger.year.js
  6. 4
      src/widget/yearmonth/trigger.yearmonth.js
  7. 4
      src/widget/yearquarter/trigger.yearquarter.js

34
dist/bundle.js vendored

@ -91301,27 +91301,27 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
_getText: function (obj) {
var value = "";
var endText = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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"));
endText = getPositionText(BI.i18nText("BI-Basic_Year"), obj.position);
}
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) {
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"));
endText = getPositionText(BI.i18nText("BI-Basic_Single_Quarter"), obj.position);
}
if(BI.isNotNull(obj.month) && obj.month !== 0) {
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"));
endText = getPositionText(BI.i18nText("BI-Basic_Month"), obj.position);
}
if(BI.isNotNull(obj.week) && obj.week !== 0) {
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"));
endText = getPositionText(BI.i18nText("BI-Basic_Week"), obj.position);
}
if(BI.isNotNull(obj.day) && obj.day !== 0) {
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"));
endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText("BI-Basic_Month"), obj.position) : "";
}
if(BI.isNotNull(obj.workDay) && obj.workDay !== 0) {
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 + endText;
@ -92192,22 +92192,22 @@ BI.extend(BI.DynamicDateTimeSelect, {
_getText: function (obj) {
var value = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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);
}
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) {
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);
}
if(BI.isNotNull(obj.month) && obj.month !== 0) {
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.week) && obj.week !== 0) {
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);
}
if(BI.isNotNull(obj.day) && obj.day !== 0) {
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.workDay) && obj.workDay !== 0) {
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;
@ -108557,7 +108557,7 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
_getText: function (obj) {
var value = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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"));
}
return value;
@ -109320,10 +109320,10 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
_getText: function (obj) {
var value = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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"));
}
if(BI.isNotNull(obj.month) && obj.month !== 0) {
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"));
}
return value;
@ -110241,10 +110241,10 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
_getText: function (obj) {
var value = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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"));
}
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) {
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"));
}
return value;

34
dist/widget.js vendored

@ -4172,27 +4172,27 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
_getText: function (obj) {
var value = "";
var endText = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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"));
endText = getPositionText(BI.i18nText("BI-Basic_Year"), obj.position);
}
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) {
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"));
endText = getPositionText(BI.i18nText("BI-Basic_Single_Quarter"), obj.position);
}
if(BI.isNotNull(obj.month) && obj.month !== 0) {
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"));
endText = getPositionText(BI.i18nText("BI-Basic_Month"), obj.position);
}
if(BI.isNotNull(obj.week) && obj.week !== 0) {
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"));
endText = getPositionText(BI.i18nText("BI-Basic_Week"), obj.position);
}
if(BI.isNotNull(obj.day) && obj.day !== 0) {
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"));
endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText("BI-Basic_Month"), obj.position) : "";
}
if(BI.isNotNull(obj.workDay) && obj.workDay !== 0) {
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 + endText;
@ -5063,22 +5063,22 @@ BI.extend(BI.DynamicDateTimeSelect, {
_getText: function (obj) {
var value = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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);
}
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) {
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);
}
if(BI.isNotNull(obj.month) && obj.month !== 0) {
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.week) && obj.week !== 0) {
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);
}
if(BI.isNotNull(obj.day) && obj.day !== 0) {
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.workDay) && obj.workDay !== 0) {
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;
@ -21428,7 +21428,7 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
_getText: function (obj) {
var value = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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"));
}
return value;
@ -22191,10 +22191,10 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
_getText: function (obj) {
var value = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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"));
}
if(BI.isNotNull(obj.month) && obj.month !== 0) {
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"));
}
return value;
@ -23112,10 +23112,10 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
_getText: function (obj) {
var value = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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"));
}
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) {
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"));
}
return value;

18
src/widget/dynamicdate/dynamicdate.trigger.js

@ -23,9 +23,9 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
var date = v.match(/\d+/g);
self._autoAppend(v, date);
return self._dateCheck(v) && BI.checkDateLegal(v) && self._checkVoid({
year: date[0],
month: date[1],
day: date[2]
year: date[0] | 0,
month: date[1] | 0,
day: date[2] | 0
});
},
quitChecker: function () {
@ -145,27 +145,27 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
_getText: function (obj) {
var value = "";
var endText = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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"));
endText = getPositionText(BI.i18nText("BI-Basic_Year"), obj.position);
}
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) {
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"));
endText = getPositionText(BI.i18nText("BI-Basic_Single_Quarter"), obj.position);
}
if(BI.isNotNull(obj.month) && obj.month !== 0) {
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"));
endText = getPositionText(BI.i18nText("BI-Basic_Month"), obj.position);
}
if(BI.isNotNull(obj.week) && obj.week !== 0) {
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"));
endText = getPositionText(BI.i18nText("BI-Basic_Week"), obj.position);
}
if(BI.isNotNull(obj.day) && obj.day !== 0) {
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"));
endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText("BI-Basic_Month"), obj.position) : "";
}
if(BI.isNotNull(obj.workDay) && obj.workDay !== 0) {
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 + endText;

18
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -23,9 +23,9 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
var date = v.match(/\d+/g);
self._autoAppend(v, date);
return self._dateCheck(v) && BI.checkDateLegal(v) && self._checkVoid({
year: date[0],
month: date[1],
day: date[2]
year: date[0] | 0,
month: date[1] | 0,
day: date[2] | 0
});
},
quitChecker: function () {
@ -147,22 +147,22 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
_getText: function (obj) {
var value = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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);
}
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) {
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);
}
if(BI.isNotNull(obj.month) && obj.month !== 0) {
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.week) && obj.week !== 0) {
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);
}
if(BI.isNotNull(obj.day) && obj.day !== 0) {
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.workDay) && obj.workDay !== 0) {
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;

2
src/widget/year/trigger.year.js

@ -93,7 +93,7 @@ BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
_getText: function (obj) {
var value = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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"));
}
return value;

4
src/widget/yearmonth/trigger.yearmonth.js

@ -147,10 +147,10 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
_getText: function (obj) {
var value = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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"));
}
if(BI.isNotNull(obj.month) && obj.month !== 0) {
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"));
}
return value;

4
src/widget/yearquarter/trigger.yearquarter.js

@ -145,10 +145,10 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
_getText: function (obj) {
var value = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) {
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"));
}
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) {
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"));
}
return value;

Loading…
Cancel
Save