Browse Source

Merge pull request #919 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit 'f03493e01ffda8f426910646c00be385ae18cb43':
  doc: changelog
  BI-44574 feat: 编辑框新增EVENT_CHANGE_CONFIRM事件
es6
windy 6 years ago
parent
commit
6f600cdd49
  1. 1
      changelog.md
  2. 257
      dist/2.0/fineui.ie.js
  3. 257
      dist/2.0/fineui.js
  4. 9
      dist/base.js
  5. 257
      dist/bundle.ie.js
  6. 257
      dist/bundle.js
  7. 26
      dist/case.js
  8. 3
      dist/demo.js
  9. 257
      dist/fineui.ie.js
  10. 257
      dist/fineui.js
  11. 257
      dist/fineui_without_jquery_polyfill.js
  12. 222
      dist/widget.js
  13. 4
      src/base/single/editor/editor.js
  14. 5
      src/base/single/input/input.js
  15. 4
      src/case/editor/editor.clear.js
  16. 6
      src/case/editor/editor.shelter.js
  17. 6
      src/case/editor/editor.sign.js
  18. 5
      src/case/editor/editor.state.js
  19. 5
      src/case/editor/editor.state.simple.js
  20. 4
      src/widget/editor/editor.search.js
  21. 4
      src/widget/editor/editor.text.js
  22. 12
      src/widget/numberinterval/numberinterval.js
  23. 24
      src/widget/numberinterval/singleeditor/single.editor.js
  24. 6
      src/widget/singleslider/button/editor.sign.text.js

1
changelog.md

@ -1,5 +1,6 @@
# 更新日志
2.0(2019-05)
- editor类控件新增EVENT_CHANGE_CONFIRM事件
- 复选下拉控件和树下拉控件支持trigger是否可编辑
- 时分秒控件支持自定义时间显示格式和是否可编辑
- 日期/时间/日期区间/时间区间支持自定义日期选择范围和是否可编辑

257
dist/2.0/fineui.ie.js vendored

