Frank.Qiu 7 years ago
parent
commit
fb17be905d
  1. 40
      demo/js/case/combo/demo.text_value_down_list_combo.js
  2. 30
      dist/_fineui.min.js
  3. 36
      dist/bundle.js
  4. 2
      dist/bundle.min.css
  5. 14
      dist/bundle.min.js
  6. 40
      dist/demo.js
  7. 2
      dist/fineui.min.css
  8. 30
      dist/fineui.min.js
  9. 36
      dist/widget.js
  10. 4
      src/widget/date/calendar/combo.year.date.js
  11. 4
      src/widget/date/calendar/picker.year.js
  12. 2
      src/widget/dynamicdate/dynamicdate.trigger.js
  13. 2
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js
  14. 4
      src/widget/filter/operation/filter.operation.js
  15. 3
      src/widget/yearmonth/card.static.yearmonth.js
  16. 3
      src/widget/yearquarter/card.static.yearquarter.js
  17. 1
      src/widget/yearquarter/combo.yearquarter.js
  18. 7
      src/widget/yearquarter/trigger.yearquarter.js

40
demo/js/case/combo/demo.text_value_down_list_combo.js

@ -18,25 +18,31 @@ Demo.TextValueDownListCombo = BI.inherit(BI.Widget, {
}, },
text: "默认值", text: "默认值",
value: 11, value: 11,
items: [ items: [[{
[{ text: BI.i18nText("BI-Basic_Number_IN"),
el: { value: 1,
text: "层级1", cls: "dot-e-font"
value: 1 }, {
}, text: BI.i18nText("BI-Basic_Not_Number_In"),
children: [{ value: 2,
text: "层级1-1", cls: "dot-e-font"
value: 11 }], [{
}] el: {
}], text: BI.i18nText("BI-Basic_More_Than"),
[{ value: 3,
text: "层级2", cls: "dot-e-font"
value: 2 },
value: 3,
children: [{
text: BI.i18nText("BI-Basic_Settled_Value"),
value: 4,
cls: "dot-e-font"
}, { }, {
text: "层级3", text: BI.i18nText("BI-Basic_Average_Value"),
value: 3 value: 4,
cls: "dot-e-font"
}] }]
] }]]
}, { }, {
type: "bi.button", type: "bi.button",
width: 90, width: 90,

30
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

36
dist/bundle.js vendored

@ -87649,6 +87649,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
baseCls: "bi-year-combo", baseCls: "bi-year-combo",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
behaviors: {},
height: 25 height: 25
}); });
}, },
@ -87662,6 +87663,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.year_popup", type: "bi.year_popup",
behaviors: o.behaviors,
min: o.min, min: o.min,
max: o.max max: o.max
}); });
@ -87701,7 +87703,8 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
} }
}); });
BI.YearDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.YearDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.year_date_combo", BI.YearDateCombo);/** BI.shortcut("bi.year_date_combo", BI.YearDateCombo);
/**
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class BI.DatePicker * @class BI.DatePicker
* @extends BI.Widget * @extends BI.Widget
@ -87865,6 +87868,7 @@ BI.YearPicker = BI.inherit(BI.Widget, {
var conf = BI.YearPicker.superclass._defaultConfig.apply(this, arguments); var conf = BI.YearPicker.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: "bi-year-picker bi-background", baseCls: "bi-year-picker bi-background",
behaviors: {},
height: 40, height: 40,
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31" // 最大日期 max: "2099-12-31" // 最大日期
@ -87905,6 +87909,7 @@ BI.YearPicker = BI.inherit(BI.Widget, {
this.year = BI.createWidget({ this.year = BI.createWidget({
type: "bi.year_date_combo", type: "bi.year_date_combo",
min: o.min, min: o.min,
behaviors: o.behaviors,
max: o.max max: o.max
}); });
this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () { this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () {
@ -87965,7 +87970,8 @@ BI.YearPicker = BI.inherit(BI.Widget, {
} }
}); });
BI.YearPicker.EVENT_CHANGE = "EVENT_CHANGE"; BI.YearPicker.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.year_picker", BI.YearPicker);/** BI.shortcut("bi.year_picker", BI.YearPicker);
/**
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class BI.DateCalendarPopup * @class BI.DateCalendarPopup
* @extends BI.Widget * @extends BI.Widget
@ -90882,7 +90888,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,
value: { value: {
year: date[0] | 0, year: date[0] | 0,
month: date[1], month: date[1] | 0,
day: date[2] | 0 day: date[2] | 0
} }
}; };
@ -91820,7 +91826,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,
value: { value: {
year: date[0] | 0, year: date[0] | 0,
month: date[1], month: date[1] | 0,
day: date[2] | 0, day: date[2] | 0,
hour: date[3] | 0, hour: date[3] | 0,
minute: date[4] | 0, minute: date[4] | 0,
@ -93711,13 +93717,13 @@ BI.Filter.FILTER_TYPE.EMPTY_CONDITION = 37;
case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA: case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:
text = BI.i18nText("BI-Conf_Add_Formula"); text = BI.i18nText("BI-Conf_Add_Formula");
cls = "filter-formula-font"; cls = "filter-formula-font";
items = this.options.constants.FORMULA_COMBO; items = self.options.constants.FORMULA_COMBO;
break; break;
case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION: case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:
default: default:
text = BI.i18nText("BI-Conf_Add_Condition"); text = BI.i18nText("BI-Conf_Add_Condition");
cls = "filter-condition-font"; cls = "filter-condition-font";
items = this.options.constants.CONDITION_COMBO; items = self.options.constants.CONDITION_COMBO;
break; break;
} }
@ -108401,6 +108407,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
ref: function () { ref: function () {
self.yearPicker = this; self.yearPicker = this;
}, },
behaviors: o.behaviors,
height: 30, height: 30,
listeners: [{ listeners: [{
eventName: BI.YearPicker.EVENT_CHANGE, eventName: BI.YearPicker.EVENT_CHANGE,
@ -108472,7 +108479,8 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
} }
}); });
BI.StaticYearMonthCard.EVENT_CHANGE = "EVENT_CHANGE"; BI.StaticYearMonthCard.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);BI.DynamicYearMonthCombo = BI.inherit(BI.Single, { BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);
BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
props: { props: {
baseCls: "bi-year-month-combo bi-border", baseCls: "bi-year-month-combo bi-border",
@ -109384,6 +109392,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
ref: function () { ref: function () {
self.yearPicker = this; self.yearPicker = this;
}, },
behaviors: o.behaviors,
height: 30, height: 30,
listeners: [{ listeners: [{
eventName: BI.YearPicker.EVENT_CHANGE, eventName: BI.YearPicker.EVENT_CHANGE,
@ -109447,7 +109456,8 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
} }
}); });
BI.StaticYearQuarterCard.EVENT_CHANGE = "EVENT_CHANGE"; BI.StaticYearQuarterCard.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);
BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-year-quarter-combo bi-border", baseCls: "bi-year-quarter-combo bi-border",
@ -109495,7 +109505,6 @@ BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicY
}); });
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS, function () { this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS, function () {
self.storeTriggerValue = self.trigger.getKey(); self.storeTriggerValue = self.trigger.getKey();
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_FOCUS);
}); });
this.combo = BI.createWidget({ this.combo = BI.createWidget({
@ -109886,6 +109895,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
watermark: BI.i18nText("BI-Basic_Unrestricted"), watermark: BI.i18nText("BI-Basic_Unrestricted"),
hgap: c.hgap, hgap: c.hgap,
vgap: c.vgap, vgap: c.vgap,
title: "",
allowBlank: true allowBlank: true
}); });
editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
@ -109966,7 +109976,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
}, },
_setInnerValue: function (date, text) { _setInnerValue: function (date, text) {
var dateStr = date.print("%Y-%x"); var dateStr = date.print("%Y-%Q");
this.yearEditor.setValue(date.getFullYear()); this.yearEditor.setValue(date.getFullYear());
this.quarterEditor.setValue(date.getQuarter()); this.quarterEditor.setValue(date.getQuarter());
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr)); this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
@ -110001,6 +110011,10 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
getValue: function () { getValue: function () {
return this.storeValue; return this.storeValue;
},
getKey: function () {
return this.yearEditor.getValue() + "-" + this.quarterEditor.getValue();
} }
}); });
BI.DynamicYearQuarterTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicYearQuarterTrigger.EVENT_FOCUS = "EVENT_FOCUS";
@ -111188,7 +111202,7 @@ BI.ValueChooserPane = BI.inherit(BI.AbstractValueChooser, {
}; };
}, },
populate: function () { populate: function (items) {
// 直接用combo的populate不会作用到AbstractValueChooser上 // 直接用combo的populate不会作用到AbstractValueChooser上
this.items = items; this.items = items;
this.list.populate.apply(this.list, arguments); this.list.populate.apply(this.list, arguments);

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

14
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

40
dist/demo.js vendored

@ -2234,25 +2234,31 @@ Demo.TextValueDownListCombo = BI.inherit(BI.Widget, {
}, },
text: "默认值", text: "默认值",
value: 11, value: 11,
items: [ items: [[{
[{ text: BI.i18nText("BI-Basic_Number_IN"),
el: { value: 1,
text: "层级1", cls: "dot-e-font"
value: 1 }, {
}, text: BI.i18nText("BI-Basic_Not_Number_In"),
children: [{ value: 2,
text: "层级1-1", cls: "dot-e-font"
value: 11 }], [{
}] el: {
}], text: BI.i18nText("BI-Basic_More_Than"),
[{ value: 3,
text: "层级2", cls: "dot-e-font"
value: 2 },
value: 3,
children: [{
text: BI.i18nText("BI-Basic_Settled_Value"),
value: 4,
cls: "dot-e-font"
}, { }, {
text: "层级3", text: BI.i18nText("BI-Basic_Average_Value"),
value: 3 value: 4,
cls: "dot-e-font"
}] }]
] }]]
}, { }, {
type: "bi.button", type: "bi.button",
width: 90, width: 90,

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

30
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

36
dist/widget.js vendored

@ -490,6 +490,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
baseCls: "bi-year-combo", baseCls: "bi-year-combo",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
behaviors: {},
height: 25 height: 25
}); });
}, },
@ -503,6 +504,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.year_popup", type: "bi.year_popup",
behaviors: o.behaviors,
min: o.min, min: o.min,
max: o.max max: o.max
}); });
@ -542,7 +544,8 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
} }
}); });
BI.YearDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.YearDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.year_date_combo", BI.YearDateCombo);/** BI.shortcut("bi.year_date_combo", BI.YearDateCombo);
/**
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class BI.DatePicker * @class BI.DatePicker
* @extends BI.Widget * @extends BI.Widget
@ -706,6 +709,7 @@ BI.YearPicker = BI.inherit(BI.Widget, {
var conf = BI.YearPicker.superclass._defaultConfig.apply(this, arguments); var conf = BI.YearPicker.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: "bi-year-picker bi-background", baseCls: "bi-year-picker bi-background",
behaviors: {},
height: 40, height: 40,
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31" // 最大日期 max: "2099-12-31" // 最大日期
@ -746,6 +750,7 @@ BI.YearPicker = BI.inherit(BI.Widget, {
this.year = BI.createWidget({ this.year = BI.createWidget({
type: "bi.year_date_combo", type: "bi.year_date_combo",
min: o.min, min: o.min,
behaviors: o.behaviors,
max: o.max max: o.max
}); });
this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () { this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () {
@ -806,7 +811,8 @@ BI.YearPicker = BI.inherit(BI.Widget, {
} }
}); });
BI.YearPicker.EVENT_CHANGE = "EVENT_CHANGE"; BI.YearPicker.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.year_picker", BI.YearPicker);/** BI.shortcut("bi.year_picker", BI.YearPicker);
/**
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class BI.DateCalendarPopup * @class BI.DateCalendarPopup
* @extends BI.Widget * @extends BI.Widget
@ -3723,7 +3729,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,
value: { value: {
year: date[0] | 0, year: date[0] | 0,
month: date[1], month: date[1] | 0,
day: date[2] | 0 day: date[2] | 0
} }
}; };
@ -4661,7 +4667,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,
value: { value: {
year: date[0] | 0, year: date[0] | 0,
month: date[1], month: date[1] | 0,
day: date[2] | 0, day: date[2] | 0,
hour: date[3] | 0, hour: date[3] | 0,
minute: date[4] | 0, minute: date[4] | 0,
@ -6552,13 +6558,13 @@ BI.Filter.FILTER_TYPE.EMPTY_CONDITION = 37;
case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA: case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:
text = BI.i18nText("BI-Conf_Add_Formula"); text = BI.i18nText("BI-Conf_Add_Formula");
cls = "filter-formula-font"; cls = "filter-formula-font";
items = this.options.constants.FORMULA_COMBO; items = self.options.constants.FORMULA_COMBO;
break; break;
case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION: case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:
default: default:
text = BI.i18nText("BI-Conf_Add_Condition"); text = BI.i18nText("BI-Conf_Add_Condition");
cls = "filter-condition-font"; cls = "filter-condition-font";
items = this.options.constants.CONDITION_COMBO; items = self.options.constants.CONDITION_COMBO;
break; break;
} }
@ -21242,6 +21248,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
ref: function () { ref: function () {
self.yearPicker = this; self.yearPicker = this;
}, },
behaviors: o.behaviors,
height: 30, height: 30,
listeners: [{ listeners: [{
eventName: BI.YearPicker.EVENT_CHANGE, eventName: BI.YearPicker.EVENT_CHANGE,
@ -21313,7 +21320,8 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
} }
}); });
BI.StaticYearMonthCard.EVENT_CHANGE = "EVENT_CHANGE"; BI.StaticYearMonthCard.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);BI.DynamicYearMonthCombo = BI.inherit(BI.Single, { BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);
BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
props: { props: {
baseCls: "bi-year-month-combo bi-border", baseCls: "bi-year-month-combo bi-border",
@ -22225,6 +22233,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
ref: function () { ref: function () {
self.yearPicker = this; self.yearPicker = this;
}, },
behaviors: o.behaviors,
height: 30, height: 30,
listeners: [{ listeners: [{
eventName: BI.YearPicker.EVENT_CHANGE, eventName: BI.YearPicker.EVENT_CHANGE,
@ -22288,7 +22297,8 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
} }
}); });
BI.StaticYearQuarterCard.EVENT_CHANGE = "EVENT_CHANGE"; BI.StaticYearQuarterCard.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);
BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-year-quarter-combo bi-border", baseCls: "bi-year-quarter-combo bi-border",
@ -22336,7 +22346,6 @@ BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicY
}); });
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS, function () { this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS, function () {
self.storeTriggerValue = self.trigger.getKey(); self.storeTriggerValue = self.trigger.getKey();
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_FOCUS);
}); });
this.combo = BI.createWidget({ this.combo = BI.createWidget({
@ -22727,6 +22736,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
watermark: BI.i18nText("BI-Basic_Unrestricted"), watermark: BI.i18nText("BI-Basic_Unrestricted"),
hgap: c.hgap, hgap: c.hgap,
vgap: c.vgap, vgap: c.vgap,
title: "",
allowBlank: true allowBlank: true
}); });
editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
@ -22807,7 +22817,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
}, },
_setInnerValue: function (date, text) { _setInnerValue: function (date, text) {
var dateStr = date.print("%Y-%x"); var dateStr = date.print("%Y-%Q");
this.yearEditor.setValue(date.getFullYear()); this.yearEditor.setValue(date.getFullYear());
this.quarterEditor.setValue(date.getQuarter()); this.quarterEditor.setValue(date.getQuarter());
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr)); this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
@ -22842,6 +22852,10 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
getValue: function () { getValue: function () {
return this.storeValue; return this.storeValue;
},
getKey: function () {
return this.yearEditor.getValue() + "-" + this.quarterEditor.getValue();
} }
}); });
BI.DynamicYearQuarterTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicYearQuarterTrigger.EVENT_FOCUS = "EVENT_FOCUS";
@ -24029,7 +24043,7 @@ BI.ValueChooserPane = BI.inherit(BI.AbstractValueChooser, {
}; };
}, },
populate: function () { populate: function (items) {
// 直接用combo的populate不会作用到AbstractValueChooser上 // 直接用combo的populate不会作用到AbstractValueChooser上
this.items = items; this.items = items;
this.list.populate.apply(this.list, arguments); this.list.populate.apply(this.list, arguments);

4
src/widget/date/calendar/combo.year.date.js

@ -11,6 +11,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
baseCls: "bi-year-combo", baseCls: "bi-year-combo",
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
behaviors: {},
height: 25 height: 25
}); });
}, },
@ -24,6 +25,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
this.popup = BI.createWidget({ this.popup = BI.createWidget({
type: "bi.year_popup", type: "bi.year_popup",
behaviors: o.behaviors,
min: o.min, min: o.min,
max: o.max max: o.max
}); });
@ -63,4 +65,4 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
} }
}); });
BI.YearDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.YearDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.year_date_combo", BI.YearDateCombo); BI.shortcut("bi.year_date_combo", BI.YearDateCombo);

4
src/widget/date/calendar/picker.year.js

@ -8,6 +8,7 @@ BI.YearPicker = BI.inherit(BI.Widget, {
var conf = BI.YearPicker.superclass._defaultConfig.apply(this, arguments); var conf = BI.YearPicker.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: "bi-year-picker bi-background", baseCls: "bi-year-picker bi-background",
behaviors: {},
height: 40, height: 40,
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31" // 最大日期 max: "2099-12-31" // 最大日期
@ -48,6 +49,7 @@ BI.YearPicker = BI.inherit(BI.Widget, {
this.year = BI.createWidget({ this.year = BI.createWidget({
type: "bi.year_date_combo", type: "bi.year_date_combo",
min: o.min, min: o.min,
behaviors: o.behaviors,
max: o.max max: o.max
}); });
this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () { this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () {
@ -108,4 +110,4 @@ BI.YearPicker = BI.inherit(BI.Widget, {
} }
}); });
BI.YearPicker.EVENT_CHANGE = "EVENT_CHANGE"; BI.YearPicker.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.year_picker", BI.YearPicker); BI.shortcut("bi.year_picker", BI.YearPicker);

2
src/widget/dynamicdate/dynamicdate.trigger.js

@ -70,7 +70,7 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,
value: { value: {
year: date[0] | 0, year: date[0] | 0,
month: date[1], month: date[1] | 0,
day: date[2] | 0 day: date[2] | 0
} }
}; };

2
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -70,7 +70,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
type: BI.DynamicDateCombo.Static, type: BI.DynamicDateCombo.Static,
value: { value: {
year: date[0] | 0, year: date[0] | 0,
month: date[1], month: date[1] | 0,
day: date[2] | 0, day: date[2] | 0,
hour: date[3] | 0, hour: date[3] | 0,
minute: date[4] | 0, minute: date[4] | 0,

4
src/widget/filter/operation/filter.operation.js

@ -179,13 +179,13 @@
case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA: case BI.AbstractFilterItem.FILTER_OPERATION_FORMULA:
text = BI.i18nText("BI-Conf_Add_Formula"); text = BI.i18nText("BI-Conf_Add_Formula");
cls = "filter-formula-font"; cls = "filter-formula-font";
items = this.options.constants.FORMULA_COMBO; items = self.options.constants.FORMULA_COMBO;
break; break;
case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION: case BI.AbstractFilterItem.FILTER_OPERATION_CONDITION:
default: default:
text = BI.i18nText("BI-Conf_Add_Condition"); text = BI.i18nText("BI-Conf_Add_Condition");
cls = "filter-condition-font"; cls = "filter-condition-font";
items = this.options.constants.CONDITION_COMBO; items = self.options.constants.CONDITION_COMBO;
break; break;
} }

3
src/widget/yearmonth/card.static.yearmonth.js

@ -42,6 +42,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
ref: function () { ref: function () {
self.yearPicker = this; self.yearPicker = this;
}, },
behaviors: o.behaviors,
height: 30, height: 30,
listeners: [{ listeners: [{
eventName: BI.YearPicker.EVENT_CHANGE, eventName: BI.YearPicker.EVENT_CHANGE,
@ -113,4 +114,4 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
} }
}); });
BI.StaticYearMonthCard.EVENT_CHANGE = "EVENT_CHANGE"; BI.StaticYearMonthCard.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard); BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);

3
src/widget/yearquarter/card.static.yearquarter.js

@ -42,6 +42,7 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {
ref: function () { ref: function () {
self.yearPicker = this; self.yearPicker = this;
}, },
behaviors: o.behaviors,
height: 30, height: 30,
listeners: [{ listeners: [{
eventName: BI.YearPicker.EVENT_CHANGE, eventName: BI.YearPicker.EVENT_CHANGE,
@ -105,4 +106,4 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {
} }
}); });
BI.StaticYearQuarterCard.EVENT_CHANGE = "EVENT_CHANGE"; BI.StaticYearQuarterCard.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard); BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);

1
src/widget/yearquarter/combo.yearquarter.js

@ -46,7 +46,6 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
}); });
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS, function () { this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS, function () {
self.storeTriggerValue = self.trigger.getKey(); self.storeTriggerValue = self.trigger.getKey();
self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_FOCUS);
}); });
this.combo = BI.createWidget({ this.combo = BI.createWidget({

7
src/widget/yearquarter/trigger.yearquarter.js

@ -74,6 +74,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
watermark: BI.i18nText("BI-Basic_Unrestricted"), watermark: BI.i18nText("BI-Basic_Unrestricted"),
hgap: c.hgap, hgap: c.hgap,
vgap: c.vgap, vgap: c.vgap,
title: "",
allowBlank: true allowBlank: true
}); });
editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () { editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
@ -154,7 +155,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
}, },
_setInnerValue: function (date, text) { _setInnerValue: function (date, text) {
var dateStr = date.print("%Y-%x"); var dateStr = date.print("%Y-%Q");
this.yearEditor.setValue(date.getFullYear()); this.yearEditor.setValue(date.getFullYear());
this.quarterEditor.setValue(date.getQuarter()); this.quarterEditor.setValue(date.getQuarter());
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr)); this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
@ -189,6 +190,10 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
getValue: function () { getValue: function () {
return this.storeValue; return this.storeValue;
},
getKey: function () {
return this.yearEditor.getValue() + "-" + this.quarterEditor.getValue();
} }
}); });
BI.DynamicYearQuarterTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicYearQuarterTrigger.EVENT_FOCUS = "EVENT_FOCUS";

Loading…
Cancel
Save