diff --git a/dist/bundle.css b/dist/bundle.css
index 4e7332708..73ed85675 100644
--- a/dist/bundle.css
+++ b/dist/bundle.css
@@ -6039,24 +6039,24 @@ textarea::-webkit-scrollbar-thumb:hover {
color: inherit;
}
.trigger-triangle-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.trigger-triangle-font .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.trigger-triangle-font:hover .b-font:before,
.trigger-triangle-font.hover .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.trigger-triangle-font:active .b-font:before,
.trigger-triangle-font.active .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #3685f2;
}
.trigger-triangle-font.disabled .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.pull-down-font .b-font {
@@ -6167,45 +6167,45 @@ textarea::-webkit-scrollbar-thumb:hover {
color: #faaa39;
}
.less-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-font .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-font:hover .b-font:before,
.less-font.hover .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-font:active .b-font:before,
.less-font.active .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: #3f8ce8;
}
.less-font.disabled .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-equal-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-equal-font .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.less-equal-font:hover .b-font:before,
.less-equal-font.hover .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.less-equal-font:active .b-font:before,
.less-equal-font.active .b-font:before {
- content: "\e760";
+ content: "\e761";
color: #3f8ce8;
}
.less-equal-font.disabled .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.text-bold-font .b-font {
diff --git a/dist/bundle.js b/dist/bundle.js
index 2211b6aee..1c2e82dec 100644
--- a/dist/bundle.js
+++ b/dist/bundle.js
@@ -77737,8 +77737,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
adjustXOffset: 0,
adjustYOffset: 0,
offsetStyle: "left",
- chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
- isShowDown: true
+ chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE
});
},
@@ -77754,8 +77753,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight,
- value: o.value,
- isShowDown: o.isShowDown
+ value: o.value
});
this.popup = BI.createWidget(o.popup, {
type: "bi.icon_combo_popup",
@@ -77921,7 +77919,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
disableSelected: true,
cls: "icon-combo-down-icon trigger-triangle-font",
width: 12,
- height: o.height,
+ height: 8,
selected: BI.isNotEmptyString(iconCls)
});
this.down.setVisible(o.isShowDown);
@@ -90926,7 +90924,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
break;
case this._const.yearMonthLength:
case this._const.yearFullMonthLength:
- if (this._monthCheck(v)) {
+ var splitMonth = v.split("-")[1];
+ if ((BI.isNotNull(splitMonth) && splitMonth.length === 2) || this._monthCheck(v)) {
this.editor.setValue(v + "-");
}
break;
@@ -91865,7 +91864,9 @@ BI.extend(BI.DynamicDateTimeSelect, {
}
break;
case this._const.yearMonthLength:
- if (this._monthCheck(v)) {
+ case this._const.yearFullMonthLength:
+ var splitMonth = v.split("-")[1];
+ if ((BI.isNotNull(splitMonth) && splitMonth.length === 2) || this._monthCheck(v)) {
this.editor.setValue(v + "-");
}
break;
@@ -100589,7 +100590,6 @@ BI.NumberInterval = BI.inherit(BI.Single, {
type: "bi.icon_combo",
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
- isShowDown: false,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconCls: "less-font",
@@ -100608,7 +100608,6 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "number-interval-big-combo bi-border",
- isShowDown: false,
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
@@ -103643,19 +103642,9 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
self.storeValue = this.getValue();
self._adjust(function () {
assertShowValue();
+ self._defaultState();
});
}
- }, {
- eventName: BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,
- action: function () {
- self._defaultState();
- }
- }, {
- eventName: BI.SingleSelectPopupView.EVENT_CLICK_CLEAR,
- action: function () {
- self.setValue();
- self._defaultState();
- }
}],
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
@@ -104193,13 +104182,12 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
});
this.popupView = BI.createWidget({
- type: "bi.multi_popup_view",
+ type: "bi.popup_view",
stopPropagation: false,
maxWidth: opts.maxWidth,
minWidth: opts.minWidth,
maxHeight: opts.maxHeight,
element: this,
- buttons: [BI.i18nText("BI-Basic_Clears"), BI.i18nText("BI-Basic_Sure")],
el: this.loader,
value: opts.value
});
@@ -104207,16 +104195,6 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {
self.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE);
});
- this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {
- switch (index) {
- case 0:
- self.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CLEAR);
- break;
- case 1:
- self.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM);
- break;
- }
- });
},
setStartValue: function (v) {
@@ -104245,8 +104223,6 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
});
BI.SingleSelectPopupView.EVENT_CHANGE = "EVENT_CHANGE";
-BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM = "EVENT_CLICK_CONFIRM";
-BI.SingleSelectPopupView.EVENT_CLICK_CLEAR = "EVENT_CLICK_CLEAR";
BI.shortcut("bi.single_select_popup_view", BI.SingleSelectPopupView);/**
@@ -105177,13 +105153,13 @@ BI.SingleSelectSearchPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_search_add_pane", BI.SingleSelectSearchPane);/**
*
- * @class BI.SingleSelectCombo
+ * @class BI.SingleSelectInsertCombo
* @extends BI.Single
*/
-BI.SingleSelectCombo = BI.inherit(BI.Single, {
+BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
_defaultConfig: function () {
- return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {
+ return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
@@ -105192,7 +105168,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
},
_init: function () {
- BI.SingleSelectCombo.superclass._init.apply(this, arguments);
+ BI.SingleSelectInsertCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var assertShowValue = function () {
@@ -105294,19 +105270,9 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
self.storeValue = this.getValue();
self._adjust(function () {
assertShowValue();
+ self._defaultState();
});
}
- }, {
- eventName: BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,
- action: function () {
- self._defaultState();
- }
- }, {
- eventName: BI.SingleSelectPopupView.EVENT_CLICK_CLEAR,
- action: function () {
- self.setValue();
- self._defaultState();
- }
}],
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
@@ -105337,7 +105303,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
if (self.requesting === true) {
self.wants2Quit = true;
} else {
- self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM);
+ self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM);
}
});
@@ -105390,7 +105356,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
this._assertValue(this.storeValue);
this.requesting = true;
o.itemsCreator({
- type: BI.SingleSelectCombo.REQ_GET_ALL_DATA,
+ type: BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
@@ -105413,7 +105379,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
this._assertValue(res);
this.requesting = true;
o.itemsCreator({
- type: BI.SingleSelectCombo.REQ_GET_ALL_DATA,
+ type: BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
}, function (ob) {
var items = BI.map(ob.items, "value");
@@ -105450,7 +105416,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
if (!this._count) {
o.itemsCreator({
- type: BI.SingleSelectCombo.REQ_GET_DATA_LENGTH
+ type: BI.SingleSelectInsertCombo.REQ_GET_DATA_LENGTH
}, function (res) {
self._count = res.count;
adjust();
@@ -105464,7 +105430,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
function adjust () {
if (self.wants2Quit === true) {
- self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM);
+ self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM);
self.wants2Quit = false;
}
self.requesting = false;
@@ -105518,14 +105484,14 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
}
});
-BI.extend(BI.SingleSelectCombo, {
+BI.extend(BI.SingleSelectInsertCombo, {
REQ_GET_DATA_LENGTH: 0,
REQ_GET_ALL_DATA: -1
});
-BI.SingleSelectCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
+BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
-BI.shortcut("bi.single_select_add_combo", BI.SingleSelectCombo);/**
+BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/**
*
* 单选下拉框
* @class BI.SingleSelectTrigger
@@ -108196,8 +108162,8 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
vgap: c.vgap,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
- errorText: function (v) {
- return !BI.isPositiveInteger(v) ? BI.i18nText("BI-Please_Input_Positive_Integer") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
+ errorText: function () {
+ return BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
});
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
@@ -108484,9 +108450,9 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
obj = obj || {};
obj.year = obj.year || 0;
obj.month = obj.month || 0;
- if (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();
- this.selectedYear = "";
+ this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue();
@@ -108520,6 +108486,9 @@ BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);BI.DynamicYearM
max: o.max,
value: o.value || ""
});
+ this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN, function () {
+ self.combo.isViewVisible() && self.combo.hideView();
+ });
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START, function () {
self.combo.isViewVisible() && self.combo.hideView();
});
@@ -108831,7 +108800,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
switch (v) {
case BI.DynamicYearCombo.Static:
var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());
- self.year.setValue({year: date.getFullYear(), month: date.getMonth()});
+ self.year.setValue({year: date.getFullYear(), month: date.getMonth() + 1});
self._setInnerValue();
break;
case BI.DynamicYearCombo.Dynamic:
@@ -108957,12 +108926,15 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
},
watermark: BI.i18nText("BI-Basic_Unrestricted"),
errorText: function (v) {
- return !BI.isPositiveInteger(v) ? BI.i18nText("BI-Please_Input_Positive_Integer") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
+ return BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true
});
+ editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
+ self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN);
+ });
editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS);
});
@@ -108974,16 +108946,14 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
if (BI.isNotNull(value)) {
editor.setValue(value);
}
- if (BI.isNotEmptyString(value)) {
- var monthValue = self.monthEditor.getValue();
- self.storeValue = {
- type: BI.DynamicDateCombo.Static,
- value: {
- year: self.yearEditor.getValue(),
- month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
- }
- };
- }
+ var monthValue = self.monthEditor.getValue();
+ self.storeValue = {
+ type: BI.DynamicDateCombo.Static,
+ value: {
+ year: self.yearEditor.getValue(),
+ month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
+ }
+ };
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
@@ -109050,8 +109020,8 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
_getStaticTitle: function (value) {
value = value || {};
- var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year + "-";
- var monthStr = (BI.isNull(value.month) || BI.isEmptyString(value.month)) ? "" : value.month;
+ var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year;
+ var monthStr = (BI.isNull(value.month) || BI.isEmptyString(value.month)) ? "" : "-" + value.month;
return yearStr + monthStr;
},
@@ -109100,6 +109070,7 @@ BI.DynamicYearMonthTrigger.EVENT_ERROR = "EVENT_ERROR";
BI.DynamicYearMonthTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearMonthTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearMonthTrigger.EVENT_STOP = "EVENT_STOP";
+BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.YearMonthInterval = BI.inherit(BI.Single, {
constants: {
height: 26,
@@ -109454,9 +109425,9 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
obj = obj || {};
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 0;
- if (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();
- this.selectedYear = "";
+ this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue();
@@ -109490,6 +109461,9 @@ BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicY
max: o.max,
value: o.value || ""
});
+ this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN, function () {
+ self.combo.isViewVisible() && self.combo.hideView();
+ });
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START, function () {
self.combo.isViewVisible() && self.combo.hideView();
});
@@ -109900,13 +109874,16 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
return false;
},
errorText: function (v) {
- return !BI.isPositiveInteger(v) ? BI.i18nText("BI-Please_Input_Positive_Integer") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
+ return BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
watermark: BI.i18nText("BI-Basic_Unrestricted"),
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true
});
+ editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
+ self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN);
+ });
editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS);
});
@@ -109918,16 +109895,14 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
if (BI.isNotNull(value)) {
editor.setValue(value);
}
- if (BI.isNotEmptyString(value)) {
- var quarterValue = self.quarterEditor.getValue();
- self.storeValue = {
- type: BI.DynamicYearQuarterCombo.Static,
- value: {
- year: self.yearEditor.getValue(),
- quarter: BI.isEmptyString(self.quarterEditor.getValue()) ? "" : quarterValue
- }
- };
- }
+ var quarterValue = self.quarterEditor.getValue();
+ self.storeValue = {
+ type: BI.DynamicYearQuarterCombo.Static,
+ value: {
+ year: self.yearEditor.getValue(),
+ quarter: BI.isEmptyString(self.quarterEditor.getValue()) ? "" : quarterValue
+ }
+ };
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);
@@ -109967,8 +109942,8 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
_getStaticTitle: function (value) {
value = value || {};
- var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year + "-";
- var quarterStr = (BI.isNull(value.quarter) || BI.isEmptyString(value.quarter)) ? "" : value.quarter;
+ var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year;
+ var quarterStr = (BI.isNull(value.quarter) || BI.isEmptyString(value.quarter)) ? "" : "-" + value.quarter;
return yearStr + quarterStr;
},
@@ -110026,6 +110001,7 @@ BI.DynamicYearQuarterTrigger.EVENT_ERROR = "EVENT_ERROR";
BI.DynamicYearQuarterTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearQuarterTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearQuarterTrigger.EVENT_STOP = "EVENT_STOP";
+BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.shortcut("bi.dynamic_year_quarter_trigger", BI.DynamicYearQuarterTrigger);/**
* 简单的复选下拉框控件, 适用于数据量少的情况, 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值
* 封装了字段处理逻辑
diff --git a/dist/case.js b/dist/case.js
index 95a2045be..5ad316c71 100644
--- a/dist/case.js
+++ b/dist/case.js
@@ -5288,8 +5288,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
adjustXOffset: 0,
adjustYOffset: 0,
offsetStyle: "left",
- chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
- isShowDown: true
+ chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE
});
},
@@ -5305,8 +5304,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight,
- value: o.value,
- isShowDown: o.isShowDown
+ value: o.value
});
this.popup = BI.createWidget(o.popup, {
type: "bi.icon_combo_popup",
@@ -5472,7 +5470,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
disableSelected: true,
cls: "icon-combo-down-icon trigger-triangle-font",
width: 12,
- height: o.height,
+ height: 8,
selected: BI.isNotEmptyString(iconCls)
});
this.down.setVisible(o.isShowDown);
diff --git a/dist/fineui.css b/dist/fineui.css
index a8fec7156..803e44c43 100644
--- a/dist/fineui.css
+++ b/dist/fineui.css
@@ -6039,24 +6039,24 @@ textarea::-webkit-scrollbar-thumb:hover {
color: inherit;
}
.trigger-triangle-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.trigger-triangle-font .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.trigger-triangle-font:hover .b-font:before,
.trigger-triangle-font.hover .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.trigger-triangle-font:active .b-font:before,
.trigger-triangle-font.active .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #3685f2;
}
.trigger-triangle-font.disabled .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.pull-down-font .b-font {
@@ -6167,45 +6167,45 @@ textarea::-webkit-scrollbar-thumb:hover {
color: #faaa39;
}
.less-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-font .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-font:hover .b-font:before,
.less-font.hover .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-font:active .b-font:before,
.less-font.active .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: #3f8ce8;
}
.less-font.disabled .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-equal-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-equal-font .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.less-equal-font:hover .b-font:before,
.less-equal-font.hover .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.less-equal-font:active .b-font:before,
.less-equal-font.active .b-font:before {
- content: "\e760";
+ content: "\e761";
color: #3f8ce8;
}
.less-equal-font.disabled .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.text-bold-font .b-font {
diff --git a/dist/font/iconfont.eot b/dist/font/iconfont.eot
index 4b831c55d..94a8128aa 100644
Binary files a/dist/font/iconfont.eot and b/dist/font/iconfont.eot differ
diff --git a/dist/font/iconfont.svg b/dist/font/iconfont.svg
index cde692e9a..438e4ab5c 100644
--- a/dist/font/iconfont.svg
+++ b/dist/font/iconfont.svg
@@ -522,7 +522,7 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-
-
+
@@ -531,7 +531,7 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-
-
+
@@ -543,7 +543,7 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-
-
+
@@ -837,7 +837,7 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-
-
+
@@ -924,6 +924,39 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dist/font/iconfont.ttf b/dist/font/iconfont.ttf
index b3f057a3a..fc77b954e 100644
Binary files a/dist/font/iconfont.ttf and b/dist/font/iconfont.ttf differ
diff --git a/dist/font/iconfont.woff b/dist/font/iconfont.woff
index 4610f45f1..2678e8c69 100644
Binary files a/dist/font/iconfont.woff and b/dist/font/iconfont.woff differ
diff --git a/dist/resource.css b/dist/resource.css
index b29298149..765b5eda7 100644
--- a/dist/resource.css
+++ b/dist/resource.css
@@ -820,24 +820,24 @@ textarea::-webkit-scrollbar-thumb:hover {
color: inherit;
}
.trigger-triangle-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.trigger-triangle-font .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.trigger-triangle-font:hover .b-font:before,
.trigger-triangle-font.hover .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.trigger-triangle-font:active .b-font:before,
.trigger-triangle-font.active .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #3685f2;
}
.trigger-triangle-font.disabled .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.pull-down-font .b-font {
@@ -948,45 +948,45 @@ textarea::-webkit-scrollbar-thumb:hover {
color: #faaa39;
}
.less-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-font .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-font:hover .b-font:before,
.less-font.hover .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-font:active .b-font:before,
.less-font.active .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: #3f8ce8;
}
.less-font.disabled .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-equal-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-equal-font .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.less-equal-font:hover .b-font:before,
.less-equal-font.hover .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.less-equal-font:active .b-font:before,
.less-equal-font.active .b-font:before {
- content: "\e760";
+ content: "\e761";
color: #3f8ce8;
}
.less-equal-font.disabled .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.text-bold-font .b-font {
diff --git a/dist/widget.js b/dist/widget.js
index 1c4292c72..4796f32a4 100644
--- a/dist/widget.js
+++ b/dist/widget.js
@@ -3772,7 +3772,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
break;
case this._const.yearMonthLength:
case this._const.yearFullMonthLength:
- if (this._monthCheck(v)) {
+ var splitMonth = v.split("-")[1];
+ if ((BI.isNotNull(splitMonth) && splitMonth.length === 2) || this._monthCheck(v)) {
this.editor.setValue(v + "-");
}
break;
@@ -4711,7 +4712,9 @@ BI.extend(BI.DynamicDateTimeSelect, {
}
break;
case this._const.yearMonthLength:
- if (this._monthCheck(v)) {
+ case this._const.yearFullMonthLength:
+ var splitMonth = v.split("-")[1];
+ if ((BI.isNotNull(splitMonth) && splitMonth.length === 2) || this._monthCheck(v)) {
this.editor.setValue(v + "-");
}
break;
@@ -13435,7 +13438,6 @@ BI.NumberInterval = BI.inherit(BI.Single, {
type: "bi.icon_combo",
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
- isShowDown: false,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconCls: "less-font",
@@ -13454,7 +13456,6 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "number-interval-big-combo bi-border",
- isShowDown: false,
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
@@ -16489,19 +16490,9 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
self.storeValue = this.getValue();
self._adjust(function () {
assertShowValue();
+ self._defaultState();
});
}
- }, {
- eventName: BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,
- action: function () {
- self._defaultState();
- }
- }, {
- eventName: BI.SingleSelectPopupView.EVENT_CLICK_CLEAR,
- action: function () {
- self.setValue();
- self._defaultState();
- }
}],
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
@@ -17039,13 +17030,12 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
});
this.popupView = BI.createWidget({
- type: "bi.multi_popup_view",
+ type: "bi.popup_view",
stopPropagation: false,
maxWidth: opts.maxWidth,
minWidth: opts.minWidth,
maxHeight: opts.maxHeight,
element: this,
- buttons: [BI.i18nText("BI-Basic_Clears"), BI.i18nText("BI-Basic_Sure")],
el: this.loader,
value: opts.value
});
@@ -17053,16 +17043,6 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {
self.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE);
});
- this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {
- switch (index) {
- case 0:
- self.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CLEAR);
- break;
- case 1:
- self.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM);
- break;
- }
- });
},
setStartValue: function (v) {
@@ -17091,8 +17071,6 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
});
BI.SingleSelectPopupView.EVENT_CHANGE = "EVENT_CHANGE";
-BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM = "EVENT_CLICK_CONFIRM";
-BI.SingleSelectPopupView.EVENT_CLICK_CLEAR = "EVENT_CLICK_CLEAR";
BI.shortcut("bi.single_select_popup_view", BI.SingleSelectPopupView);/**
@@ -18023,13 +18001,13 @@ BI.SingleSelectSearchPane.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.single_select_search_add_pane", BI.SingleSelectSearchPane);/**
*
- * @class BI.SingleSelectCombo
+ * @class BI.SingleSelectInsertCombo
* @extends BI.Single
*/
-BI.SingleSelectCombo = BI.inherit(BI.Single, {
+BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
_defaultConfig: function () {
- return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {
+ return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
@@ -18038,7 +18016,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
},
_init: function () {
- BI.SingleSelectCombo.superclass._init.apply(this, arguments);
+ BI.SingleSelectInsertCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var assertShowValue = function () {
@@ -18140,19 +18118,9 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
self.storeValue = this.getValue();
self._adjust(function () {
assertShowValue();
+ self._defaultState();
});
}
- }, {
- eventName: BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,
- action: function () {
- self._defaultState();
- }
- }, {
- eventName: BI.SingleSelectPopupView.EVENT_CLICK_CLEAR,
- action: function () {
- self.setValue();
- self._defaultState();
- }
}],
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
@@ -18183,7 +18151,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
if (self.requesting === true) {
self.wants2Quit = true;
} else {
- self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM);
+ self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM);
}
});
@@ -18236,7 +18204,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
this._assertValue(this.storeValue);
this.requesting = true;
o.itemsCreator({
- type: BI.SingleSelectCombo.REQ_GET_ALL_DATA,
+ type: BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
@@ -18259,7 +18227,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
this._assertValue(res);
this.requesting = true;
o.itemsCreator({
- type: BI.SingleSelectCombo.REQ_GET_ALL_DATA,
+ type: BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
}, function (ob) {
var items = BI.map(ob.items, "value");
@@ -18296,7 +18264,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
if (!this._count) {
o.itemsCreator({
- type: BI.SingleSelectCombo.REQ_GET_DATA_LENGTH
+ type: BI.SingleSelectInsertCombo.REQ_GET_DATA_LENGTH
}, function (res) {
self._count = res.count;
adjust();
@@ -18310,7 +18278,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
function adjust () {
if (self.wants2Quit === true) {
- self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM);
+ self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM);
self.wants2Quit = false;
}
self.requesting = false;
@@ -18364,14 +18332,14 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
}
});
-BI.extend(BI.SingleSelectCombo, {
+BI.extend(BI.SingleSelectInsertCombo, {
REQ_GET_DATA_LENGTH: 0,
REQ_GET_ALL_DATA: -1
});
-BI.SingleSelectCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
+BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
-BI.shortcut("bi.single_select_add_combo", BI.SingleSelectCombo);/**
+BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/**
*
* 单选下拉框
* @class BI.SingleSelectTrigger
@@ -21042,8 +21010,8 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
vgap: c.vgap,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
- errorText: function (v) {
- return !BI.isPositiveInteger(v) ? BI.i18nText("BI-Please_Input_Positive_Integer") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
+ errorText: function () {
+ return BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
});
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
@@ -21330,9 +21298,9 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
obj = obj || {};
obj.year = obj.year || 0;
obj.month = obj.month || 0;
- if (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();
- this.selectedYear = "";
+ this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue();
@@ -21366,6 +21334,9 @@ BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);BI.DynamicYearM
max: o.max,
value: o.value || ""
});
+ this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN, function () {
+ self.combo.isViewVisible() && self.combo.hideView();
+ });
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START, function () {
self.combo.isViewVisible() && self.combo.hideView();
});
@@ -21677,7 +21648,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
switch (v) {
case BI.DynamicYearCombo.Static:
var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());
- self.year.setValue({year: date.getFullYear(), month: date.getMonth()});
+ self.year.setValue({year: date.getFullYear(), month: date.getMonth() + 1});
self._setInnerValue();
break;
case BI.DynamicYearCombo.Dynamic:
@@ -21803,12 +21774,15 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
},
watermark: BI.i18nText("BI-Basic_Unrestricted"),
errorText: function (v) {
- return !BI.isPositiveInteger(v) ? BI.i18nText("BI-Please_Input_Positive_Integer") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
+ return BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true
});
+ editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
+ self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN);
+ });
editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS);
});
@@ -21820,16 +21794,14 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
if (BI.isNotNull(value)) {
editor.setValue(value);
}
- if (BI.isNotEmptyString(value)) {
- var monthValue = self.monthEditor.getValue();
- self.storeValue = {
- type: BI.DynamicDateCombo.Static,
- value: {
- year: self.yearEditor.getValue(),
- month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
- }
- };
- }
+ var monthValue = self.monthEditor.getValue();
+ self.storeValue = {
+ type: BI.DynamicDateCombo.Static,
+ value: {
+ year: self.yearEditor.getValue(),
+ month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
+ }
+ };
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
@@ -21896,8 +21868,8 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
_getStaticTitle: function (value) {
value = value || {};
- var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year + "-";
- var monthStr = (BI.isNull(value.month) || BI.isEmptyString(value.month)) ? "" : value.month;
+ var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year;
+ var monthStr = (BI.isNull(value.month) || BI.isEmptyString(value.month)) ? "" : "-" + value.month;
return yearStr + monthStr;
},
@@ -21946,6 +21918,7 @@ BI.DynamicYearMonthTrigger.EVENT_ERROR = "EVENT_ERROR";
BI.DynamicYearMonthTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearMonthTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearMonthTrigger.EVENT_STOP = "EVENT_STOP";
+BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.YearMonthInterval = BI.inherit(BI.Single, {
constants: {
height: 26,
@@ -22300,9 +22273,9 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
obj = obj || {};
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 0;
- if (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();
- this.selectedYear = "";
+ this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue();
@@ -22336,6 +22309,9 @@ BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicY
max: o.max,
value: o.value || ""
});
+ this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN, function () {
+ self.combo.isViewVisible() && self.combo.hideView();
+ });
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START, function () {
self.combo.isViewVisible() && self.combo.hideView();
});
@@ -22746,13 +22722,16 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
return false;
},
errorText: function (v) {
- return !BI.isPositiveInteger(v) ? BI.i18nText("BI-Please_Input_Positive_Integer") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
+ return BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
watermark: BI.i18nText("BI-Basic_Unrestricted"),
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true
});
+ editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
+ self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN);
+ });
editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS);
});
@@ -22764,16 +22743,14 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
if (BI.isNotNull(value)) {
editor.setValue(value);
}
- if (BI.isNotEmptyString(value)) {
- var quarterValue = self.quarterEditor.getValue();
- self.storeValue = {
- type: BI.DynamicYearQuarterCombo.Static,
- value: {
- year: self.yearEditor.getValue(),
- quarter: BI.isEmptyString(self.quarterEditor.getValue()) ? "" : quarterValue
- }
- };
- }
+ var quarterValue = self.quarterEditor.getValue();
+ self.storeValue = {
+ type: BI.DynamicYearQuarterCombo.Static,
+ value: {
+ year: self.yearEditor.getValue(),
+ quarter: BI.isEmptyString(self.quarterEditor.getValue()) ? "" : quarterValue
+ }
+ };
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);
@@ -22813,8 +22790,8 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
_getStaticTitle: function (value) {
value = value || {};
- var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year + "-";
- var quarterStr = (BI.isNull(value.quarter) || BI.isEmptyString(value.quarter)) ? "" : value.quarter;
+ var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year;
+ var quarterStr = (BI.isNull(value.quarter) || BI.isEmptyString(value.quarter)) ? "" : "-" + value.quarter;
return yearStr + quarterStr;
},
@@ -22872,6 +22849,7 @@ BI.DynamicYearQuarterTrigger.EVENT_ERROR = "EVENT_ERROR";
BI.DynamicYearQuarterTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearQuarterTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearQuarterTrigger.EVENT_STOP = "EVENT_STOP";
+BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.shortcut("bi.dynamic_year_quarter_trigger", BI.DynamicYearQuarterTrigger);/**
* 简单的复选下拉框控件, 适用于数据量少的情况, 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值
* 封装了字段处理逻辑
diff --git a/public/css/font.css b/public/css/font.css
index da93ad8cd..8838c6cda 100644
--- a/public/css/font.css
+++ b/public/css/font.css
@@ -499,24 +499,24 @@
color: inherit;
}
.trigger-triangle-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.trigger-triangle-font .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.trigger-triangle-font:hover .b-font:before,
.trigger-triangle-font.hover .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.trigger-triangle-font:active .b-font:before,
.trigger-triangle-font.active .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #3685f2;
}
.trigger-triangle-font.disabled .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.pull-down-font .b-font {
@@ -627,45 +627,45 @@
color: #faaa39;
}
.less-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-font .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-font:hover .b-font:before,
.less-font.hover .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-font:active .b-font:before,
.less-font.active .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: #3f8ce8;
}
.less-font.disabled .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-equal-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-equal-font .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.less-equal-font:hover .b-font:before,
.less-equal-font.hover .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.less-equal-font:active .b-font:before,
.less-equal-font.active .b-font:before {
- content: "\e760";
+ content: "\e761";
color: #3f8ce8;
}
.less-equal-font.disabled .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.text-bold-font .b-font {
diff --git a/src/case/combo/iconcombo/combo.icon.js b/src/case/combo/iconcombo/combo.icon.js
index 040e9e1a8..84185a4f8 100644
--- a/src/case/combo/iconcombo/combo.icon.js
+++ b/src/case/combo/iconcombo/combo.icon.js
@@ -20,8 +20,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
adjustXOffset: 0,
adjustYOffset: 0,
offsetStyle: "left",
- chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
- isShowDown: true
+ chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE
});
},
@@ -37,8 +36,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
height: o.height,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight,
- value: o.value,
- isShowDown: o.isShowDown
+ value: o.value
});
this.popup = BI.createWidget(o.popup, {
type: "bi.icon_combo_popup",
diff --git a/src/case/combo/iconcombo/trigger.iconcombo.js b/src/case/combo/iconcombo/trigger.iconcombo.js
index 3529d1bc0..7d1c4431a 100644
--- a/src/case/combo/iconcombo/trigger.iconcombo.js
+++ b/src/case/combo/iconcombo/trigger.iconcombo.js
@@ -41,7 +41,7 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
disableSelected: true,
cls: "icon-combo-down-icon trigger-triangle-font",
width: 12,
- height: o.height,
+ height: 8,
selected: BI.isNotEmptyString(iconCls)
});
this.down.setVisible(o.isShowDown);
diff --git a/src/css/resource/font.css b/src/css/resource/font.css
index d5d59fcbe..3ab1bb65c 100644
--- a/src/css/resource/font.css
+++ b/src/css/resource/font.css
@@ -499,24 +499,24 @@
color: inherit;
}
.trigger-triangle-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.trigger-triangle-font .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.trigger-triangle-font:hover .b-font:before,
.trigger-triangle-font.hover .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.trigger-triangle-font:active .b-font:before,
.trigger-triangle-font.active .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #3685f2;
}
.trigger-triangle-font.disabled .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.pull-down-font .b-font {
@@ -627,45 +627,45 @@
color: #faaa39;
}
.less-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-font .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-font:hover .b-font:before,
.less-font.hover .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-font:active .b-font:before,
.less-font.active .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: #3f8ce8;
}
.less-font.disabled .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-equal-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-equal-font .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.less-equal-font:hover .b-font:before,
.less-equal-font.hover .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.less-equal-font:active .b-font:before,
.less-equal-font.active .b-font:before {
- content: "\e760";
+ content: "\e761";
color: #3f8ce8;
}
.less-equal-font.disabled .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.text-bold-font .b-font {
diff --git a/src/less/lib/font.less b/src/less/lib/font.less
index e3ae6bf28..bc9236a93 100644
--- a/src/less/lib/font.less
+++ b/src/less/lib/font.less
@@ -18,9 +18,9 @@
@font-arrow-right: "e70c";
@font-change: "e72f";
@font-dot: "e762";
-@font-no-sort-no-filter: "e6f0";
-@font-less: "e75f";
-@font-less-equal: "e760";
+@font-no-sort-no-filter: "e64e";
+@font-less: "e75e";
+@font-less-equal: "e761";
@font-bold: "e75b";
@font-italic: "e75c";
diff --git a/src/widget/dynamicdate/dynamicdate.trigger.js b/src/widget/dynamicdate/dynamicdate.trigger.js
index d14b80caa..733e2a144 100644
--- a/src/widget/dynamicdate/dynamicdate.trigger.js
+++ b/src/widget/dynamicdate/dynamicdate.trigger.js
@@ -119,7 +119,8 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
break;
case this._const.yearMonthLength:
case this._const.yearFullMonthLength:
- if (this._monthCheck(v)) {
+ var splitMonth = v.split("-")[1];
+ if ((BI.isNotNull(splitMonth) && splitMonth.length === 2) || this._monthCheck(v)) {
this.editor.setValue(v + "-");
}
break;
diff --git a/src/widget/dynamicdatetime/dynamicdatetime.trigger.js b/src/widget/dynamicdatetime/dynamicdatetime.trigger.js
index 7f53564a9..fa15aee1c 100644
--- a/src/widget/dynamicdatetime/dynamicdatetime.trigger.js
+++ b/src/widget/dynamicdatetime/dynamicdatetime.trigger.js
@@ -121,7 +121,9 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
}
break;
case this._const.yearMonthLength:
- if (this._monthCheck(v)) {
+ case this._const.yearFullMonthLength:
+ var splitMonth = v.split("-")[1];
+ if ((BI.isNotNull(splitMonth) && splitMonth.length === 2) || this._monthCheck(v)) {
this.editor.setValue(v + "-");
}
break;
diff --git a/src/widget/numberinterval/numberinterval.js b/src/widget/numberinterval/numberinterval.js
index 0f3cfcc13..b7abef11f 100644
--- a/src/widget/numberinterval/numberinterval.js
+++ b/src/widget/numberinterval/numberinterval.js
@@ -123,7 +123,6 @@ BI.NumberInterval = BI.inherit(BI.Single, {
type: "bi.icon_combo",
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
- isShowDown: false,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
iconCls: "less-font",
@@ -142,7 +141,6 @@ BI.NumberInterval = BI.inherit(BI.Single, {
this.bigCombo = BI.createWidget({
type: "bi.icon_combo",
cls: "number-interval-big-combo bi-border",
- isShowDown: false,
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
diff --git a/src/widget/singleselect/singleselect.combo.js b/src/widget/singleselect/singleselect.combo.js
index d556ee45d..ecd8d37d1 100644
--- a/src/widget/singleselect/singleselect.combo.js
+++ b/src/widget/singleselect/singleselect.combo.js
@@ -118,19 +118,9 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
self.storeValue = this.getValue();
self._adjust(function () {
assertShowValue();
+ self._defaultState();
});
}
- }, {
- eventName: BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,
- action: function () {
- self._defaultState();
- }
- }, {
- eventName: BI.SingleSelectPopupView.EVENT_CLICK_CLEAR,
- action: function () {
- self.setValue();
- self._defaultState();
- }
}],
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
diff --git a/src/widget/singleselect/singleselect.popup.view.js b/src/widget/singleselect/singleselect.popup.view.js
index 5d33b8c9b..a29164ba2 100644
--- a/src/widget/singleselect/singleselect.popup.view.js
+++ b/src/widget/singleselect/singleselect.popup.view.js
@@ -30,13 +30,12 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
});
this.popupView = BI.createWidget({
- type: "bi.multi_popup_view",
+ type: "bi.popup_view",
stopPropagation: false,
maxWidth: opts.maxWidth,
minWidth: opts.minWidth,
maxHeight: opts.maxHeight,
element: this,
- buttons: [BI.i18nText("BI-Basic_Clears"), BI.i18nText("BI-Basic_Sure")],
el: this.loader,
value: opts.value
});
@@ -44,16 +43,6 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {
self.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE);
});
- this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {
- switch (index) {
- case 0:
- self.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CLEAR);
- break;
- case 1:
- self.fireEvent(BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM);
- break;
- }
- });
},
setStartValue: function (v) {
@@ -82,8 +71,6 @@ BI.SingleSelectPopupView = BI.inherit(BI.Widget, {
});
BI.SingleSelectPopupView.EVENT_CHANGE = "EVENT_CHANGE";
-BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM = "EVENT_CLICK_CONFIRM";
-BI.SingleSelectPopupView.EVENT_CLICK_CLEAR = "EVENT_CLICK_CLEAR";
BI.shortcut("bi.single_select_popup_view", BI.SingleSelectPopupView);
\ No newline at end of file
diff --git a/src/widget/singleselectaddsearch/singleselect.combo.js b/src/widget/singleselectaddsearch/singleselect.combo.js
index 6280e6763..c0abdf60d 100644
--- a/src/widget/singleselectaddsearch/singleselect.combo.js
+++ b/src/widget/singleselectaddsearch/singleselect.combo.js
@@ -1,12 +1,12 @@
/**
*
- * @class BI.SingleSelectCombo
+ * @class BI.SingleSelectInsertCombo
* @extends BI.Single
*/
-BI.SingleSelectCombo = BI.inherit(BI.Single, {
+BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
_defaultConfig: function () {
- return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {
+ return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
@@ -15,7 +15,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
},
_init: function () {
- BI.SingleSelectCombo.superclass._init.apply(this, arguments);
+ BI.SingleSelectInsertCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var assertShowValue = function () {
@@ -117,19 +117,9 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
self.storeValue = this.getValue();
self._adjust(function () {
assertShowValue();
+ self._defaultState();
});
}
- }, {
- eventName: BI.SingleSelectPopupView.EVENT_CLICK_CONFIRM,
- action: function () {
- self._defaultState();
- }
- }, {
- eventName: BI.SingleSelectPopupView.EVENT_CLICK_CLEAR,
- action: function () {
- self.setValue();
- self._defaultState();
- }
}],
itemsCreator: o.itemsCreator,
valueFormatter: o.valueFormatter,
@@ -160,7 +150,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
if (self.requesting === true) {
self.wants2Quit = true;
} else {
- self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM);
+ self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM);
}
});
@@ -213,7 +203,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
this._assertValue(this.storeValue);
this.requesting = true;
o.itemsCreator({
- type: BI.SingleSelectCombo.REQ_GET_ALL_DATA,
+ type: BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: keywords
}, function (ob) {
var values = BI.map(ob.items, "value");
@@ -236,7 +226,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
this._assertValue(res);
this.requesting = true;
o.itemsCreator({
- type: BI.SingleSelectCombo.REQ_GET_ALL_DATA,
+ type: BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,
keywords: [this.trigger.getKey()]
}, function (ob) {
var items = BI.map(ob.items, "value");
@@ -273,7 +263,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
var self = this, o = this.options;
if (!this._count) {
o.itemsCreator({
- type: BI.SingleSelectCombo.REQ_GET_DATA_LENGTH
+ type: BI.SingleSelectInsertCombo.REQ_GET_DATA_LENGTH
}, function (res) {
self._count = res.count;
adjust();
@@ -287,7 +277,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
function adjust () {
if (self.wants2Quit === true) {
- self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM);
+ self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM);
self.wants2Quit = false;
}
self.requesting = false;
@@ -341,11 +331,11 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
}
});
-BI.extend(BI.SingleSelectCombo, {
+BI.extend(BI.SingleSelectInsertCombo, {
REQ_GET_DATA_LENGTH: 0,
REQ_GET_ALL_DATA: -1
});
-BI.SingleSelectCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
+BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
-BI.shortcut("bi.single_select_add_combo", BI.SingleSelectCombo);
\ No newline at end of file
+BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);
\ No newline at end of file
diff --git a/src/widget/year/trigger.year.js b/src/widget/year/trigger.year.js
index ac30fedf1..6b7b958de 100644
--- a/src/widget/year/trigger.year.js
+++ b/src/widget/year/trigger.year.js
@@ -28,8 +28,8 @@ BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
vgap: c.vgap,
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
- errorText: function (v) {
- return !BI.isPositiveInteger(v) ? BI.i18nText("BI-Please_Input_Positive_Integer") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
+ errorText: function () {
+ return BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
});
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
diff --git a/src/widget/yearmonth/card.static.yearmonth.js b/src/widget/yearmonth/card.static.yearmonth.js
index f665fa661..d208ba6d2 100644
--- a/src/widget/yearmonth/card.static.yearmonth.js
+++ b/src/widget/yearmonth/card.static.yearmonth.js
@@ -98,9 +98,9 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
obj = obj || {};
obj.year = obj.year || 0;
obj.month = obj.month || 0;
- if (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();
- this.selectedYear = "";
+ this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue();
diff --git a/src/widget/yearmonth/combo.yearmonth.js b/src/widget/yearmonth/combo.yearmonth.js
index 90d693a19..a0d47d352 100644
--- a/src/widget/yearmonth/combo.yearmonth.js
+++ b/src/widget/yearmonth/combo.yearmonth.js
@@ -19,6 +19,9 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
max: o.max,
value: o.value || ""
});
+ this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN, function () {
+ self.combo.isViewVisible() && self.combo.hideView();
+ });
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START, function () {
self.combo.isViewVisible() && self.combo.hideView();
});
diff --git a/src/widget/yearmonth/popup.yearmonth.js b/src/widget/yearmonth/popup.yearmonth.js
index 86e98d340..067a66844 100644
--- a/src/widget/yearmonth/popup.yearmonth.js
+++ b/src/widget/yearmonth/popup.yearmonth.js
@@ -149,7 +149,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
switch (v) {
case BI.DynamicYearCombo.Static:
var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());
- self.year.setValue({year: date.getFullYear(), month: date.getMonth()});
+ self.year.setValue({year: date.getFullYear(), month: date.getMonth() + 1});
self._setInnerValue();
break;
case BI.DynamicYearCombo.Dynamic:
diff --git a/src/widget/yearmonth/trigger.yearmonth.js b/src/widget/yearmonth/trigger.yearmonth.js
index 534c7e568..c58f3f622 100644
--- a/src/widget/yearmonth/trigger.yearmonth.js
+++ b/src/widget/yearmonth/trigger.yearmonth.js
@@ -70,12 +70,15 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
},
watermark: BI.i18nText("BI-Basic_Unrestricted"),
errorText: function (v) {
- return !BI.isPositiveInteger(v) ? BI.i18nText("BI-Please_Input_Positive_Integer") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
+ return BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true
});
+ editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
+ self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN);
+ });
editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS);
});
@@ -87,16 +90,14 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
if (BI.isNotNull(value)) {
editor.setValue(value);
}
- if (BI.isNotEmptyString(value)) {
- var monthValue = self.monthEditor.getValue();
- self.storeValue = {
- type: BI.DynamicDateCombo.Static,
- value: {
- year: self.yearEditor.getValue(),
- month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
- }
- };
- }
+ var monthValue = self.monthEditor.getValue();
+ self.storeValue = {
+ type: BI.DynamicDateCombo.Static,
+ value: {
+ year: self.yearEditor.getValue(),
+ month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
+ }
+ };
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
@@ -163,8 +164,8 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
_getStaticTitle: function (value) {
value = value || {};
- var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year + "-";
- var monthStr = (BI.isNull(value.month) || BI.isEmptyString(value.month)) ? "" : value.month;
+ var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year;
+ var monthStr = (BI.isNull(value.month) || BI.isEmptyString(value.month)) ? "" : "-" + value.month;
return yearStr + monthStr;
},
@@ -213,4 +214,5 @@ BI.DynamicYearMonthTrigger.EVENT_ERROR = "EVENT_ERROR";
BI.DynamicYearMonthTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearMonthTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearMonthTrigger.EVENT_STOP = "EVENT_STOP";
+BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);
\ No newline at end of file
diff --git a/src/widget/yearquarter/card.static.yearquarter.js b/src/widget/yearquarter/card.static.yearquarter.js
index 4413a1644..8e0fc27fa 100644
--- a/src/widget/yearquarter/card.static.yearquarter.js
+++ b/src/widget/yearquarter/card.static.yearquarter.js
@@ -90,9 +90,9 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {
obj = obj || {};
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 0;
- if (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();
- this.selectedYear = "";
+ this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue();
diff --git a/src/widget/yearquarter/combo.yearquarter.js b/src/widget/yearquarter/combo.yearquarter.js
index c8841d540..99a19c662 100644
--- a/src/widget/yearquarter/combo.yearquarter.js
+++ b/src/widget/yearquarter/combo.yearquarter.js
@@ -19,6 +19,9 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
max: o.max,
value: o.value || ""
});
+ this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN, function () {
+ self.combo.isViewVisible() && self.combo.hideView();
+ });
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START, function () {
self.combo.isViewVisible() && self.combo.hideView();
});
diff --git a/src/widget/yearquarter/trigger.yearquarter.js b/src/widget/yearquarter/trigger.yearquarter.js
index edc0c20a0..8c3108a88 100644
--- a/src/widget/yearquarter/trigger.yearquarter.js
+++ b/src/widget/yearquarter/trigger.yearquarter.js
@@ -69,13 +69,16 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
return false;
},
errorText: function (v) {
- return !BI.isPositiveInteger(v) ? BI.i18nText("BI-Please_Input_Positive_Integer") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
+ return BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
watermark: BI.i18nText("BI-Basic_Unrestricted"),
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true
});
+ editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
+ self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN);
+ });
editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS);
});
@@ -87,16 +90,14 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
if (BI.isNotNull(value)) {
editor.setValue(value);
}
- if (BI.isNotEmptyString(value)) {
- var quarterValue = self.quarterEditor.getValue();
- self.storeValue = {
- type: BI.DynamicYearQuarterCombo.Static,
- value: {
- year: self.yearEditor.getValue(),
- quarter: BI.isEmptyString(self.quarterEditor.getValue()) ? "" : quarterValue
- }
- };
- }
+ var quarterValue = self.quarterEditor.getValue();
+ self.storeValue = {
+ type: BI.DynamicYearQuarterCombo.Static,
+ value: {
+ year: self.yearEditor.getValue(),
+ quarter: BI.isEmptyString(self.quarterEditor.getValue()) ? "" : quarterValue
+ }
+ };
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);
@@ -136,8 +137,8 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
_getStaticTitle: function (value) {
value = value || {};
- var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year + "-";
- var quarterStr = (BI.isNull(value.quarter) || BI.isEmptyString(value.quarter)) ? "" : value.quarter;
+ var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year;
+ var quarterStr = (BI.isNull(value.quarter) || BI.isEmptyString(value.quarter)) ? "" : "-" + value.quarter;
return yearStr + quarterStr;
},
@@ -195,4 +196,5 @@ BI.DynamicYearQuarterTrigger.EVENT_ERROR = "EVENT_ERROR";
BI.DynamicYearQuarterTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearQuarterTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearQuarterTrigger.EVENT_STOP = "EVENT_STOP";
+BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.shortcut("bi.dynamic_year_quarter_trigger", BI.DynamicYearQuarterTrigger);
\ No newline at end of file
diff --git a/ui/css/font.css b/ui/css/font.css
index fb1c090e3..dfc679215 100644
--- a/ui/css/font.css
+++ b/ui/css/font.css
@@ -499,24 +499,24 @@
color: inherit;
}
.trigger-triangle-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.trigger-triangle-font .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.trigger-triangle-font:hover .b-font:before,
.trigger-triangle-font.hover .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.trigger-triangle-font:active .b-font:before,
.trigger-triangle-font.active .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #3685f2;
}
.trigger-triangle-font.disabled .b-font:before {
- content: "\e6f0";
+ content: "\e64e";
color: #999999;
}
.pull-down-font .b-font {
@@ -627,45 +627,45 @@
color: #faaa39;
}
.less-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-font .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-font:hover .b-font:before,
.less-font.hover .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-font:active .b-font:before,
.less-font.active .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: #3f8ce8;
}
.less-font.disabled .b-font:before {
- content: "\e75f";
+ content: "\e75e";
color: inherit;
}
.less-equal-font .b-font {
- *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
+ *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = '');
}
.less-equal-font .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.less-equal-font:hover .b-font:before,
.less-equal-font.hover .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.less-equal-font:active .b-font:before,
.less-equal-font.active .b-font:before {
- content: "\e760";
+ content: "\e761";
color: #3f8ce8;
}
.less-equal-font.disabled .b-font:before {
- content: "\e760";
+ content: "\e761";
color: inherit;
}
.text-bold-font .b-font {