@ -44511,6 +44511,9 @@ BI.Editor = BI.inherit(BI.Single, {
this.editor.on(BI.Input.EVENT_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM, arguments);
});
this.element.click(function (e) {
e.stopPropagation();
return false;
@ -44655,6 +44658,7 @@ BI.Editor.EVENT_START = "EVENT_START";
BI.Editor.EVENT_PAUSE = "EVENT_PAUSE";
BI.Editor.EVENT_STOP = "EVENT_STOP";
BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Editor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Editor.EVENT_VALID = "EVENT_VALID";
BI.Editor.EVENT_ERROR = "EVENT_ERROR";
BI.Editor.EVENT_ENTER = "EVENT_ENTER";
@ -45965,9 +45969,13 @@ BI.Input = BI.inherit(BI.Single, {
self._isEditing = false;
self._start = false;
if (self.isValid()) {
var lastValidValue = self._lastValidValue;
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
self.fireEvent(BI.Input.EVENT_BLUR);
}
@ -46153,6 +46161,7 @@ BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE";
BI.Input.EVENT_START = "EVENT_START";
BI.Input.EVENT_PAUSE = "EVENT_PAUSE";
BI.Input.EVENT_STOP = "EVENT_STOP";
BI.Input.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Input.EVENT_REMOVE = "EVENT_REMOVE";
BI.Input.EVENT_EMPTY = "EVENT_EMPTY";
@ -55748,6 +55757,9 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ClearEditor.EVENT_START);
});
@ -55812,6 +55824,7 @@ BI.ClearEditor.EVENT_START = "EVENT_START";
BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ClearEditor.EVENT_STOP = "EVENT_STOP";
BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ClearEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ClearEditor.EVENT_VALID = "EVENT_VALID";
BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER";
@ -55919,6 +55932,11 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ShelterEditor.EVENT_START, arguments);
});
@ -56071,6 +56089,7 @@ BI.ShelterEditor.EVENT_START = "EVENT_START";
BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ShelterEditor.EVENT_STOP = "EVENT_STOP";
BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ShelterEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ShelterEditor.EVENT_VALID = "EVENT_VALID";
BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56182,6 +56201,11 @@ BI.SignEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SignEditor.EVENT_START, arguments);
});
@ -56331,6 +56355,7 @@ BI.SignEditor.EVENT_START = "EVENT_START";
BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SignEditor.EVENT_STOP = "EVENT_STOP";
BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignEditor.EVENT_VALID = "EVENT_VALID";
BI.SignEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SignEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56451,6 +56476,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.StateEditor.EVENT_START, arguments);
});
@ -56614,6 +56643,7 @@ BI.StateEditor.EVENT_START = "EVENT_START";
BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.StateEditor.EVENT_STOP = "EVENT_STOP";
BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.StateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.StateEditor.EVENT_VALID = "EVENT_VALID";
BI.StateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.StateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56723,6 +56753,10 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments);
});
@ -56872,6 +56906,7 @@ BI.SimpleStateEditor.EVENT_START = "EVENT_START";
BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP";
BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID";
BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -62704,7 +62739,8 @@ BI.extend(BI.DynamicDateCard, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -62743,6 +62779,7 @@ BI.extend(BI.DynamicDateCard, {
min: opts.minDate,
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
height: opts.height,
value: opts.value,
ref: function () {
@ -63336,7 +63373,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -63370,25 +63408,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN);
@ -63447,9 +63467,43 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var c = this._const;
var result = [0, 1, 2];
@ -63645,7 +63699,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -63683,6 +63738,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
type: "bi.dynamic_date_time_trigger",
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
format: opts.format,
height: opts.height,
value: opts.value,
@ -64387,7 +64443,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -64421,25 +64478,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN);
@ -64496,9 +64535,44 @@ BI.extend(BI.DynamicDateTimeSelect, {
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var result = [];
var hasSecond = false;
@ -64813,6 +64887,9 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SearchEditor.EVENT_START);
});
@ -64890,6 +64967,7 @@ BI.SearchEditor.EVENT_START = "EVENT_START";
BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchEditor.EVENT_STOP = "EVENT_STOP";
BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SearchEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SearchEditor.EVENT_VALID = "EVENT_VALID";
BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER";
@ -65000,6 +65078,9 @@ BI.TextEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_REMOVE, function (v) {
self.fireEvent(BI.TextEditor.EVENT_REMOVE);
});
@ -65072,6 +65153,7 @@ BI.TextEditor.EVENT_START = "EVENT_START";
BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.TextEditor.EVENT_STOP = "EVENT_STOP";
BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.TextEditor.EVENT_VALID = "EVENT_VALID";
BI.TextEditor.EVENT_ERROR = "EVENT_ERROR";
BI.TextEditor.EVENT_ENTER = "EVENT_ENTER";
@ -68809,7 +68891,8 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
height: 24,
attributes: {
tabIndex: 0
}
},
allowEdit: true
});
},
@ -68828,6 +68911,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
text: o.text,
// adapter: this.popup,
@ -69591,7 +69675,8 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -69671,6 +69756,20 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -70294,7 +70393,8 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -70371,6 +70471,20 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -73073,7 +73187,8 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-insert-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -73089,6 +73204,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -73358,7 +73474,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-list-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -73374,6 +73491,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -74747,7 +74865,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setFocusEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_FOCUS, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, function () {
self._setTitle("");
switch (self._checkValidation()) {
case c.typeError:
@ -74776,7 +74894,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
},
_setBlurEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_BLUR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR, function () {
BI.Bubbles.hide(c.typeError);
BI.Bubbles.hide(c.numberError);
BI.Bubbles.hide(c.signalError);
@ -74798,7 +74916,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setErrorEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_ERROR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR, function () {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
@ -74811,7 +74929,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setValidEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_VALID, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID, function () {
switch (self._checkValidation()) {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
@ -74836,7 +74954,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setEditorValueChangedEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_CHANGE, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, function () {
switch (self._checkValidation()) {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
@ -74861,7 +74979,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
});
w.on(BI.Editor.EVENT_CONFIRM, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
},
@ -75026,32 +75144,37 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
listeners: [{
eventName: BI.Editor.EVENT_ERROR,
action: function () {
self.fireEvent(BI.Editor.EVENT_ERROR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR, arguments);
}
}, {
eventName: BI.Editor.EVENT_FOCUS,
action: function () {
self.fireEvent(BI.Editor.EVENT_FOCUS, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, arguments);
}
}, {
eventName: BI.Editor.EVENT_BLUR,
action: function () {
self.fireEvent(BI.Editor.EVENT_BLUR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR, arguments);
}
}, {
eventName: BI.Editor.EVENT_VALID,
action: function () {
self.fireEvent(BI.Editor.EVENT_VALID, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.Editor.EVENT_CHANGE, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, arguments);
}
}, {
eventName: BI.Editor.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE_CONFIRM,
action: function () {
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM, arguments);
}
}]
}]
@ -75075,6 +75198,13 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
}
});
BI.NumberIntervalSingleEidtor.EVENT_FOCUS = "EVENT_FOCUS";
BI.NumberIntervalSingleEidtor.EVENT_BLUR = "EVENT_BLUR";
BI.NumberIntervalSingleEidtor.EVENT_ERROR = "EVENT_ERROR";
BI.NumberIntervalSingleEidtor.EVENT_VALID = "EVENT_VALID";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.NumberIntervalSingleEidtor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.number_interval_single_editor", BI.NumberIntervalSingleEidtor);/**
* 季度下拉框
*
@ -79022,6 +79152,11 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_ERROR, function () {
self._checkText();
});
@ -79142,6 +79277,7 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
@ -80759,7 +80895,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
_getTitle: function () {
var storeValue = this.storeValue || {};
return BI.print(BI.getDate(storeValue.year, (storeValue.month - 1), storeValue.day), this._getFormatString());
var date = BI.getDate();
return BI.print(BI.getDate(date.getFullYear(), 0, 1, storeValue.hour, storeValue.minute, storeValue.second), this._getFormatString());
},
_getFormatString: function () {

257
dist/2.0/fineui.js vendored

@ -44915,6 +44915,9 @@ BI.Editor = BI.inherit(BI.Single, {
this.editor.on(BI.Input.EVENT_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM, arguments);
});
this.element.click(function (e) {
e.stopPropagation();
return false;
@ -45059,6 +45062,7 @@ BI.Editor.EVENT_START = "EVENT_START";
BI.Editor.EVENT_PAUSE = "EVENT_PAUSE";
BI.Editor.EVENT_STOP = "EVENT_STOP";
BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Editor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Editor.EVENT_VALID = "EVENT_VALID";
BI.Editor.EVENT_ERROR = "EVENT_ERROR";
BI.Editor.EVENT_ENTER = "EVENT_ENTER";
@ -46369,9 +46373,13 @@ BI.Input = BI.inherit(BI.Single, {
self._isEditing = false;
self._start = false;
if (self.isValid()) {
var lastValidValue = self._lastValidValue;
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
self.fireEvent(BI.Input.EVENT_BLUR);
}
@ -46557,6 +46565,7 @@ BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE";
BI.Input.EVENT_START = "EVENT_START";
BI.Input.EVENT_PAUSE = "EVENT_PAUSE";
BI.Input.EVENT_STOP = "EVENT_STOP";
BI.Input.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Input.EVENT_REMOVE = "EVENT_REMOVE";
BI.Input.EVENT_EMPTY = "EVENT_EMPTY";
@ -56152,6 +56161,9 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ClearEditor.EVENT_START);
});
@ -56216,6 +56228,7 @@ BI.ClearEditor.EVENT_START = "EVENT_START";
BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ClearEditor.EVENT_STOP = "EVENT_STOP";
BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ClearEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ClearEditor.EVENT_VALID = "EVENT_VALID";
BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56323,6 +56336,11 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ShelterEditor.EVENT_START, arguments);
});
@ -56475,6 +56493,7 @@ BI.ShelterEditor.EVENT_START = "EVENT_START";
BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ShelterEditor.EVENT_STOP = "EVENT_STOP";
BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ShelterEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ShelterEditor.EVENT_VALID = "EVENT_VALID";
BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56586,6 +56605,11 @@ BI.SignEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SignEditor.EVENT_START, arguments);
});
@ -56735,6 +56759,7 @@ BI.SignEditor.EVENT_START = "EVENT_START";
BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SignEditor.EVENT_STOP = "EVENT_STOP";
BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignEditor.EVENT_VALID = "EVENT_VALID";
BI.SignEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SignEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56855,6 +56880,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.StateEditor.EVENT_START, arguments);
});
@ -57018,6 +57047,7 @@ BI.StateEditor.EVENT_START = "EVENT_START";
BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.StateEditor.EVENT_STOP = "EVENT_STOP";
BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.StateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.StateEditor.EVENT_VALID = "EVENT_VALID";
BI.StateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.StateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -57127,6 +57157,10 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments);
});
@ -57276,6 +57310,7 @@ BI.SimpleStateEditor.EVENT_START = "EVENT_START";
BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP";
BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID";
BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -63108,7 +63143,8 @@ BI.extend(BI.DynamicDateCard, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -63147,6 +63183,7 @@ BI.extend(BI.DynamicDateCard, {
min: opts.minDate,
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
height: opts.height,
value: opts.value,
ref: function () {
@ -63740,7 +63777,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -63774,25 +63812,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN);
@ -63851,9 +63871,43 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var c = this._const;
var result = [0, 1, 2];
@ -64049,7 +64103,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -64087,6 +64142,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
type: "bi.dynamic_date_time_trigger",
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
format: opts.format,
height: opts.height,
value: opts.value,
@ -64791,7 +64847,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -64825,25 +64882,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN);
@ -64900,9 +64939,44 @@ BI.extend(BI.DynamicDateTimeSelect, {
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var result = [];
var hasSecond = false;
@ -65217,6 +65291,9 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SearchEditor.EVENT_START);
});
@ -65294,6 +65371,7 @@ BI.SearchEditor.EVENT_START = "EVENT_START";
BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchEditor.EVENT_STOP = "EVENT_STOP";
BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SearchEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SearchEditor.EVENT_VALID = "EVENT_VALID";
BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER";
@ -65404,6 +65482,9 @@ BI.TextEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_REMOVE, function (v) {
self.fireEvent(BI.TextEditor.EVENT_REMOVE);
});
@ -65476,6 +65557,7 @@ BI.TextEditor.EVENT_START = "EVENT_START";
BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.TextEditor.EVENT_STOP = "EVENT_STOP";
BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.TextEditor.EVENT_VALID = "EVENT_VALID";
BI.TextEditor.EVENT_ERROR = "EVENT_ERROR";
BI.TextEditor.EVENT_ENTER = "EVENT_ENTER";
@ -69213,7 +69295,8 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
height: 24,
attributes: {
tabIndex: 0
}
},
allowEdit: true
});
},
@ -69232,6 +69315,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
text: o.text,
// adapter: this.popup,
@ -69995,7 +70079,8 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -70075,6 +70160,20 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -70698,7 +70797,8 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -70775,6 +70875,20 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -73477,7 +73591,8 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-insert-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -73493,6 +73608,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -73762,7 +73878,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-list-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -73778,6 +73895,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -75151,7 +75269,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setFocusEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_FOCUS, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, function () {
self._setTitle("");
switch (self._checkValidation()) {
case c.typeError:
@ -75180,7 +75298,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
},
_setBlurEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_BLUR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR, function () {
BI.Bubbles.hide(c.typeError);
BI.Bubbles.hide(c.numberError);
BI.Bubbles.hide(c.signalError);
@ -75202,7 +75320,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setErrorEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_ERROR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR, function () {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
@ -75215,7 +75333,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setValidEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_VALID, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID, function () {
switch (self._checkValidation()) {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
@ -75240,7 +75358,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setEditorValueChangedEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_CHANGE, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, function () {
switch (self._checkValidation()) {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
@ -75265,7 +75383,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
});
w.on(BI.Editor.EVENT_CONFIRM, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
},
@ -75430,32 +75548,37 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
listeners: [{
eventName: BI.Editor.EVENT_ERROR,
action: function () {
self.fireEvent(BI.Editor.EVENT_ERROR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR, arguments);
}
}, {
eventName: BI.Editor.EVENT_FOCUS,
action: function () {
self.fireEvent(BI.Editor.EVENT_FOCUS, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, arguments);
}
}, {
eventName: BI.Editor.EVENT_BLUR,
action: function () {
self.fireEvent(BI.Editor.EVENT_BLUR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR, arguments);
}
}, {
eventName: BI.Editor.EVENT_VALID,
action: function () {
self.fireEvent(BI.Editor.EVENT_VALID, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.Editor.EVENT_CHANGE, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, arguments);
}
}, {
eventName: BI.Editor.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE_CONFIRM,
action: function () {
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM, arguments);
}
}]
}]
@ -75479,6 +75602,13 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
}
});
BI.NumberIntervalSingleEidtor.EVENT_FOCUS = "EVENT_FOCUS";
BI.NumberIntervalSingleEidtor.EVENT_BLUR = "EVENT_BLUR";
BI.NumberIntervalSingleEidtor.EVENT_ERROR = "EVENT_ERROR";
BI.NumberIntervalSingleEidtor.EVENT_VALID = "EVENT_VALID";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.NumberIntervalSingleEidtor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.number_interval_single_editor", BI.NumberIntervalSingleEidtor);/**
* 季度下拉框
*
@ -79426,6 +79556,11 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_ERROR, function () {
self._checkText();
});
@ -79546,6 +79681,7 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
@ -81163,7 +81299,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
_getTitle: function () {
var storeValue = this.storeValue || {};
return BI.print(BI.getDate(storeValue.year, (storeValue.month - 1), storeValue.day), this._getFormatString());
var date = BI.getDate();
return BI.print(BI.getDate(date.getFullYear(), 0, 1, storeValue.hour, storeValue.minute, storeValue.second), this._getFormatString());
},
_getFormatString: function () {

9
dist/base.js vendored

@ -9022,6 +9022,9 @@ BI.Editor = BI.inherit(BI.Single, {
this.editor.on(BI.Input.EVENT_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM, arguments);
});
this.element.click(function (e) {
e.stopPropagation();
return false;
@ -9166,6 +9169,7 @@ BI.Editor.EVENT_START = "EVENT_START";
BI.Editor.EVENT_PAUSE = "EVENT_PAUSE";
BI.Editor.EVENT_STOP = "EVENT_STOP";
BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Editor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Editor.EVENT_VALID = "EVENT_VALID";
BI.Editor.EVENT_ERROR = "EVENT_ERROR";
BI.Editor.EVENT_ENTER = "EVENT_ENTER";
@ -10476,9 +10480,13 @@ BI.Input = BI.inherit(BI.Single, {
self._isEditing = false;
self._start = false;
if (self.isValid()) {
var lastValidValue = self._lastValidValue;
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
self.fireEvent(BI.Input.EVENT_BLUR);
}
@ -10664,6 +10672,7 @@ BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE";
BI.Input.EVENT_START = "EVENT_START";
BI.Input.EVENT_PAUSE = "EVENT_PAUSE";
BI.Input.EVENT_STOP = "EVENT_STOP";
BI.Input.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Input.EVENT_REMOVE = "EVENT_REMOVE";
BI.Input.EVENT_EMPTY = "EVENT_EMPTY";

257
dist/bundle.ie.js vendored

@ -44511,6 +44511,9 @@ BI.Editor = BI.inherit(BI.Single, {
this.editor.on(BI.Input.EVENT_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM, arguments);
});
this.element.click(function (e) {
e.stopPropagation();
return false;
@ -44655,6 +44658,7 @@ BI.Editor.EVENT_START = "EVENT_START";
BI.Editor.EVENT_PAUSE = "EVENT_PAUSE";
BI.Editor.EVENT_STOP = "EVENT_STOP";
BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Editor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Editor.EVENT_VALID = "EVENT_VALID";
BI.Editor.EVENT_ERROR = "EVENT_ERROR";
BI.Editor.EVENT_ENTER = "EVENT_ENTER";
@ -45965,9 +45969,13 @@ BI.Input = BI.inherit(BI.Single, {
self._isEditing = false;
self._start = false;
if (self.isValid()) {
var lastValidValue = self._lastValidValue;
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
self.fireEvent(BI.Input.EVENT_BLUR);
}
@ -46153,6 +46161,7 @@ BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE";
BI.Input.EVENT_START = "EVENT_START";
BI.Input.EVENT_PAUSE = "EVENT_PAUSE";
BI.Input.EVENT_STOP = "EVENT_STOP";
BI.Input.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Input.EVENT_REMOVE = "EVENT_REMOVE";
BI.Input.EVENT_EMPTY = "EVENT_EMPTY";
@ -55748,6 +55757,9 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ClearEditor.EVENT_START);
});
@ -55812,6 +55824,7 @@ BI.ClearEditor.EVENT_START = "EVENT_START";
BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ClearEditor.EVENT_STOP = "EVENT_STOP";
BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ClearEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ClearEditor.EVENT_VALID = "EVENT_VALID";
BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER";
@ -55919,6 +55932,11 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ShelterEditor.EVENT_START, arguments);
});
@ -56071,6 +56089,7 @@ BI.ShelterEditor.EVENT_START = "EVENT_START";
BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ShelterEditor.EVENT_STOP = "EVENT_STOP";
BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ShelterEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ShelterEditor.EVENT_VALID = "EVENT_VALID";
BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56182,6 +56201,11 @@ BI.SignEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SignEditor.EVENT_START, arguments);
});
@ -56331,6 +56355,7 @@ BI.SignEditor.EVENT_START = "EVENT_START";
BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SignEditor.EVENT_STOP = "EVENT_STOP";
BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignEditor.EVENT_VALID = "EVENT_VALID";
BI.SignEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SignEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56451,6 +56476,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.StateEditor.EVENT_START, arguments);
});
@ -56614,6 +56643,7 @@ BI.StateEditor.EVENT_START = "EVENT_START";
BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.StateEditor.EVENT_STOP = "EVENT_STOP";
BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.StateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.StateEditor.EVENT_VALID = "EVENT_VALID";
BI.StateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.StateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56723,6 +56753,10 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments);
});
@ -56872,6 +56906,7 @@ BI.SimpleStateEditor.EVENT_START = "EVENT_START";
BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP";
BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID";
BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -62704,7 +62739,8 @@ BI.extend(BI.DynamicDateCard, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -62743,6 +62779,7 @@ BI.extend(BI.DynamicDateCard, {
min: opts.minDate,
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
height: opts.height,
value: opts.value,
ref: function () {
@ -63336,7 +63373,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -63370,25 +63408,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN);
@ -63447,9 +63467,43 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var c = this._const;
var result = [0, 1, 2];
@ -63645,7 +63699,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -63683,6 +63738,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
type: "bi.dynamic_date_time_trigger",
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
format: opts.format,
height: opts.height,
value: opts.value,
@ -64387,7 +64443,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -64421,25 +64478,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN);
@ -64496,9 +64535,44 @@ BI.extend(BI.DynamicDateTimeSelect, {
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var result = [];
var hasSecond = false;
@ -64813,6 +64887,9 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SearchEditor.EVENT_START);
});
@ -64890,6 +64967,7 @@ BI.SearchEditor.EVENT_START = "EVENT_START";
BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchEditor.EVENT_STOP = "EVENT_STOP";
BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SearchEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SearchEditor.EVENT_VALID = "EVENT_VALID";
BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER";
@ -65000,6 +65078,9 @@ BI.TextEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_REMOVE, function (v) {
self.fireEvent(BI.TextEditor.EVENT_REMOVE);
});
@ -65072,6 +65153,7 @@ BI.TextEditor.EVENT_START = "EVENT_START";
BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.TextEditor.EVENT_STOP = "EVENT_STOP";
BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.TextEditor.EVENT_VALID = "EVENT_VALID";
BI.TextEditor.EVENT_ERROR = "EVENT_ERROR";
BI.TextEditor.EVENT_ENTER = "EVENT_ENTER";
@ -68809,7 +68891,8 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
height: 24,
attributes: {
tabIndex: 0
}
},
allowEdit: true
});
},
@ -68828,6 +68911,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
text: o.text,
// adapter: this.popup,
@ -69591,7 +69675,8 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -69671,6 +69756,20 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -70294,7 +70393,8 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -70371,6 +70471,20 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -73073,7 +73187,8 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-insert-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -73089,6 +73204,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -73358,7 +73474,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-list-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -73374,6 +73491,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -74747,7 +74865,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setFocusEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_FOCUS, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, function () {
self._setTitle("");
switch (self._checkValidation()) {
case c.typeError:
@ -74776,7 +74894,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
},
_setBlurEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_BLUR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR, function () {
BI.Bubbles.hide(c.typeError);
BI.Bubbles.hide(c.numberError);
BI.Bubbles.hide(c.signalError);
@ -74798,7 +74916,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setErrorEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_ERROR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR, function () {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
@ -74811,7 +74929,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setValidEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_VALID, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID, function () {
switch (self._checkValidation()) {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
@ -74836,7 +74954,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setEditorValueChangedEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_CHANGE, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, function () {
switch (self._checkValidation()) {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
@ -74861,7 +74979,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
});
w.on(BI.Editor.EVENT_CONFIRM, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
},
@ -75026,32 +75144,37 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
listeners: [{
eventName: BI.Editor.EVENT_ERROR,
action: function () {
self.fireEvent(BI.Editor.EVENT_ERROR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR, arguments);
}
}, {
eventName: BI.Editor.EVENT_FOCUS,
action: function () {
self.fireEvent(BI.Editor.EVENT_FOCUS, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, arguments);
}
}, {
eventName: BI.Editor.EVENT_BLUR,
action: function () {
self.fireEvent(BI.Editor.EVENT_BLUR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR, arguments);
}
}, {
eventName: BI.Editor.EVENT_VALID,
action: function () {
self.fireEvent(BI.Editor.EVENT_VALID, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.Editor.EVENT_CHANGE, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, arguments);
}
}, {
eventName: BI.Editor.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE_CONFIRM,
action: function () {
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM, arguments);
}
}]
}]
@ -75075,6 +75198,13 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
}
});
BI.NumberIntervalSingleEidtor.EVENT_FOCUS = "EVENT_FOCUS";
BI.NumberIntervalSingleEidtor.EVENT_BLUR = "EVENT_BLUR";
BI.NumberIntervalSingleEidtor.EVENT_ERROR = "EVENT_ERROR";
BI.NumberIntervalSingleEidtor.EVENT_VALID = "EVENT_VALID";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.NumberIntervalSingleEidtor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.number_interval_single_editor", BI.NumberIntervalSingleEidtor);/**
* 季度下拉框
*
@ -79022,6 +79152,11 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_ERROR, function () {
self._checkText();
});
@ -79142,6 +79277,7 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
@ -80759,7 +80895,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
_getTitle: function () {
var storeValue = this.storeValue || {};
return BI.print(BI.getDate(storeValue.year, (storeValue.month - 1), storeValue.day), this._getFormatString());
var date = BI.getDate();
return BI.print(BI.getDate(date.getFullYear(), 0, 1, storeValue.hour, storeValue.minute, storeValue.second), this._getFormatString());
},
_getFormatString: function () {

257
dist/bundle.js vendored

@ -44915,6 +44915,9 @@ BI.Editor = BI.inherit(BI.Single, {
this.editor.on(BI.Input.EVENT_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM, arguments);
});
this.element.click(function (e) {
e.stopPropagation();
return false;
@ -45059,6 +45062,7 @@ BI.Editor.EVENT_START = "EVENT_START";
BI.Editor.EVENT_PAUSE = "EVENT_PAUSE";
BI.Editor.EVENT_STOP = "EVENT_STOP";
BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Editor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Editor.EVENT_VALID = "EVENT_VALID";
BI.Editor.EVENT_ERROR = "EVENT_ERROR";
BI.Editor.EVENT_ENTER = "EVENT_ENTER";
@ -46369,9 +46373,13 @@ BI.Input = BI.inherit(BI.Single, {
self._isEditing = false;
self._start = false;
if (self.isValid()) {
var lastValidValue = self._lastValidValue;
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
self.fireEvent(BI.Input.EVENT_BLUR);
}
@ -46557,6 +46565,7 @@ BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE";
BI.Input.EVENT_START = "EVENT_START";
BI.Input.EVENT_PAUSE = "EVENT_PAUSE";
BI.Input.EVENT_STOP = "EVENT_STOP";
BI.Input.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Input.EVENT_REMOVE = "EVENT_REMOVE";
BI.Input.EVENT_EMPTY = "EVENT_EMPTY";
@ -56152,6 +56161,9 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ClearEditor.EVENT_START);
});
@ -56216,6 +56228,7 @@ BI.ClearEditor.EVENT_START = "EVENT_START";
BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ClearEditor.EVENT_STOP = "EVENT_STOP";
BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ClearEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ClearEditor.EVENT_VALID = "EVENT_VALID";
BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56323,6 +56336,11 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ShelterEditor.EVENT_START, arguments);
});
@ -56475,6 +56493,7 @@ BI.ShelterEditor.EVENT_START = "EVENT_START";
BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ShelterEditor.EVENT_STOP = "EVENT_STOP";
BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ShelterEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ShelterEditor.EVENT_VALID = "EVENT_VALID";
BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56586,6 +56605,11 @@ BI.SignEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SignEditor.EVENT_START, arguments);
});
@ -56735,6 +56759,7 @@ BI.SignEditor.EVENT_START = "EVENT_START";
BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SignEditor.EVENT_STOP = "EVENT_STOP";
BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignEditor.EVENT_VALID = "EVENT_VALID";
BI.SignEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SignEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56855,6 +56880,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.StateEditor.EVENT_START, arguments);
});
@ -57018,6 +57047,7 @@ BI.StateEditor.EVENT_START = "EVENT_START";
BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.StateEditor.EVENT_STOP = "EVENT_STOP";
BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.StateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.StateEditor.EVENT_VALID = "EVENT_VALID";
BI.StateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.StateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -57127,6 +57157,10 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments);
});
@ -57276,6 +57310,7 @@ BI.SimpleStateEditor.EVENT_START = "EVENT_START";
BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP";
BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID";
BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -63108,7 +63143,8 @@ BI.extend(BI.DynamicDateCard, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -63147,6 +63183,7 @@ BI.extend(BI.DynamicDateCard, {
min: opts.minDate,
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
height: opts.height,
value: opts.value,
ref: function () {
@ -63740,7 +63777,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -63774,25 +63812,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN);
@ -63851,9 +63871,43 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var c = this._const;
var result = [0, 1, 2];
@ -64049,7 +64103,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -64087,6 +64142,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
type: "bi.dynamic_date_time_trigger",
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
format: opts.format,
height: opts.height,
value: opts.value,
@ -64791,7 +64847,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -64825,25 +64882,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN);
@ -64900,9 +64939,44 @@ BI.extend(BI.DynamicDateTimeSelect, {
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var result = [];
var hasSecond = false;
@ -65217,6 +65291,9 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SearchEditor.EVENT_START);
});
@ -65294,6 +65371,7 @@ BI.SearchEditor.EVENT_START = "EVENT_START";
BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchEditor.EVENT_STOP = "EVENT_STOP";
BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SearchEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SearchEditor.EVENT_VALID = "EVENT_VALID";
BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER";
@ -65404,6 +65482,9 @@ BI.TextEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_REMOVE, function (v) {
self.fireEvent(BI.TextEditor.EVENT_REMOVE);
});
@ -65476,6 +65557,7 @@ BI.TextEditor.EVENT_START = "EVENT_START";
BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.TextEditor.EVENT_STOP = "EVENT_STOP";
BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.TextEditor.EVENT_VALID = "EVENT_VALID";
BI.TextEditor.EVENT_ERROR = "EVENT_ERROR";
BI.TextEditor.EVENT_ENTER = "EVENT_ENTER";
@ -69213,7 +69295,8 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
height: 24,
attributes: {
tabIndex: 0
}
},
allowEdit: true
});
},
@ -69232,6 +69315,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
text: o.text,
// adapter: this.popup,
@ -69995,7 +70079,8 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -70075,6 +70160,20 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -70698,7 +70797,8 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -70775,6 +70875,20 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -73477,7 +73591,8 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-insert-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -73493,6 +73608,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -73762,7 +73878,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-list-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -73778,6 +73895,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -75151,7 +75269,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setFocusEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_FOCUS, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, function () {
self._setTitle("");
switch (self._checkValidation()) {
case c.typeError:
@ -75180,7 +75298,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
},
_setBlurEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_BLUR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR, function () {
BI.Bubbles.hide(c.typeError);
BI.Bubbles.hide(c.numberError);
BI.Bubbles.hide(c.signalError);
@ -75202,7 +75320,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setErrorEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_ERROR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR, function () {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
@ -75215,7 +75333,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setValidEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_VALID, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID, function () {
switch (self._checkValidation()) {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
@ -75240,7 +75358,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setEditorValueChangedEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_CHANGE, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, function () {
switch (self._checkValidation()) {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
@ -75265,7 +75383,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
});
w.on(BI.Editor.EVENT_CONFIRM, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
},
@ -75430,32 +75548,37 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
listeners: [{
eventName: BI.Editor.EVENT_ERROR,
action: function () {
self.fireEvent(BI.Editor.EVENT_ERROR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR, arguments);
}
}, {
eventName: BI.Editor.EVENT_FOCUS,
action: function () {
self.fireEvent(BI.Editor.EVENT_FOCUS, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, arguments);
}
}, {
eventName: BI.Editor.EVENT_BLUR,
action: function () {
self.fireEvent(BI.Editor.EVENT_BLUR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR, arguments);
}
}, {
eventName: BI.Editor.EVENT_VALID,
action: function () {
self.fireEvent(BI.Editor.EVENT_VALID, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.Editor.EVENT_CHANGE, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, arguments);
}
}, {
eventName: BI.Editor.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE_CONFIRM,
action: function () {
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM, arguments);
}
}]
}]
@ -75479,6 +75602,13 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
}
});
BI.NumberIntervalSingleEidtor.EVENT_FOCUS = "EVENT_FOCUS";
BI.NumberIntervalSingleEidtor.EVENT_BLUR = "EVENT_BLUR";
BI.NumberIntervalSingleEidtor.EVENT_ERROR = "EVENT_ERROR";
BI.NumberIntervalSingleEidtor.EVENT_VALID = "EVENT_VALID";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.NumberIntervalSingleEidtor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.number_interval_single_editor", BI.NumberIntervalSingleEidtor);/**
* 季度下拉框
*
@ -79426,6 +79556,11 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_ERROR, function () {
self._checkText();
});
@ -79546,6 +79681,7 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
@ -81163,7 +81299,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
_getTitle: function () {
var storeValue = this.storeValue || {};
return BI.print(BI.getDate(storeValue.year, (storeValue.month - 1), storeValue.day), this._getFormatString());
var date = BI.getDate();
return BI.print(BI.getDate(date.getFullYear(), 0, 1, storeValue.hour, storeValue.minute, storeValue.second), this._getFormatString());
},
_getFormatString: function () {

26
dist/case.js vendored

@ -5634,6 +5634,9 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ClearEditor.EVENT_START);
});
@ -5698,6 +5701,7 @@ BI.ClearEditor.EVENT_START = "EVENT_START";
BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ClearEditor.EVENT_STOP = "EVENT_STOP";
BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ClearEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ClearEditor.EVENT_VALID = "EVENT_VALID";
BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER";
@ -5805,6 +5809,11 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ShelterEditor.EVENT_START, arguments);
});
@ -5957,6 +5966,7 @@ BI.ShelterEditor.EVENT_START = "EVENT_START";
BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ShelterEditor.EVENT_STOP = "EVENT_STOP";
BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ShelterEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ShelterEditor.EVENT_VALID = "EVENT_VALID";
BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER";
@ -6068,6 +6078,11 @@ BI.SignEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SignEditor.EVENT_START, arguments);
});
@ -6217,6 +6232,7 @@ BI.SignEditor.EVENT_START = "EVENT_START";
BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SignEditor.EVENT_STOP = "EVENT_STOP";
BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignEditor.EVENT_VALID = "EVENT_VALID";
BI.SignEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SignEditor.EVENT_ENTER = "EVENT_ENTER";
@ -6337,6 +6353,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.StateEditor.EVENT_START, arguments);
});
@ -6500,6 +6520,7 @@ BI.StateEditor.EVENT_START = "EVENT_START";
BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.StateEditor.EVENT_STOP = "EVENT_STOP";
BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.StateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.StateEditor.EVENT_VALID = "EVENT_VALID";
BI.StateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.StateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -6609,6 +6630,10 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments);
});
@ -6758,6 +6783,7 @@ BI.SimpleStateEditor.EVENT_START = "EVENT_START";
BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP";
BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID";
BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER";

