Browse Source

BI-17580 交互

es6
windy 7 years ago
parent
commit
02f29808d7
  1. 5
      demo/version.js
  2. 92
      dist/bundle.js
  3. 69
      dist/case.js
  4. 5
      dist/config.js
  5. 18
      dist/widget.js
  6. 5
      public/js/index.js
  7. 1
      src/case/richeditor/bar/texttoolbar.js
  8. 67
      src/case/richeditor/plugins/combo.fontfamily.js
  9. 18
      src/widget/dynamicdate/dynamicdate.trigger.js
  10. 5
      ui/js/index.js

5
demo/version.js

@ -155,5 +155,8 @@ BI.i18n = {
"BI-Conf_Formula_And": "且公式条件", "BI-Conf_Formula_And": "且公式条件",
"BI-Conf_Formula_Or": "或公式条件", "BI-Conf_Formula_Or": "或公式条件",
"BI-Conf_Condition_And": "且条件", "BI-Conf_Condition_And": "且条件",
"BI-Conf_Condition_Or": "或条件" "BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体"
}; };

92
dist/bundle.js vendored

@ -82177,6 +82177,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor-text-toolbar bi-background", baseCls: "bi-rich-editor-text-toolbar bi-background",
buttons: [ buttons: [
{type: "bi.rich_editor_font_chooser"},
{type: "bi.rich_editor_size_chooser"}, {type: "bi.rich_editor_size_chooser"},
{type: "bi.rich_editor_bold_button"}, {type: "bi.rich_editor_bold_button"},
{type: "bi.rich_editor_italic_button"}, {type: "bi.rich_editor_italic_button"},
@ -82993,7 +82994,73 @@ BI.RichEditorColorChooser = BI.inherit(BI.RichEditorAction, {
this.colorchooser.setValue(""); this.colorchooser.setValue("");
} }
}); });
BI.shortcut("bi.rich_editor_color_chooser", BI.RichEditorColorChooser);/** BI.shortcut("bi.rich_editor_color_chooser", BI.RichEditorColorChooser);BI.RichEditorFontChooser = BI.inherit(BI.RichEditorAction, {
_defaultConfig: function () {
return BI.extend(BI.RichEditorFontChooser.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor-font-chooser bi-border bi-card",
command: "FontName",
width: 50,
height: 20
});
},
_init: function () {
BI.RichEditorSizeChooser.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.trigger = BI.createWidget({
type: "bi.text_trigger",
readonly: true,
height: o.height,
triggerWidth: 16,
text: BI.i18nText("BI-Font_Family")
});
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
el: this.trigger,
adjustLength: 1,
popup: {
maxWidth: 70,
minWidth: 70,
el: {
type: "bi.button_group",
items: BI.createItems([{
value: "Microsoft YaHei",
text: BI.i18nText("BI-Microsoft_YaHei")
}, {
value: "PingFangSC-Light !important",
text: BI.i18nText("BI-Apple_Light")
}, {
value: "arial",
text: "Arial"
}, {
value: "Verdana",
text: "Verdana"
}], {
type: "bi.single_select_item"
}),
layouts: [{
type: "bi.vertical"
}]
}
}
});
this.combo.on(BI.Combo.EVENT_CHANGE, function () {
var val = this.getValue()[0];
self.doCommand(val);
this.hideView();
this.setValue([]);
});
},
hideIf: function (e) {
if(!this.combo.element.find(e.target).length > 0) {
this.combo.hideView();
}
}
});
BI.shortcut("bi.rich_editor_font_chooser", BI.RichEditorFontChooser);/**
* 字体大小选择 * 字体大小选择
* *
* Created by GUY on 2015/11/26. * Created by GUY on 2015/11/26.
@ -90721,25 +90788,31 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
_getText: function (obj) { _getText: function (obj) {
var value = ""; var value = "";
var endText = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) { 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); 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) && 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); 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) && 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); 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) && 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); 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) && 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) : ""; 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) && 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")); 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) { function getPositionText (baseText, position) {
switch (position) { switch (position) {
@ -111792,5 +111865,8 @@ BI.i18n = {
"BI-Conf_Formula_And": "且公式条件", "BI-Conf_Formula_And": "且公式条件",
"BI-Conf_Formula_Or": "或公式条件", "BI-Conf_Formula_Or": "或公式条件",
"BI-Conf_Condition_And": "且条件", "BI-Conf_Condition_And": "且条件",
"BI-Conf_Condition_Or": "或条件" "BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体"
}; };

69
dist/case.js vendored

@ -10241,6 +10241,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor-text-toolbar bi-background", baseCls: "bi-rich-editor-text-toolbar bi-background",
buttons: [ buttons: [
{type: "bi.rich_editor_font_chooser"},
{type: "bi.rich_editor_size_chooser"}, {type: "bi.rich_editor_size_chooser"},
{type: "bi.rich_editor_bold_button"}, {type: "bi.rich_editor_bold_button"},
{type: "bi.rich_editor_italic_button"}, {type: "bi.rich_editor_italic_button"},
@ -11057,7 +11058,73 @@ BI.RichEditorColorChooser = BI.inherit(BI.RichEditorAction, {
this.colorchooser.setValue(""); this.colorchooser.setValue("");
} }
}); });
BI.shortcut("bi.rich_editor_color_chooser", BI.RichEditorColorChooser);/** BI.shortcut("bi.rich_editor_color_chooser", BI.RichEditorColorChooser);BI.RichEditorFontChooser = BI.inherit(BI.RichEditorAction, {
_defaultConfig: function () {
return BI.extend(BI.RichEditorFontChooser.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor-font-chooser bi-border bi-card",
command: "FontName",
width: 50,
height: 20
});
},
_init: function () {
BI.RichEditorSizeChooser.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.trigger = BI.createWidget({
type: "bi.text_trigger",
readonly: true,
height: o.height,
triggerWidth: 16,
text: BI.i18nText("BI-Font_Family")
});
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
el: this.trigger,
adjustLength: 1,
popup: {
maxWidth: 70,
minWidth: 70,
el: {
type: "bi.button_group",
items: BI.createItems([{
value: "Microsoft YaHei",
text: BI.i18nText("BI-Microsoft_YaHei")
}, {
value: "PingFangSC-Light !important",
text: BI.i18nText("BI-Apple_Light")
}, {
value: "arial",
text: "Arial"
}, {
value: "Verdana",
text: "Verdana"
}], {
type: "bi.single_select_item"
}),
layouts: [{
type: "bi.vertical"
}]
}
}
});
this.combo.on(BI.Combo.EVENT_CHANGE, function () {
var val = this.getValue()[0];
self.doCommand(val);
this.hideView();
this.setValue([]);
});
},
hideIf: function (e) {
if(!this.combo.element.find(e.target).length > 0) {
this.combo.hideView();
}
}
});
BI.shortcut("bi.rich_editor_font_chooser", BI.RichEditorFontChooser);/**
* 字体大小选择 * 字体大小选择
* *
* Created by GUY on 2015/11/26. * Created by GUY on 2015/11/26.

5
dist/config.js vendored

@ -155,5 +155,8 @@ BI.i18n = {
"BI-Conf_Formula_And": "且公式条件", "BI-Conf_Formula_And": "且公式条件",
"BI-Conf_Formula_Or": "或公式条件", "BI-Conf_Formula_Or": "或公式条件",
"BI-Conf_Condition_And": "且条件", "BI-Conf_Condition_And": "且条件",
"BI-Conf_Condition_Or": "或条件" "BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体"
}; };

18
dist/widget.js vendored

@ -4159,25 +4159,31 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
_getText: function (obj) { _getText: function (obj) {
var value = ""; var value = "";
var endText = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) { 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); 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) && 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); 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) && 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); 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) && 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); 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) && 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) : ""; 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) && 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")); 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) { function getPositionText (baseText, position) {
switch (position) { switch (position) {

5
public/js/index.js

@ -155,5 +155,8 @@ BI.i18n = {
"BI-Conf_Formula_And": "且公式条件", "BI-Conf_Formula_And": "且公式条件",
"BI-Conf_Formula_Or": "或公式条件", "BI-Conf_Formula_Or": "或公式条件",
"BI-Conf_Condition_And": "且条件", "BI-Conf_Condition_And": "且条件",
"BI-Conf_Condition_Or": "或条件" "BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体"
}; };

1
src/case/richeditor/bar/texttoolbar.js

@ -10,6 +10,7 @@ BI.RichEditorTextToolbar = BI.inherit(BI.Widget, {
return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.RichEditorTextToolbar.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor-text-toolbar bi-background", baseCls: "bi-rich-editor-text-toolbar bi-background",
buttons: [ buttons: [
{type: "bi.rich_editor_font_chooser"},
{type: "bi.rich_editor_size_chooser"}, {type: "bi.rich_editor_size_chooser"},
{type: "bi.rich_editor_bold_button"}, {type: "bi.rich_editor_bold_button"},
{type: "bi.rich_editor_italic_button"}, {type: "bi.rich_editor_italic_button"},

67
src/case/richeditor/plugins/combo.fontfamily.js

@ -0,0 +1,67 @@
BI.RichEditorFontChooser = BI.inherit(BI.RichEditorAction, {
_defaultConfig: function () {
return BI.extend(BI.RichEditorFontChooser.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-rich-editor-font-chooser bi-border bi-card",
command: "FontName",
width: 50,
height: 20
});
},
_init: function () {
BI.RichEditorSizeChooser.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.trigger = BI.createWidget({
type: "bi.text_trigger",
readonly: true,
height: o.height,
triggerWidth: 16,
text: BI.i18nText("BI-Font_Family")
});
this.combo = BI.createWidget({
type: "bi.combo",
element: this,
el: this.trigger,
adjustLength: 1,
popup: {
maxWidth: 70,
minWidth: 70,
el: {
type: "bi.button_group",
items: BI.createItems([{
value: "Microsoft YaHei",
text: BI.i18nText("BI-Microsoft_YaHei")
}, {
value: "PingFangSC-Light !important",
text: BI.i18nText("BI-Apple_Light")
}, {
value: "arial",
text: "Arial"
}, {
value: "Verdana",
text: "Verdana"
}], {
type: "bi.single_select_item"
}),
layouts: [{
type: "bi.vertical"
}]
}
}
});
this.combo.on(BI.Combo.EVENT_CHANGE, function () {
var val = this.getValue()[0];
self.doCommand(val);
this.hideView();
this.setValue([]);
});
},
hideIf: function (e) {
if(!this.combo.element.find(e.target).length > 0) {
this.combo.hideView();
}
}
});
BI.shortcut("bi.rich_editor_font_chooser", BI.RichEditorFontChooser);

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

@ -144,25 +144,31 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
_getText: function (obj) { _getText: function (obj) {
var value = ""; var value = "";
var endText = "";
if(BI.isNotNull(obj.year) && obj.year !== 0) { 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); 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) && 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); 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) && 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); 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) && 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); 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) && 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) : ""; 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) && 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")); 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) { function getPositionText (baseText, position) {
switch (position) { switch (position) {

5
ui/js/index.js

@ -155,5 +155,8 @@ BI.i18n = {
"BI-Conf_Formula_And": "且公式条件", "BI-Conf_Formula_And": "且公式条件",
"BI-Conf_Formula_Or": "或公式条件", "BI-Conf_Formula_Or": "或公式条件",
"BI-Conf_Condition_And": "且条件", "BI-Conf_Condition_And": "且条件",
"BI-Conf_Condition_Or": "或条件" "BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体"
}; };
Loading…
Cancel
Save