Browse Source

BI-19190 && BI-18718 && BI-18671

es6
windy 7 years ago
parent
commit
c0c8697d8e
  1. 44
      dist/_fineui.min.js
  2. 88
      dist/bundle.js
  3. 30
      dist/bundle.min.js
  4. 3
      dist/case.js
  5. 44
      dist/fineui.min.js
  6. 85
      dist/widget.js
  7. 3
      src/case/button/item.singleselect.radio.js
  8. 2
      src/widget/singleselect/search/singleselect.search.loader.js
  9. 1
      src/widget/singleselect/singleselect.combo.js
  10. 68
      src/widget/singleselect/singleselect.item.js
  11. 2
      src/widget/singleselect/singleselect.loader.js
  12. 2
      src/widget/singleselectaddsearch/search/singleselect.search.loader.js
  13. 2
      src/widget/yearmonth/card.static.yearmonth.js
  14. 2
      src/widget/yearmonth/combo.yearmonth.js
  15. 2
      src/widget/yearmonth/trigger.yearmonth.js
  16. 1
      src/widget/yearmonthinterval/yearmonthinterval.js
  17. 2
      src/widget/yearquarter/card.static.yearquarter.js
  18. 2
      src/widget/yearquarter/combo.yearquarter.js

44
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

88
dist/bundle.js vendored