3
dist/demo.js vendored

@ -8866,6 +8866,7 @@ Demo.Date = BI.inherit(BI.Widget, {
self.datecombo = this;
},
width: 300,
// allowEdit: false,
// format: "%Y-%X-%d", // yyyy-MM-dd
// format: "%Y/%X/%d", // yyyy/MM/dd
// format: "%Y-%x-%e", // yyyy-M-d
@ -8896,6 +8897,7 @@ Demo.Date = BI.inherit(BI.Widget, {
self.datetimecombo = this;
},
width: 300,
// allowEdit: false,
// format: "%Y-%X-%d %H:%M:%S", // yyyy-MM-dd HH:mm:ss
// format: "%Y/%X/%d %H:%M:%S", // yyyy/MM/dd HH:mm:ss
// format: "%Y-%X-%d %I:%M:%S", // yyyy-MM-dd hh:mm:ss
@ -9286,6 +9288,7 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
var self = this;
var widget = BI.createWidget({
type: "bi.multi_select_insert_combo",
// allowEdit: false,
itemsCreator: BI.bind(this._itemsCreator, this),
width: 200,
value: {

257
dist/fineui.ie.js vendored

@ -44756,6 +44756,9 @@ BI.Editor = BI.inherit(BI.Single, {
this.editor.on(BI.Input.EVENT_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM, arguments);
});
this.element.click(function (e) {
e.stopPropagation();
return false;
@ -44900,6 +44903,7 @@ BI.Editor.EVENT_START = "EVENT_START";
BI.Editor.EVENT_PAUSE = "EVENT_PAUSE";
BI.Editor.EVENT_STOP = "EVENT_STOP";
BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Editor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Editor.EVENT_VALID = "EVENT_VALID";
BI.Editor.EVENT_ERROR = "EVENT_ERROR";
BI.Editor.EVENT_ENTER = "EVENT_ENTER";
@ -46210,9 +46214,13 @@ BI.Input = BI.inherit(BI.Single, {
self._isEditing = false;
self._start = false;
if (self.isValid()) {
var lastValidValue = self._lastValidValue;
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
self.fireEvent(BI.Input.EVENT_BLUR);
}
@ -46398,6 +46406,7 @@ BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE";
BI.Input.EVENT_START = "EVENT_START";
BI.Input.EVENT_PAUSE = "EVENT_PAUSE";
BI.Input.EVENT_STOP = "EVENT_STOP";
BI.Input.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Input.EVENT_REMOVE = "EVENT_REMOVE";
BI.Input.EVENT_EMPTY = "EVENT_EMPTY";
@ -55993,6 +56002,9 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ClearEditor.EVENT_START);
});
@ -56057,6 +56069,7 @@ BI.ClearEditor.EVENT_START = "EVENT_START";
BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ClearEditor.EVENT_STOP = "EVENT_STOP";
BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ClearEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ClearEditor.EVENT_VALID = "EVENT_VALID";
BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56164,6 +56177,11 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ShelterEditor.EVENT_START, arguments);
});
@ -56316,6 +56334,7 @@ BI.ShelterEditor.EVENT_START = "EVENT_START";
BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ShelterEditor.EVENT_STOP = "EVENT_STOP";
BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ShelterEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ShelterEditor.EVENT_VALID = "EVENT_VALID";
BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56427,6 +56446,11 @@ BI.SignEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SignEditor.EVENT_START, arguments);
});
@ -56576,6 +56600,7 @@ BI.SignEditor.EVENT_START = "EVENT_START";
BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SignEditor.EVENT_STOP = "EVENT_STOP";
BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignEditor.EVENT_VALID = "EVENT_VALID";
BI.SignEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SignEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56696,6 +56721,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.StateEditor.EVENT_START, arguments);
});
@ -56859,6 +56888,7 @@ BI.StateEditor.EVENT_START = "EVENT_START";
BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.StateEditor.EVENT_STOP = "EVENT_STOP";
BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.StateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.StateEditor.EVENT_VALID = "EVENT_VALID";
BI.StateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.StateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56968,6 +56998,10 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments);
});
@ -57117,6 +57151,7 @@ BI.SimpleStateEditor.EVENT_START = "EVENT_START";
BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP";
BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID";
BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -62949,7 +62984,8 @@ BI.extend(BI.DynamicDateCard, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -62988,6 +63024,7 @@ BI.extend(BI.DynamicDateCard, {
min: opts.minDate,
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
height: opts.height,
value: opts.value,
ref: function () {
@ -63581,7 +63618,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -63615,25 +63653,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN);
@ -63692,9 +63712,43 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var c = this._const;
var result = [0, 1, 2];
@ -63890,7 +63944,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -63928,6 +63983,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
type: "bi.dynamic_date_time_trigger",
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
format: opts.format,
height: opts.height,
value: opts.value,
@ -64632,7 +64688,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -64666,25 +64723,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN);
@ -64741,9 +64780,44 @@ BI.extend(BI.DynamicDateTimeSelect, {
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var result = [];
var hasSecond = false;
@ -65058,6 +65132,9 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SearchEditor.EVENT_START);
});
@ -65135,6 +65212,7 @@ BI.SearchEditor.EVENT_START = "EVENT_START";
BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchEditor.EVENT_STOP = "EVENT_STOP";
BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SearchEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SearchEditor.EVENT_VALID = "EVENT_VALID";
BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER";
@ -65245,6 +65323,9 @@ BI.TextEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_REMOVE, function (v) {
self.fireEvent(BI.TextEditor.EVENT_REMOVE);
});
@ -65317,6 +65398,7 @@ BI.TextEditor.EVENT_START = "EVENT_START";
BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.TextEditor.EVENT_STOP = "EVENT_STOP";
BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.TextEditor.EVENT_VALID = "EVENT_VALID";
BI.TextEditor.EVENT_ERROR = "EVENT_ERROR";
BI.TextEditor.EVENT_ENTER = "EVENT_ENTER";
@ -69054,7 +69136,8 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
height: 24,
attributes: {
tabIndex: 0
}
},
allowEdit: true
});
},
@ -69073,6 +69156,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
text: o.text,
// adapter: this.popup,
@ -69836,7 +69920,8 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -69916,6 +70001,20 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -70539,7 +70638,8 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -70616,6 +70716,20 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -73318,7 +73432,8 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-insert-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -73334,6 +73449,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -73603,7 +73719,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-list-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -73619,6 +73736,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -74992,7 +75110,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setFocusEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_FOCUS, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, function () {
self._setTitle("");
switch (self._checkValidation()) {
case c.typeError:
@ -75021,7 +75139,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
},
_setBlurEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_BLUR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR, function () {
BI.Bubbles.hide(c.typeError);
BI.Bubbles.hide(c.numberError);
BI.Bubbles.hide(c.signalError);
@ -75043,7 +75161,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setErrorEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_ERROR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR, function () {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
@ -75056,7 +75174,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setValidEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_VALID, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID, function () {
switch (self._checkValidation()) {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
@ -75081,7 +75199,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setEditorValueChangedEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_CHANGE, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, function () {
switch (self._checkValidation()) {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
@ -75106,7 +75224,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
});
w.on(BI.Editor.EVENT_CONFIRM, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
},
@ -75271,32 +75389,37 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
listeners: [{
eventName: BI.Editor.EVENT_ERROR,
action: function () {
self.fireEvent(BI.Editor.EVENT_ERROR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR, arguments);
}
}, {
eventName: BI.Editor.EVENT_FOCUS,
action: function () {
self.fireEvent(BI.Editor.EVENT_FOCUS, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, arguments);
}
}, {
eventName: BI.Editor.EVENT_BLUR,
action: function () {
self.fireEvent(BI.Editor.EVENT_BLUR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR, arguments);
}
}, {
eventName: BI.Editor.EVENT_VALID,
action: function () {
self.fireEvent(BI.Editor.EVENT_VALID, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.Editor.EVENT_CHANGE, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, arguments);
}
}, {
eventName: BI.Editor.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE_CONFIRM,
action: function () {
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM, arguments);
}
}]
}]
@ -75320,6 +75443,13 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
}
});
BI.NumberIntervalSingleEidtor.EVENT_FOCUS = "EVENT_FOCUS";
BI.NumberIntervalSingleEidtor.EVENT_BLUR = "EVENT_BLUR";
BI.NumberIntervalSingleEidtor.EVENT_ERROR = "EVENT_ERROR";
BI.NumberIntervalSingleEidtor.EVENT_VALID = "EVENT_VALID";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.NumberIntervalSingleEidtor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.number_interval_single_editor", BI.NumberIntervalSingleEidtor);/**
* 季度下拉框
*
@ -79267,6 +79397,11 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_ERROR, function () {
self._checkText();
});
@ -79387,6 +79522,7 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
@ -81004,7 +81140,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
_getTitle: function () {
var storeValue = this.storeValue || {};
return BI.print(BI.getDate(storeValue.year, (storeValue.month - 1), storeValue.day), this._getFormatString());
var date = BI.getDate();
return BI.print(BI.getDate(date.getFullYear(), 0, 1, storeValue.hour, storeValue.minute, storeValue.second), this._getFormatString());
},
_getFormatString: function () {

257
dist/fineui.js vendored

@ -45160,6 +45160,9 @@ BI.Editor = BI.inherit(BI.Single, {
this.editor.on(BI.Input.EVENT_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM, arguments);
});
this.element.click(function (e) {
e.stopPropagation();
return false;
@ -45304,6 +45307,7 @@ BI.Editor.EVENT_START = "EVENT_START";
BI.Editor.EVENT_PAUSE = "EVENT_PAUSE";
BI.Editor.EVENT_STOP = "EVENT_STOP";
BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Editor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Editor.EVENT_VALID = "EVENT_VALID";
BI.Editor.EVENT_ERROR = "EVENT_ERROR";
BI.Editor.EVENT_ENTER = "EVENT_ENTER";
@ -46614,9 +46618,13 @@ BI.Input = BI.inherit(BI.Single, {
self._isEditing = false;
self._start = false;
if (self.isValid()) {
var lastValidValue = self._lastValidValue;
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
self.fireEvent(BI.Input.EVENT_BLUR);
}
@ -46802,6 +46810,7 @@ BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE";
BI.Input.EVENT_START = "EVENT_START";
BI.Input.EVENT_PAUSE = "EVENT_PAUSE";
BI.Input.EVENT_STOP = "EVENT_STOP";
BI.Input.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Input.EVENT_REMOVE = "EVENT_REMOVE";
BI.Input.EVENT_EMPTY = "EVENT_EMPTY";
@ -56397,6 +56406,9 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ClearEditor.EVENT_START);
});
@ -56461,6 +56473,7 @@ BI.ClearEditor.EVENT_START = "EVENT_START";
BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ClearEditor.EVENT_STOP = "EVENT_STOP";
BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ClearEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ClearEditor.EVENT_VALID = "EVENT_VALID";
BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56568,6 +56581,11 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ShelterEditor.EVENT_START, arguments);
});
@ -56720,6 +56738,7 @@ BI.ShelterEditor.EVENT_START = "EVENT_START";
BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ShelterEditor.EVENT_STOP = "EVENT_STOP";
BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ShelterEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ShelterEditor.EVENT_VALID = "EVENT_VALID";
BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER";
@ -56831,6 +56850,11 @@ BI.SignEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SignEditor.EVENT_START, arguments);
});
@ -56980,6 +57004,7 @@ BI.SignEditor.EVENT_START = "EVENT_START";
BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SignEditor.EVENT_STOP = "EVENT_STOP";
BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignEditor.EVENT_VALID = "EVENT_VALID";
BI.SignEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SignEditor.EVENT_ENTER = "EVENT_ENTER";
@ -57100,6 +57125,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.StateEditor.EVENT_START, arguments);
});
@ -57263,6 +57292,7 @@ BI.StateEditor.EVENT_START = "EVENT_START";
BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.StateEditor.EVENT_STOP = "EVENT_STOP";
BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.StateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.StateEditor.EVENT_VALID = "EVENT_VALID";
BI.StateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.StateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -57372,6 +57402,10 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments);
});
@ -57521,6 +57555,7 @@ BI.SimpleStateEditor.EVENT_START = "EVENT_START";
BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP";
BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID";
BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -63353,7 +63388,8 @@ BI.extend(BI.DynamicDateCard, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -63392,6 +63428,7 @@ BI.extend(BI.DynamicDateCard, {
min: opts.minDate,
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
height: opts.height,
value: opts.value,
ref: function () {
@ -63985,7 +64022,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -64019,25 +64057,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN);
@ -64096,9 +64116,43 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var c = this._const;
var result = [0, 1, 2];
@ -64294,7 +64348,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -64332,6 +64387,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
type: "bi.dynamic_date_time_trigger",
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
format: opts.format,
height: opts.height,
value: opts.value,
@ -65036,7 +65092,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -65070,25 +65127,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN);
@ -65145,9 +65184,44 @@ BI.extend(BI.DynamicDateTimeSelect, {
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var result = [];
var hasSecond = false;
@ -65462,6 +65536,9 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SearchEditor.EVENT_START);
});
@ -65539,6 +65616,7 @@ BI.SearchEditor.EVENT_START = "EVENT_START";
BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchEditor.EVENT_STOP = "EVENT_STOP";
BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SearchEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SearchEditor.EVENT_VALID = "EVENT_VALID";
BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER";
@ -65649,6 +65727,9 @@ BI.TextEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_REMOVE, function (v) {
self.fireEvent(BI.TextEditor.EVENT_REMOVE);
});
@ -65721,6 +65802,7 @@ BI.TextEditor.EVENT_START = "EVENT_START";
BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.TextEditor.EVENT_STOP = "EVENT_STOP";
BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.TextEditor.EVENT_VALID = "EVENT_VALID";
BI.TextEditor.EVENT_ERROR = "EVENT_ERROR";
BI.TextEditor.EVENT_ENTER = "EVENT_ENTER";
@ -69458,7 +69540,8 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
height: 24,
attributes: {
tabIndex: 0
}
},
allowEdit: true
});
},
@ -69477,6 +69560,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
text: o.text,
// adapter: this.popup,
@ -70240,7 +70324,8 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -70320,6 +70405,20 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -70943,7 +71042,8 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -71020,6 +71120,20 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -73722,7 +73836,8 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-insert-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -73738,6 +73853,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -74007,7 +74123,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-list-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -74023,6 +74140,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -75396,7 +75514,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setFocusEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_FOCUS, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, function () {
self._setTitle("");
switch (self._checkValidation()) {
case c.typeError:
@ -75425,7 +75543,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
},
_setBlurEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_BLUR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR, function () {
BI.Bubbles.hide(c.typeError);
BI.Bubbles.hide(c.numberError);
BI.Bubbles.hide(c.signalError);
@ -75447,7 +75565,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setErrorEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_ERROR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR, function () {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
@ -75460,7 +75578,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setValidEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_VALID, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID, function () {
switch (self._checkValidation()) {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
@ -75485,7 +75603,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setEditorValueChangedEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_CHANGE, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, function () {
switch (self._checkValidation()) {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
@ -75510,7 +75628,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
});
w.on(BI.Editor.EVENT_CONFIRM, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
},
@ -75675,32 +75793,37 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
listeners: [{
eventName: BI.Editor.EVENT_ERROR,
action: function () {
self.fireEvent(BI.Editor.EVENT_ERROR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR, arguments);
}
}, {
eventName: BI.Editor.EVENT_FOCUS,
action: function () {
self.fireEvent(BI.Editor.EVENT_FOCUS, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, arguments);
}
}, {
eventName: BI.Editor.EVENT_BLUR,
action: function () {
self.fireEvent(BI.Editor.EVENT_BLUR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR, arguments);
}
}, {
eventName: BI.Editor.EVENT_VALID,
action: function () {
self.fireEvent(BI.Editor.EVENT_VALID, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.Editor.EVENT_CHANGE, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, arguments);
}
}, {
eventName: BI.Editor.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE_CONFIRM,
action: function () {
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM, arguments);
}
}]
}]
@ -75724,6 +75847,13 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
}
});
BI.NumberIntervalSingleEidtor.EVENT_FOCUS = "EVENT_FOCUS";
BI.NumberIntervalSingleEidtor.EVENT_BLUR = "EVENT_BLUR";
BI.NumberIntervalSingleEidtor.EVENT_ERROR = "EVENT_ERROR";
BI.NumberIntervalSingleEidtor.EVENT_VALID = "EVENT_VALID";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.NumberIntervalSingleEidtor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.number_interval_single_editor", BI.NumberIntervalSingleEidtor);/**
* 季度下拉框
*
@ -79671,6 +79801,11 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_ERROR, function () {
self._checkText();
});
@ -79791,6 +79926,7 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
@ -81408,7 +81544,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
_getTitle: function () {
var storeValue = this.storeValue || {};
return BI.print(BI.getDate(storeValue.year, (storeValue.month - 1), storeValue.day), this._getFormatString());
var date = BI.getDate();
return BI.print(BI.getDate(date.getFullYear(), 0, 1, storeValue.hour, storeValue.minute, storeValue.second), this._getFormatString());
},
_getFormatString: function () {

257
dist/fineui_without_jquery_polyfill.js vendored

@ -32339,6 +32339,9 @@ BI.Editor = BI.inherit(BI.Single, {
this.editor.on(BI.Input.EVENT_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM, arguments);
});
this.element.click(function (e) {
e.stopPropagation();
return false;
@ -32483,6 +32486,7 @@ BI.Editor.EVENT_START = "EVENT_START";
BI.Editor.EVENT_PAUSE = "EVENT_PAUSE";
BI.Editor.EVENT_STOP = "EVENT_STOP";
BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Editor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Editor.EVENT_VALID = "EVENT_VALID";
BI.Editor.EVENT_ERROR = "EVENT_ERROR";
BI.Editor.EVENT_ENTER = "EVENT_ENTER";
@ -33168,9 +33172,13 @@ BI.Input = BI.inherit(BI.Single, {
self._isEditing = false;
self._start = false;
if (self.isValid()) {
var lastValidValue = self._lastValidValue;
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
self.fireEvent(BI.Input.EVENT_BLUR);
}
@ -33356,6 +33364,7 @@ BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE";
BI.Input.EVENT_START = "EVENT_START";
BI.Input.EVENT_PAUSE = "EVENT_PAUSE";
BI.Input.EVENT_STOP = "EVENT_STOP";
BI.Input.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Input.EVENT_REMOVE = "EVENT_REMOVE";
BI.Input.EVENT_EMPTY = "EVENT_EMPTY";
@ -39065,6 +39074,9 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ClearEditor.EVENT_START);
});
@ -39129,6 +39141,7 @@ BI.ClearEditor.EVENT_START = "EVENT_START";
BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ClearEditor.EVENT_STOP = "EVENT_STOP";
BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ClearEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ClearEditor.EVENT_VALID = "EVENT_VALID";
BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER";
@ -39236,6 +39249,11 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ShelterEditor.EVENT_START, arguments);
});
@ -39388,6 +39406,7 @@ BI.ShelterEditor.EVENT_START = "EVENT_START";
BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ShelterEditor.EVENT_STOP = "EVENT_STOP";
BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ShelterEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ShelterEditor.EVENT_VALID = "EVENT_VALID";
BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER";
@ -39499,6 +39518,11 @@ BI.SignEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SignEditor.EVENT_START, arguments);
});
@ -39648,6 +39672,7 @@ BI.SignEditor.EVENT_START = "EVENT_START";
BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SignEditor.EVENT_STOP = "EVENT_STOP";
BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignEditor.EVENT_VALID = "EVENT_VALID";
BI.SignEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SignEditor.EVENT_ENTER = "EVENT_ENTER";
@ -39768,6 +39793,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.StateEditor.EVENT_START, arguments);
});
@ -39931,6 +39960,7 @@ BI.StateEditor.EVENT_START = "EVENT_START";
BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.StateEditor.EVENT_STOP = "EVENT_STOP";
BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.StateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.StateEditor.EVENT_VALID = "EVENT_VALID";
BI.StateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.StateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -40040,6 +40070,10 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments);
});
@ -40189,6 +40223,7 @@ BI.SimpleStateEditor.EVENT_START = "EVENT_START";
BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP";
BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID";
BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER";
@ -45745,7 +45780,8 @@ BI.extend(BI.DynamicDateCard, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -45784,6 +45820,7 @@ BI.extend(BI.DynamicDateCard, {
min: opts.minDate,
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
height: opts.height,
value: opts.value,
ref: function () {
@ -46377,7 +46414,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -46411,25 +46449,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN);
@ -46488,9 +46508,43 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var c = this._const;
var result = [0, 1, 2];
@ -46686,7 +46740,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -46724,6 +46779,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
type: "bi.dynamic_date_time_trigger",
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
format: opts.format,
height: opts.height,
value: opts.value,
@ -47428,7 +47484,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -47462,25 +47519,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN);
@ -47537,9 +47576,44 @@ BI.extend(BI.DynamicDateTimeSelect, {
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var result = [];
var hasSecond = false;
@ -47854,6 +47928,9 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SearchEditor.EVENT_START);
});
@ -47931,6 +48008,7 @@ BI.SearchEditor.EVENT_START = "EVENT_START";
BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchEditor.EVENT_STOP = "EVENT_STOP";
BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SearchEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SearchEditor.EVENT_VALID = "EVENT_VALID";
BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER";
@ -48041,6 +48119,9 @@ BI.TextEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_REMOVE, function (v) {
self.fireEvent(BI.TextEditor.EVENT_REMOVE);
});
@ -48113,6 +48194,7 @@ BI.TextEditor.EVENT_START = "EVENT_START";
BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.TextEditor.EVENT_STOP = "EVENT_STOP";
BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.TextEditor.EVENT_VALID = "EVENT_VALID";
BI.TextEditor.EVENT_ERROR = "EVENT_ERROR";
BI.TextEditor.EVENT_ENTER = "EVENT_ENTER";
@ -51850,7 +51932,8 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
height: 24,
attributes: {
tabIndex: 0
}
},
allowEdit: true
});
},
@ -51869,6 +51952,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
text: o.text,
// adapter: this.popup,
@ -52632,7 +52716,8 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -52712,6 +52797,20 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -53335,7 +53434,8 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -53412,6 +53512,20 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -56114,7 +56228,8 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-insert-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -56130,6 +56245,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -56399,7 +56515,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-list-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -56415,6 +56532,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -57788,7 +57906,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setFocusEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_FOCUS, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, function () {
self._setTitle("");
switch (self._checkValidation()) {
case c.typeError:
@ -57817,7 +57935,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
},
_setBlurEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_BLUR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR, function () {
BI.Bubbles.hide(c.typeError);
BI.Bubbles.hide(c.numberError);
BI.Bubbles.hide(c.signalError);
@ -57839,7 +57957,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setErrorEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_ERROR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR, function () {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
@ -57852,7 +57970,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setValidEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_VALID, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID, function () {
switch (self._checkValidation()) {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
@ -57877,7 +57995,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setEditorValueChangedEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_CHANGE, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, function () {
switch (self._checkValidation()) {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
@ -57902,7 +58020,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
});
w.on(BI.Editor.EVENT_CONFIRM, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
},
@ -58067,32 +58185,37 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
listeners: [{
eventName: BI.Editor.EVENT_ERROR,
action: function () {
self.fireEvent(BI.Editor.EVENT_ERROR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR, arguments);
}
}, {
eventName: BI.Editor.EVENT_FOCUS,
action: function () {
self.fireEvent(BI.Editor.EVENT_FOCUS, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, arguments);
}
}, {
eventName: BI.Editor.EVENT_BLUR,
action: function () {
self.fireEvent(BI.Editor.EVENT_BLUR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR, arguments);
}
}, {
eventName: BI.Editor.EVENT_VALID,
action: function () {
self.fireEvent(BI.Editor.EVENT_VALID, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.Editor.EVENT_CHANGE, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, arguments);
}
}, {
eventName: BI.Editor.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE_CONFIRM,
action: function () {
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM, arguments);
}
}]
}]
@ -58116,6 +58239,13 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
}
});
BI.NumberIntervalSingleEidtor.EVENT_FOCUS = "EVENT_FOCUS";
BI.NumberIntervalSingleEidtor.EVENT_BLUR = "EVENT_BLUR";
BI.NumberIntervalSingleEidtor.EVENT_ERROR = "EVENT_ERROR";
BI.NumberIntervalSingleEidtor.EVENT_VALID = "EVENT_VALID";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.NumberIntervalSingleEidtor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.number_interval_single_editor", BI.NumberIntervalSingleEidtor);/**
* 季度下拉框
*
@ -62063,6 +62193,11 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_ERROR, function () {
self._checkText();
});
@ -62183,6 +62318,7 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
@ -63800,7 +63936,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
_getTitle: function () {
var storeValue = this.storeValue || {};
return BI.print(BI.getDate(storeValue.year, (storeValue.month - 1), storeValue.day), this._getFormatString());
var date = BI.getDate();
return BI.print(BI.getDate(date.getFullYear(), 0, 1, storeValue.hour, storeValue.minute, storeValue.second), this._getFormatString());
},
_getFormatString: function () {

222
dist/widget.js vendored

@ -2711,7 +2711,8 @@ BI.extend(BI.DynamicDateCard, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -2750,6 +2751,7 @@ BI.extend(BI.DynamicDateCard, {
min: opts.minDate,
max: opts.maxDate,
format: opts.format,
allowEdit: opts.allowEdit,
height: opts.height,
value: opts.value,
ref: function () {
@ -3343,7 +3345,8 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -3377,25 +3380,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN);
@ -3454,9 +3439,43 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.getDate();
date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var c = this._const;
var result = [0, 1, 2];
@ -3652,7 +3671,8 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
height: 22,
minDate: "1900-01-01",
maxDate: "2099-12-31",
format: ""
format: "",
allowEdit: true
},
@ -3690,6 +3710,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
type: "bi.dynamic_date_time_trigger",
min: opts.minDate,
max: opts.maxDate,
allowEdit: opts.allowEdit,
format: opts.format,
height: opts.height,
value: opts.value,
@ -4394,7 +4415,8 @@ BI.extend(BI.DynamicDateTimeSelect, {
min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期
height: 24,
format: "" // 显示的日期格式化方式
format: "", // 显示的日期格式化方式
allowEdit: true // 是否允许编辑
},
_init: function () {
@ -4428,25 +4450,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}
return str;
},
title: function () {
var storeValue = self.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = self._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, self._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), self._getFormatString());
}
}
title: BI.bind(this._getTitle, this)
});
this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN);
@ -4503,9 +4507,44 @@ BI.extend(BI.DynamicDateTimeSelect, {
width: 24
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.text",
title: BI.bind(this._getTitle, this)
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.setValue(o.value);
},
_getTitle: function () {
var storeValue = this.storeValue || {};
var type = storeValue.type || BI.DynamicDateCombo.Static;
var value = storeValue.value;
switch (type) {
case BI.DynamicDateCombo.Dynamic:
var text = this._getText(value);
var date = BI.DynamicDateHelper.getCalculation(value);
var dateStr = BI.print(date, this._getFormatString());
return BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr);
case BI.DynamicDateCombo.Static:
default:
if (BI.isNull(value) || BI.isNull(value.day)) {
return "";
}
return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,
value.second || 0), this._getFormatString());
}
},
_getStandardDateStr: function (v) {
var result = [];
var hasSecond = false;
@ -4820,6 +4859,9 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SearchEditor.EVENT_START);
});
@ -4897,6 +4939,7 @@ BI.SearchEditor.EVENT_START = "EVENT_START";
BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchEditor.EVENT_STOP = "EVENT_STOP";
BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SearchEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SearchEditor.EVENT_VALID = "EVENT_VALID";
BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER";
@ -5007,6 +5050,9 @@ BI.TextEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_REMOVE, function (v) {
self.fireEvent(BI.TextEditor.EVENT_REMOVE);
});
@ -5079,6 +5125,7 @@ BI.TextEditor.EVENT_START = "EVENT_START";
BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.TextEditor.EVENT_STOP = "EVENT_STOP";
BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.TextEditor.EVENT_VALID = "EVENT_VALID";
BI.TextEditor.EVENT_ERROR = "EVENT_ERROR";
BI.TextEditor.EVENT_ENTER = "EVENT_ENTER";
@ -8816,7 +8863,8 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
height: 24,
attributes: {
tabIndex: 0
}
},
allowEdit: true
});
},
@ -8835,6 +8883,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_insert_trigger",
allowEdit: o.allowEdit,
height: o.height,
text: o.text,
// adapter: this.popup,
@ -9598,7 +9647,8 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -9678,6 +9728,20 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -10301,7 +10365,8 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
switcher: {},
adapter: null,
masker: {}
masker: {},
allowEdit: true
});
},
@ -10378,6 +10443,20 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
}]
});
!o.allowEdit && BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: {
type: "bi.layout"
},
left: 0,
right: 24,
top: 0,
bottom: 0
}]
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
wrapper.attr("items")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);
@ -13080,7 +13159,8 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-insert-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -13096,6 +13176,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -13365,7 +13446,8 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-tree-list-combo",
itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn,
height: 24
height: 24,
allowEdit: true
});
},
@ -13381,6 +13463,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
this.trigger = BI.createWidget({
type: "bi.multi_select_trigger",
allowEdit: o.allowEdit,
height: o.height,
valueFormatter: o.valueFormatter,
// adapter: this.popup,
@ -14754,7 +14837,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setFocusEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_FOCUS, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, function () {
self._setTitle("");
switch (self._checkValidation()) {
case c.typeError:
@ -14783,7 +14866,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
},
_setBlurEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_BLUR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR, function () {
BI.Bubbles.hide(c.typeError);
BI.Bubbles.hide(c.numberError);
BI.Bubbles.hide(c.signalError);
@ -14805,7 +14888,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setErrorEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_ERROR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR, function () {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
@ -14818,7 +14901,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setValidEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_VALID, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID, function () {
switch (self._checkValidation()) {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
@ -14843,7 +14926,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setEditorValueChangedEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_CHANGE, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, function () {
switch (self._checkValidation()) {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
@ -14868,7 +14951,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
});
w.on(BI.Editor.EVENT_CONFIRM, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
},
@ -15033,32 +15116,37 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
listeners: [{
eventName: BI.Editor.EVENT_ERROR,
action: function () {
self.fireEvent(BI.Editor.EVENT_ERROR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR, arguments);
}
}, {
eventName: BI.Editor.EVENT_FOCUS,
action: function () {
self.fireEvent(BI.Editor.EVENT_FOCUS, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, arguments);
}
}, {
eventName: BI.Editor.EVENT_BLUR,
action: function () {
self.fireEvent(BI.Editor.EVENT_BLUR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR, arguments);
}
}, {
eventName: BI.Editor.EVENT_VALID,
action: function () {
self.fireEvent(BI.Editor.EVENT_VALID, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.Editor.EVENT_CHANGE, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, arguments);
}
}, {
eventName: BI.Editor.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE_CONFIRM,
action: function () {
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM, arguments);
}
}]
}]
@ -15082,6 +15170,13 @@ BI.shortcut("bi.number_interval", BI.NumberInterval);BI.NumberIntervalSingleEidt
}
});
BI.NumberIntervalSingleEidtor.EVENT_FOCUS = "EVENT_FOCUS";
BI.NumberIntervalSingleEidtor.EVENT_BLUR = "EVENT_BLUR";
BI.NumberIntervalSingleEidtor.EVENT_ERROR = "EVENT_ERROR";
BI.NumberIntervalSingleEidtor.EVENT_VALID = "EVENT_VALID";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.NumberIntervalSingleEidtor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.number_interval_single_editor", BI.NumberIntervalSingleEidtor);/**
* 季度下拉框
*
@ -19029,6 +19124,11 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_ERROR, function () {
self._checkText();
});
@ -19149,6 +19249,7 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
@ -20766,7 +20867,8 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
_getTitle: function () {
var storeValue = this.storeValue || {};
return BI.print(BI.getDate(storeValue.year, (storeValue.month - 1), storeValue.day), this._getFormatString());
var date = BI.getDate();
return BI.print(BI.getDate(date.getFullYear(), 0, 1, storeValue.hour, storeValue.minute, storeValue.second), this._getFormatString());
},
_getFormatString: function () {

4
src/base/single/editor/editor.js

@ -185,6 +185,9 @@ BI.Editor = BI.inherit(BI.Single, {
this.editor.on(BI.Input.EVENT_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM, arguments);
});
this.element.click(function (e) {
e.stopPropagation();
return false;
@ -329,6 +332,7 @@ BI.Editor.EVENT_START = "EVENT_START";
BI.Editor.EVENT_PAUSE = "EVENT_PAUSE";
BI.Editor.EVENT_STOP = "EVENT_STOP";
BI.Editor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Editor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Editor.EVENT_VALID = "EVENT_VALID";
BI.Editor.EVENT_ERROR = "EVENT_ERROR";
BI.Editor.EVENT_ENTER = "EVENT_ENTER";

5
src/base/single/input/input.js

@ -111,9 +111,13 @@ BI.Input = BI.inherit(BI.Single, {
self._isEditing = false;
self._start = false;
if (self.isValid()) {
var lastValidValue = self._lastValidValue;
self._lastValidValue = self.getValue();
self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);
self.fireEvent(BI.Input.EVENT_CONFIRM);
if(self._lastValidValue !== lastValidValue) {
self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);
}
}
self.fireEvent(BI.Input.EVENT_BLUR);
}
@ -299,6 +303,7 @@ BI.Input.EVENT_BACKSPACE = "EVENT_BACKSPACE";
BI.Input.EVENT_START = "EVENT_START";
BI.Input.EVENT_PAUSE = "EVENT_PAUSE";
BI.Input.EVENT_STOP = "EVENT_STOP";
BI.Input.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.Input.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.Input.EVENT_REMOVE = "EVENT_REMOVE";
BI.Input.EVENT_EMPTY = "EVENT_EMPTY";

4
src/case/editor/editor.clear.js

@ -101,6 +101,9 @@ BI.ClearEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ClearEditor.EVENT_START);
});
@ -165,6 +168,7 @@ BI.ClearEditor.EVENT_START = "EVENT_START";
BI.ClearEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ClearEditor.EVENT_STOP = "EVENT_STOP";
BI.ClearEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ClearEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ClearEditor.EVENT_VALID = "EVENT_VALID";
BI.ClearEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ClearEditor.EVENT_ENTER = "EVENT_ENTER";

6
src/case/editor/editor.shelter.js

@ -99,6 +99,11 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.ShelterEditor.EVENT_START, arguments);
});
@ -251,6 +256,7 @@ BI.ShelterEditor.EVENT_START = "EVENT_START";
BI.ShelterEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.ShelterEditor.EVENT_STOP = "EVENT_STOP";
BI.ShelterEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.ShelterEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.ShelterEditor.EVENT_VALID = "EVENT_VALID";
BI.ShelterEditor.EVENT_ERROR = "EVENT_ERROR";
BI.ShelterEditor.EVENT_ENTER = "EVENT_ENTER";

6
src/case/editor/editor.sign.js

@ -101,6 +101,11 @@ BI.SignEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SignEditor.EVENT_START, arguments);
});
@ -250,6 +255,7 @@ BI.SignEditor.EVENT_START = "EVENT_START";
BI.SignEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SignEditor.EVENT_STOP = "EVENT_STOP";
BI.SignEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignEditor.EVENT_VALID = "EVENT_VALID";
BI.SignEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SignEditor.EVENT_ENTER = "EVENT_ENTER";

5
src/case/editor/editor.state.js

@ -111,6 +111,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.StateEditor.EVENT_START, arguments);
});
@ -274,6 +278,7 @@ BI.StateEditor.EVENT_START = "EVENT_START";
BI.StateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.StateEditor.EVENT_STOP = "EVENT_STOP";
BI.StateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.StateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.StateEditor.EVENT_VALID = "EVENT_VALID";
BI.StateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.StateEditor.EVENT_ENTER = "EVENT_ENTER";