@ -72791,9 +72791,6 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
this.radio = BI.createWidget({
type: "bi.radio"
});
this.radio.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
@ -103372,7 +103369,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) {
return BI.createItems(items, {
type: "bi.single_select_radio_item",
type: "bi.single_select_combo.item",
logic: {
dynamic: false
},
@ -103631,6 +103628,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) {
self.storeValue = this.getValue();
assertShowValue();
self._defaultState();
});
this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) {
@ -103879,6 +103877,73 @@ BI.SingleSelectCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_combo", BI.SingleSelectCombo);
/**
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item",
logic: {
dynamic: false
},
hgap: 10,
height: 25
});
},
_init: function () {
BI.SingleSelectComboItem.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.radio = BI.createWidget({
type: "bi.radio"
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
keyword: o.keyword,
value: o.value,
py: o.py
});
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 16
}, this.text)
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments);
this.radio.setSelected(this.isSelected());
},
setSelected: function (v) {
BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments);
this.radio.setSelected(v);
}
});
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);/**
* 选择列表
*
* Created by GUY on 2015/11/1.
@ -104109,7 +104174,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) {
return BI.createItems(items, {
type: "bi.single_select_radio_item",
type: "bi.single_select_combo.item",
logic: this.options.logic,
height: 25,
selected: false
@ -105002,7 +105067,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) {
return BI.createItems(items, {
type: "bi.single_select_radio_item",
type: "bi.single_select_combo.item",
logic: {
dynamic: false
},
@ -108465,7 +108530,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
obj.year = obj.year || 0;
obj.month = obj.month || 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();
var year = obj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
@ -108566,7 +108631,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear(), month: date.getMonth() + 1});
self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), month: date.getMonth() + 1}});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}
@ -109079,7 +109144,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
return this.yearEditor.isValid() && this.monthEditor.isValid();
}
});
BI.DynamicYearMonthTrigger.EVENT_VALID = "EVENT_FOCUS";
BI.DynamicYearMonthTrigger.EVENT_VALID = "EVENT_VALID";
BI.DynamicYearMonthTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicYearMonthTrigger.EVENT_ERROR = "EVENT_ERROR";
BI.DynamicYearMonthTrigger.EVENT_START = "EVENT_START";
@ -109163,6 +109228,7 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year
});
combo.on(BI.DynamicYearMonthCombo.EVENT_ERROR, function () {
self._clearTitle();
BI.Bubbles.hide("error");
self.element.removeClass(self.constants.timeErrorCls);
self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);
});
@ -109442,7 +109508,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 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();
var year = obj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
@ -109538,7 +109604,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear(), quarter: date.getQuarter()});
self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), quarter: date.getQuarter()}});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}

30
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

3
dist/case.js vendored

@ -342,9 +342,6 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
this.radio = BI.createWidget({
type: "bi.radio"
});
this.radio.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",

44
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

85
dist/widget.js vendored

@ -16213,7 +16213,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) {
return BI.createItems(items, {
type: "bi.single_select_radio_item",
type: "bi.single_select_combo.item",
logic: {
dynamic: false
},
@ -16472,6 +16472,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) {
self.storeValue = this.getValue();
assertShowValue();
self._defaultState();
});
this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) {
@ -16720,6 +16721,73 @@ BI.SingleSelectCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_combo", BI.SingleSelectCombo);
/**
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item",
logic: {
dynamic: false
},
hgap: 10,
height: 25
});
},
_init: function () {
BI.SingleSelectComboItem.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.radio = BI.createWidget({
type: "bi.radio"
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
keyword: o.keyword,
value: o.value,
py: o.py
});
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 16
}, this.text)
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments);
this.radio.setSelected(this.isSelected());
},
setSelected: function (v) {
BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments);
this.radio.setSelected(v);
}
});
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);/**
* 选择列表
*
* Created by GUY on 2015/11/1.
@ -16950,7 +17018,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) {
return BI.createItems(items, {
type: "bi.single_select_radio_item",
type: "bi.single_select_combo.item",
logic: this.options.logic,
height: 25,
selected: false
@ -17843,7 +17911,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) {
return BI.createItems(items, {
type: "bi.single_select_radio_item",
type: "bi.single_select_combo.item",
logic: {
dynamic: false
},
@ -21306,7 +21374,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
obj.year = obj.year || 0;
obj.month = obj.month || 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();
var year = obj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
@ -21407,7 +21475,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear(), month: date.getMonth() + 1});
self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), month: date.getMonth() + 1}});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}
@ -21920,7 +21988,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
return this.yearEditor.isValid() && this.monthEditor.isValid();
}
});
BI.DynamicYearMonthTrigger.EVENT_VALID = "EVENT_FOCUS";
BI.DynamicYearMonthTrigger.EVENT_VALID = "EVENT_VALID";
BI.DynamicYearMonthTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicYearMonthTrigger.EVENT_ERROR = "EVENT_ERROR";
BI.DynamicYearMonthTrigger.EVENT_START = "EVENT_START";
@ -22004,6 +22072,7 @@ BI.shortcut("bi.dynamic_year_month_trigger", BI.DynamicYearMonthTrigger);BI.Year
});
combo.on(BI.DynamicYearMonthCombo.EVENT_ERROR, function () {
self._clearTitle();
BI.Bubbles.hide("error");
self.element.removeClass(self.constants.timeErrorCls);
self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);
});
@ -22283,7 +22352,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 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();
var year = obj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
@ -22379,7 +22448,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear(), quarter: date.getQuarter()});
self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), quarter: date.getQuarter()}});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}

3
src/case/button/item.singleselect.radio.js

@ -20,9 +20,6 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
this.radio = BI.createWidget({
type: "bi.radio"
});
this.radio.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",

2
src/widget/singleselect/search/singleselect.search.loader.js

@ -90,7 +90,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) {
return BI.createItems(items, {
type: "bi.single_select_radio_item",
type: "bi.single_select_combo.item",
logic: {
dynamic: false
},

1
src/widget/singleselect/singleselect.combo.js

@ -94,6 +94,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) {
self.storeValue = this.getValue();
assertShowValue();
self._defaultState();
});
this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) {

68
src/widget/singleselect/singleselect.item.js

@ -0,0 +1,68 @@
/**
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item",
logic: {
dynamic: false
},
hgap: 10,
height: 25
});
},
_init: function () {
BI.SingleSelectComboItem.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.radio = BI.createWidget({
type: "bi.radio"
});
this.text = BI.createWidget({
type: "bi.label",
cls: "list-item-text",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
keyword: o.keyword,
value: o.value,
py: o.py
});
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, {
items: BI.LogicFactory.createLogicItemsByDirection("left", {
type: "bi.center_adapt",
items: [this.radio],
width: 16
}, this.text)
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments);
this.radio.setSelected(this.isSelected());
},
setSelected: function (v) {
BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments);
this.radio.setSelected(v);
}
});
BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem);

2
src/widget/singleselect/singleselect.loader.js

@ -96,7 +96,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_createItems: function (items) {
return BI.createItems(items, {
type: "bi.single_select_radio_item",
type: "bi.single_select_combo.item",
logic: this.options.logic,
height: 25,
selected: false

2
src/widget/singleselectaddsearch/search/singleselect.search.loader.js

@ -106,7 +106,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
_createItems: function (items) {
return BI.createItems(items, {
type: "bi.single_select_radio_item",
type: "bi.single_select_combo.item",
logic: {
dynamic: false
},

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

@ -100,7 +100,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
obj.year = obj.year || 0;
obj.month = obj.month || 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();
var year = obj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);

2
src/widget/yearmonth/combo.yearmonth.js

@ -84,7 +84,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear(), month: date.getMonth() + 1});
self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), month: date.getMonth() + 1}});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}

2
src/widget/yearmonth/trigger.yearmonth.js

@ -208,7 +208,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
return this.yearEditor.isValid() && this.monthEditor.isValid();
}
});
BI.DynamicYearMonthTrigger.EVENT_VALID = "EVENT_FOCUS";
BI.DynamicYearMonthTrigger.EVENT_VALID = "EVENT_VALID";
BI.DynamicYearMonthTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicYearMonthTrigger.EVENT_ERROR = "EVENT_ERROR";
BI.DynamicYearMonthTrigger.EVENT_START = "EVENT_START";

1
src/widget/yearmonthinterval/yearmonthinterval.js

@ -75,6 +75,7 @@ BI.YearMonthInterval = BI.inherit(BI.Single, {
});
combo.on(BI.DynamicYearMonthCombo.EVENT_ERROR, function () {
self._clearTitle();
BI.Bubbles.hide("error");
self.element.removeClass(self.constants.timeErrorCls);
self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);
});

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

@ -92,7 +92,7 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 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();
var year = obj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);

2
src/widget/yearquarter/combo.yearquarter.js

@ -79,7 +79,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear(), quarter: date.getQuarter()});
self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), quarter: date.getQuarter()}});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}

Loading…
Cancel
Save