5
src/case/editor/editor.state.simple.js

@ -99,6 +99,10 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments);
});
@ -248,6 +252,7 @@ BI.SimpleStateEditor.EVENT_START = "EVENT_START";
BI.SimpleStateEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SimpleStateEditor.EVENT_STOP = "EVENT_STOP";
BI.SimpleStateEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SimpleStateEditor.EVENT_VALID = "EVENT_VALID";
BI.SimpleStateEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SimpleStateEditor.EVENT_ENTER = "EVENT_ENTER";

4
src/widget/editor/editor.search.js

@ -109,6 +109,9 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_START, function () {
self.fireEvent(BI.SearchEditor.EVENT_START);
});
@ -186,6 +189,7 @@ BI.SearchEditor.EVENT_START = "EVENT_START";
BI.SearchEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.SearchEditor.EVENT_STOP = "EVENT_STOP";
BI.SearchEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SearchEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SearchEditor.EVENT_VALID = "EVENT_VALID";
BI.SearchEditor.EVENT_ERROR = "EVENT_ERROR";
BI.SearchEditor.EVENT_ENTER = "EVENT_ENTER";

4
src/widget/editor/editor.text.js

@ -83,6 +83,9 @@ BI.TextEditor = BI.inherit(BI.Widget, {
this.editor.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM);
});
this.editor.on(BI.Editor.EVENT_REMOVE, function (v) {
self.fireEvent(BI.TextEditor.EVENT_REMOVE);
});
@ -155,6 +158,7 @@ BI.TextEditor.EVENT_START = "EVENT_START";
BI.TextEditor.EVENT_PAUSE = "EVENT_PAUSE";
BI.TextEditor.EVENT_STOP = "EVENT_STOP";
BI.TextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.TextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.TextEditor.EVENT_VALID = "EVENT_VALID";
BI.TextEditor.EVENT_ERROR = "EVENT_ERROR";
BI.TextEditor.EVENT_ENTER = "EVENT_ENTER";

12
src/widget/numberinterval/numberinterval.js

@ -307,7 +307,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setFocusEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_FOCUS, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, function () {
self._setTitle("");
switch (self._checkValidation()) {
case c.typeError:
@ -336,7 +336,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
},
_setBlurEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_BLUR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR, function () {
BI.Bubbles.hide(c.typeError);
BI.Bubbles.hide(c.numberError);
BI.Bubbles.hide(c.signalError);
@ -358,7 +358,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setErrorEvent: function (w) {
var c = this.constants, self = this;
w.on(BI.Editor.EVENT_ERROR, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR, function () {
self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left",
@ -371,7 +371,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setValidEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_VALID, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID, function () {
switch (self._checkValidation()) {
case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
@ -396,7 +396,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
_setEditorValueChangedEvent: function (w) {
var self = this, c = this.constants;
w.on(BI.Editor.EVENT_CHANGE, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, function () {
switch (self._checkValidation()) {
case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
@ -421,7 +421,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
});
w.on(BI.Editor.EVENT_CONFIRM, function () {
w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
},

24
src/widget/numberinterval/singleeditor/single.editor.js

@ -25,32 +25,37 @@ BI.NumberIntervalSingleEidtor = BI.inherit(BI.Single, {
listeners: [{
eventName: BI.Editor.EVENT_ERROR,
action: function () {
self.fireEvent(BI.Editor.EVENT_ERROR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR, arguments);
}
}, {
eventName: BI.Editor.EVENT_FOCUS,
action: function () {
self.fireEvent(BI.Editor.EVENT_FOCUS, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, arguments);
}
}, {
eventName: BI.Editor.EVENT_BLUR,
action: function () {
self.fireEvent(BI.Editor.EVENT_BLUR, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR, arguments);
}
}, {
eventName: BI.Editor.EVENT_VALID,
action: function () {
self.fireEvent(BI.Editor.EVENT_VALID, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE,
action: function () {
self.fireEvent(BI.Editor.EVENT_CHANGE, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, arguments);
}
}, {
eventName: BI.Editor.EVENT_CONFIRM,
action: function () {
self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, arguments);
}
}, {
eventName: BI.Editor.EVENT_CHANGE_CONFIRM,
action: function () {
self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM, arguments);
}
}]
}]
@ -74,4 +79,11 @@ BI.NumberIntervalSingleEidtor = BI.inherit(BI.Single, {
}
});
BI.NumberIntervalSingleEidtor.EVENT_FOCUS = "EVENT_FOCUS";
BI.NumberIntervalSingleEidtor.EVENT_BLUR = "EVENT_BLUR";
BI.NumberIntervalSingleEidtor.EVENT_ERROR = "EVENT_ERROR";
BI.NumberIntervalSingleEidtor.EVENT_VALID = "EVENT_VALID";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.NumberIntervalSingleEidtor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.number_interval_single_editor", BI.NumberIntervalSingleEidtor);

6
src/widget/singleslider/button/editor.sign.text.js

@ -63,6 +63,11 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {
self._showHint();
self._checkText();
self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM, arguments);
});
this.editor.on(BI.Editor.EVENT_ERROR, function () {
self._checkText();
});
@ -183,6 +188,7 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);
Loading…
Cancel
Save