Browse Source

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

* commit 'b444a56848de9d68c2a2c7eabc877bffb1d54baa':
  REPORT-21493 && REPORT-21002 && BI-51100 单测 && 视觉修改
es6
guy 5 years ago
parent
commit
4dcb088c1b
  1. 35
      dist/2.0/fineui.ie.js
  2. 35
      dist/2.0/fineui.js
  3. 35
      dist/bundle.ie.js
  4. 35
      dist/bundle.js
  5. 35
      dist/fineui.ie.js
  6. 35
      dist/fineui.js
  7. 35
      dist/fineui_without_jquery_polyfill.js
  8. 35
      dist/widget.js
  9. 2
      src/base/single/a/__test__/a.test.js
  10. 107
      src/widget/datetime/__test__/datetime.test.js
  11. 19
      src/widget/downlist/__test__/combo.downlist.test.js
  12. 63
      src/widget/downlist/__test__/downlist.test.js
  13. 65
      src/widget/dynamicdate/__test__/dynamicdate.test.js
  14. 6
      src/widget/dynamicdate/dynamicdate.combo.js
  15. 4
      src/widget/dynamicdate/dynamicdate.trigger.js
  16. 330
      src/widget/dynamicdatetime/__test__/dynamicdatetime.test.js
  17. 8
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  18. 6
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js
  19. 6
      src/widget/time/time.combo.js
  20. 5
      src/widget/time/time.trigger.js
  21. 10
      test/utils.js

35
dist/2.0/fineui.ie.js vendored

@ -64721,6 +64721,11 @@ BI.extend(BI.DynamicDateCard, {
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR, eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -64920,6 +64925,7 @@ BI.extend(BI.DynamicDateCard, {
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR";
@ -65324,6 +65330,9 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP);
}); });
@ -65590,6 +65599,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}); });
BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP";
@ -65609,7 +65619,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}, },
props: { props: {
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow", baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",
height: 22, height: 22,
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
@ -65689,6 +65699,11 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTimeTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR, eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -65891,6 +65906,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR";
@ -66402,6 +66418,9 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP);
}); });
@ -66521,7 +66540,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
v = BI.print(date, c.compareFormat); v = BI.print(date, c.compareFormat);
result = [0, 1, 2]; result = [0, 1, 2];
} }
var dateArray = v.match(/\d+/g); var dateArray = v.match(/\d+/g) || [];
var newArray = []; var newArray = [];
// 处理乱序的年月日 // 处理乱序的年月日
BI.each(dateArray.slice(0, 3), function (idx) { BI.each(dateArray.slice(0, 3), function (idx) {
@ -66693,6 +66712,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}); });
BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP";
@ -83799,6 +83819,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: { el: {
type: "bi.time_trigger", type: "bi.time_trigger",
height: opts.height,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,
@ -83830,6 +83851,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_ERROR", eventName: "EVENT_ERROR",
action: function () { action: function () {
@ -84019,6 +84045,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
action: function () { action: function () {

35
dist/2.0/fineui.js vendored

@ -65125,6 +65125,11 @@ BI.extend(BI.DynamicDateCard, {
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR, eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -65324,6 +65329,7 @@ BI.extend(BI.DynamicDateCard, {
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR";
@ -65728,6 +65734,9 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP);
}); });
@ -65994,6 +66003,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}); });
BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP";
@ -66013,7 +66023,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}, },
props: { props: {
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow", baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",
height: 22, height: 22,
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
@ -66093,6 +66103,11 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTimeTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR, eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -66295,6 +66310,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR";
@ -66806,6 +66822,9 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP);
}); });
@ -66925,7 +66944,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
v = BI.print(date, c.compareFormat); v = BI.print(date, c.compareFormat);
result = [0, 1, 2]; result = [0, 1, 2];
} }
var dateArray = v.match(/\d+/g); var dateArray = v.match(/\d+/g) || [];
var newArray = []; var newArray = [];
// 处理乱序的年月日 // 处理乱序的年月日
BI.each(dateArray.slice(0, 3), function (idx) { BI.each(dateArray.slice(0, 3), function (idx) {
@ -67097,6 +67116,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}); });
BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP";
@ -84203,6 +84223,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: { el: {
type: "bi.time_trigger", type: "bi.time_trigger",
height: opts.height,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,
@ -84234,6 +84255,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_ERROR", eventName: "EVENT_ERROR",
action: function () { action: function () {
@ -84423,6 +84449,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
action: function () { action: function () {

35
dist/bundle.ie.js vendored

@ -64721,6 +64721,11 @@ BI.extend(BI.DynamicDateCard, {
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR, eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -64920,6 +64925,7 @@ BI.extend(BI.DynamicDateCard, {
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR";
@ -65324,6 +65330,9 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP);
}); });
@ -65590,6 +65599,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}); });
BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP";
@ -65609,7 +65619,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}, },
props: { props: {
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow", baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",
height: 22, height: 22,
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
@ -65689,6 +65699,11 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTimeTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR, eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -65891,6 +65906,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR";
@ -66402,6 +66418,9 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP);
}); });
@ -66521,7 +66540,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
v = BI.print(date, c.compareFormat); v = BI.print(date, c.compareFormat);
result = [0, 1, 2]; result = [0, 1, 2];
} }
var dateArray = v.match(/\d+/g); var dateArray = v.match(/\d+/g) || [];
var newArray = []; var newArray = [];
// 处理乱序的年月日 // 处理乱序的年月日
BI.each(dateArray.slice(0, 3), function (idx) { BI.each(dateArray.slice(0, 3), function (idx) {
@ -66693,6 +66712,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}); });
BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP";
@ -83799,6 +83819,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: { el: {
type: "bi.time_trigger", type: "bi.time_trigger",
height: opts.height,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,
@ -83830,6 +83851,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_ERROR", eventName: "EVENT_ERROR",
action: function () { action: function () {
@ -84019,6 +84045,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
action: function () { action: function () {

35
dist/bundle.js vendored

@ -65125,6 +65125,11 @@ BI.extend(BI.DynamicDateCard, {
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR, eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -65324,6 +65329,7 @@ BI.extend(BI.DynamicDateCard, {
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR";
@ -65728,6 +65734,9 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP);
}); });
@ -65994,6 +66003,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}); });
BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP";
@ -66013,7 +66023,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}, },
props: { props: {
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow", baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",
height: 22, height: 22,
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
@ -66093,6 +66103,11 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTimeTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR, eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -66295,6 +66310,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR";
@ -66806,6 +66822,9 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP);
}); });
@ -66925,7 +66944,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
v = BI.print(date, c.compareFormat); v = BI.print(date, c.compareFormat);
result = [0, 1, 2]; result = [0, 1, 2];
} }
var dateArray = v.match(/\d+/g); var dateArray = v.match(/\d+/g) || [];
var newArray = []; var newArray = [];
// 处理乱序的年月日 // 处理乱序的年月日
BI.each(dateArray.slice(0, 3), function (idx) { BI.each(dateArray.slice(0, 3), function (idx) {
@ -67097,6 +67116,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}); });
BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP";
@ -84203,6 +84223,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: { el: {
type: "bi.time_trigger", type: "bi.time_trigger",
height: opts.height,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,
@ -84234,6 +84255,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_ERROR", eventName: "EVENT_ERROR",
action: function () { action: function () {
@ -84423,6 +84449,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
action: function () { action: function () {

35
dist/fineui.ie.js vendored

@ -64966,6 +64966,11 @@ BI.extend(BI.DynamicDateCard, {
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR, eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -65165,6 +65170,7 @@ BI.extend(BI.DynamicDateCard, {
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR";
@ -65569,6 +65575,9 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP);
}); });
@ -65835,6 +65844,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}); });
BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP";
@ -65854,7 +65864,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}, },
props: { props: {
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow", baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",
height: 22, height: 22,
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
@ -65934,6 +65944,11 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTimeTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR, eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -66136,6 +66151,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR";
@ -66647,6 +66663,9 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP);
}); });
@ -66766,7 +66785,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
v = BI.print(date, c.compareFormat); v = BI.print(date, c.compareFormat);
result = [0, 1, 2]; result = [0, 1, 2];
} }
var dateArray = v.match(/\d+/g); var dateArray = v.match(/\d+/g) || [];
var newArray = []; var newArray = [];
// 处理乱序的年月日 // 处理乱序的年月日
BI.each(dateArray.slice(0, 3), function (idx) { BI.each(dateArray.slice(0, 3), function (idx) {
@ -66938,6 +66957,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}); });
BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP";
@ -84044,6 +84064,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: { el: {
type: "bi.time_trigger", type: "bi.time_trigger",
height: opts.height,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,
@ -84075,6 +84096,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_ERROR", eventName: "EVENT_ERROR",
action: function () { action: function () {
@ -84264,6 +84290,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
action: function () { action: function () {

35
dist/fineui.js vendored

@ -65370,6 +65370,11 @@ BI.extend(BI.DynamicDateCard, {
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR, eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -65569,6 +65574,7 @@ BI.extend(BI.DynamicDateCard, {
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR";
@ -65973,6 +65979,9 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP);
}); });
@ -66239,6 +66248,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}); });
BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP";
@ -66258,7 +66268,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}, },
props: { props: {
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow", baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",
height: 22, height: 22,
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
@ -66338,6 +66348,11 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTimeTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR, eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -66540,6 +66555,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR";
@ -67051,6 +67067,9 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP);
}); });
@ -67170,7 +67189,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
v = BI.print(date, c.compareFormat); v = BI.print(date, c.compareFormat);
result = [0, 1, 2]; result = [0, 1, 2];
} }
var dateArray = v.match(/\d+/g); var dateArray = v.match(/\d+/g) || [];
var newArray = []; var newArray = [];
// 处理乱序的年月日 // 处理乱序的年月日
BI.each(dateArray.slice(0, 3), function (idx) { BI.each(dateArray.slice(0, 3), function (idx) {
@ -67342,6 +67361,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}); });
BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP";
@ -84448,6 +84468,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: { el: {
type: "bi.time_trigger", type: "bi.time_trigger",
height: opts.height,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,
@ -84479,6 +84500,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_ERROR", eventName: "EVENT_ERROR",
action: function () { action: function () {
@ -84668,6 +84694,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
action: function () { action: function () {

35
dist/fineui_without_jquery_polyfill.js vendored

@ -47669,6 +47669,11 @@ BI.extend(BI.DynamicDateCard, {
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR, eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -47868,6 +47873,7 @@ BI.extend(BI.DynamicDateCard, {
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR";
@ -48272,6 +48278,9 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP);
}); });
@ -48538,6 +48547,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}); });
BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP";
@ -48557,7 +48567,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}, },
props: { props: {
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow", baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",
height: 22, height: 22,
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
@ -48637,6 +48647,11 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTimeTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR, eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -48839,6 +48854,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR";
@ -49350,6 +49366,9 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP);
}); });
@ -49469,7 +49488,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
v = BI.print(date, c.compareFormat); v = BI.print(date, c.compareFormat);
result = [0, 1, 2]; result = [0, 1, 2];
} }
var dateArray = v.match(/\d+/g); var dateArray = v.match(/\d+/g) || [];
var newArray = []; var newArray = [];
// 处理乱序的年月日 // 处理乱序的年月日
BI.each(dateArray.slice(0, 3), function (idx) { BI.each(dateArray.slice(0, 3), function (idx) {
@ -49641,6 +49660,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}); });
BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP";
@ -66747,6 +66767,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: { el: {
type: "bi.time_trigger", type: "bi.time_trigger",
height: opts.height,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,
@ -66778,6 +66799,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_ERROR", eventName: "EVENT_ERROR",
action: function () { action: function () {
@ -66967,6 +66993,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
action: function () { action: function () {

35
dist/widget.js vendored

@ -2780,6 +2780,11 @@ BI.extend(BI.DynamicDateCard, {
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR, eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -2979,6 +2984,7 @@ BI.extend(BI.DynamicDateCard, {
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR";
@ -3383,6 +3389,9 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP);
}); });
@ -3649,6 +3658,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger
}); });
BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP";
@ -3668,7 +3678,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}, },
props: { props: {
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow", baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",
height: 22, height: 22,
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
@ -3748,6 +3758,11 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTimeTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR, eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -3950,6 +3965,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR";
@ -4461,6 +4477,9 @@ BI.extend(BI.DynamicDateTimeSelect, {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP);
}); });
@ -4580,7 +4599,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
v = BI.print(date, c.compareFormat); v = BI.print(date, c.compareFormat);
result = [0, 1, 2]; result = [0, 1, 2];
} }
var dateArray = v.match(/\d+/g); var dateArray = v.match(/\d+/g) || [];
var newArray = []; var newArray = [];
// 处理乱序的年月日 // 处理乱序的年月日
BI.each(dateArray.slice(0, 3), function (idx) { BI.each(dateArray.slice(0, 3), function (idx) {
@ -4752,6 +4771,7 @@ BI.extend(BI.DynamicDateTimeSelect, {
}); });
BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP";
@ -21858,6 +21878,7 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: { el: {
type: "bi.time_trigger", type: "bi.time_trigger",
height: opts.height,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,
@ -21889,6 +21910,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
} }
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_ERROR", eventName: "EVENT_ERROR",
action: function () { action: function () {
@ -22078,6 +22104,11 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
action: function () { action: function () {

2
src/base/single/a/__test__/a.test.js

@ -12,6 +12,7 @@ describe("ALinkTest", function () {
text: "CCC" text: "CCC"
}); });
expect(a.element.is('a')).to.equal(true); expect(a.element.is('a')).to.equal(true);
a.destroy();
}); });
/** /**
@ -26,5 +27,6 @@ describe("ALinkTest", function () {
} }
}); });
expect(a.element.is('a') && a.element.hasClass("bi-label")).to.equal(true); expect(a.element.is('a') && a.element.hasClass("bi-label")).to.equal(true);
a.destroy();
}); });
}); });

107
src/widget/datetime/__test__/datetime.test.js

@ -0,0 +1,107 @@
/**
* @author windy
* @version 2.0
* Created by windy on 2019/9/6
*/
describe("DateTime", function () {
before(function () {
BI.holidays = {
"2010-02-28": true,
"2010-02-27": true
};
});
/**
* test_author_windy
*/
it("defaultValue", function () {
var dateCombo = BI.Test.createWidget({
type: "bi.date_time_combo",
value: {
year: 2018,
month: 2,
day: 23,
hour: 12,
minute: 12,
second: 12
}
});
expect(dateCombo.element.find(".bi-date-time-trigger .bi-label").text()).to.equal("2018-02-23 12:12:12");
dateCombo.destroy();
});
/**
* test_author_windy
*/
it("trigger的confirm-下拉面板选值confirm", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_combo",
width: 220,
height: 30
});
// 点击日期,是否收起下拉
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
BI.nextTick(function () {
dateCombo.element.find(".bi-calendar:visible .bi-list-item-select :contains(5)").parent().click();
expect(dateCombo.element.find(".bi-date-time-trigger + .bi-popup-view").css("display")).to.equal("block");
dateCombo.destroy();
done();
})
});
/**
* test_author_windy
*/
it("下拉后直接点击外部的触发的confirm", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_combo",
width: 220,
height: 30,
});
// 点击日期,是否收起下拉
BI.nextTick(function () {
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
BI.nextTick(function () {
var input = dateCombo.element.find(".bi-date-time-trigger .bi-input");
BI.Test.triggerKeyDown(input, null, BI.KeyCode.ENTER, function () {
BI.delay(function () {
expect(dateCombo.element.find(".bi-date-time-trigger + .bi-popup-view").css("display")).to.equal("none");
dateCombo.destroy();
done();
}, 300);
});
})
});
});
/**
* test_author_windy
*/
it("点击确定", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_combo",
width: 220,
height: 30,
value: {
year: 2018,
month: 2,
day: 23
}
});
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
BI.nextTick(function () {
dateCombo.element.find(".bi-dynamic-date-popup .bi-text:contains(确定)").parent().click();
expect(dateCombo.getValue()).to.deep.equal({
year: 2018,
month: 2,
day: 23
});
dateCombo.destroy();
done();
})
});
});

19
src/widget/downlist/__test__/combo.downlist.test.js

@ -1,19 +0,0 @@
/**
* @author windy
* @version 2.0
* Created by windy on 2019/9/3
*/
describe("DownListCombo", function () {
/**
* test_author_windy
*/
it("defaultValue", function () {
var datePane = BI.Test.createWidget({
type: "bi.down_list_combo",
adjustLength: 10,
items: [[{"el":{"text":"column 1111","iconCls1":"dot-e-font","value":12},"children":[{"text":"column 1.1","value":21,"cls":"dot-e-font"},{"text":"column 1.2","value":22,"cls":"dot-e-font"}]}],[{"el":{"text":"column 1111","iconCls1":"dot-e-font","value":11},"children":[{"text":"column 1.1","value":21,"cls":"dot-e-font"},{"text":"column 1.2","value":22,"cls":"dot-e-font"}]}]]
});
});
});

63
src/widget/downlist/__test__/downlist.test.js

@ -0,0 +1,63 @@
/**
* @author windy
* @version 2.0
* Created by windy on 2019/9/3
*/
describe("DownListCombo", function () {
/**
* test_author_windy
*/
it("defaultValue", function () {
var downListCombo = BI.Test.createWidget({
type: "bi.down_list_combo",
adjustLength: 10,
items: [[{"el":{"text":"column 1111","iconCls1":"dot-e-font","value":12},"children":[{"text":"column 1.1","value":21,"cls":"dot-e-font"},{"text":"column 1.2","value":22,"cls":"dot-e-font"}]}],[{"el":{"text":"column 1111","iconCls1":"dot-e-font","value":11},"children":[{"text":"column 1.1","value":21,"cls":"dot-e-font"},{"text":"column 1.2","value":22,"cls":"dot-e-font"}]}]]
});
downListCombo.setValue([{value: 12, childValue: 21}]);
expect(downListCombo.getValue()).to.deep.equal([ { childValue: 21, value: 12 } ]);
downListCombo.destroy();
});
/**
* test_author_windy
*/
it("点击父亲选值", function (done) {
var downListCombo = BI.Test.createWidget({
type: "bi.down_list_combo",
height: 30,
width: 30,
items: [[{"el":{"text":"column 1111","iconCls1":"dot-e-font","value":12},"children":[{"text":"column 1.1","value":21,"cls":"dot-e-font"},{"text":"column 1.2","value":22,"cls":"dot-e-font"}]}],[{"el":{"text":"column 1111","iconCls1":"dot-e-font","value":11},"children":[{"text":"column 1.1","value":21,"cls":"dot-e-font"},{"text":"column 1.2","value":22,"cls":"dot-e-font"}]}], [{"text": "column 1122", value: 32}, {"text": "column 1133", value: 33}]]
});
downListCombo.element.children(".pull-down-font").click();
BI.nextTick(function () {
downListCombo.element.find(".bi-down-list-group:last-child .bi-down-list-item").click();
expect(downListCombo.getValue()).to.deep.equal([ { value: 33 } ]);
done();
});
});
/**
* test_author_windy
*/
it("点击儿子选值", function (done) {
var downListCombo = BI.Test.createWidget({
type: "bi.down_list_combo",
height: 30,
width: 30,
items: [[{"el":{"text":"column 1111","iconCls1":"dot-e-font","value":12},"children":[{"text":"column 1.1","value":21,"cls":"dot-e-font"},{"text":"column 1.2","value":22,"cls":"dot-e-font"}]}],[{"el":{"text":"column 1111","iconCls1":"dot-e-font","value":11},"children":[{"text":"column 1.1","value":21,"cls":"dot-e-font"},{"text":"column 1.2","value":22,"cls":"dot-e-font"}]}]]
});
downListCombo.element.children(".pull-down-font").click();
BI.Test.triggerMouseover(downListCombo.element.find(".bi-down-list-group:first-child .bi-down-list-group-item"), function () {
BI.nextTick(function () {
downListCombo.element.find(".child-down-list-item:first-child").click();
expect(downListCombo.getValue()).to.deep.equal([ { childValue: 21, value: 12 } ]);
downListCombo.destroy();
done();
});
});
});
});

65
src/widget/dynamicdate/__test__/dynamicdate.combo.test.js → src/widget/dynamicdate/__test__/dynamicdate.test.js

@ -6,6 +6,13 @@
describe("DateCombo", function () { describe("DateCombo", function () {
before(function () {
BI.holidays = {
"2010-02-28": true,
"2010-02-27": true
};
});
/** /**
* test_author_windy * test_author_windy
*/ */
@ -202,6 +209,64 @@ describe("DateCombo", function () {
}) })
}); });
/**
* test_author_windy
*/
it("测试动态默认值", function () {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_combo",
width: 220,
height: 30,
value: {
type: 2,
value: {
year: -1,
month: 1,
quarter: -1,
week: 1,
day: -1,
position: 2
}
}
});
expect(dateCombo.getValue()).to.deep.equal({
type: 2,
value: {
year: -1,
month: 1,
quarter: -1,
week: 1,
day: -1,
position: 2
}
});
dateCombo.destroy();
});
/**
* test_author_windy
*/
it("测试工作日动态默认值", function () {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_combo",
width: 220,
height: 30,
value: {
type: 2,
value: {
workDay: -1
}
}
});
expect(dateCombo.getValue()).to.deep.equal({
type: 2,
value: {
workDay: -1
}
});
dateCombo.destroy();
});
/** /**
* test_author_windy * test_author_windy

6
src/widget/dynamicdate/dynamicdate.combo.js

@ -82,6 +82,11 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTrigger.EVENT_ERROR, eventName: BI.DynamicDateTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -281,6 +286,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateCombo.EVENT_ERROR = "EVENT_ERROR";

4
src/widget/dynamicdate/dynamicdate.trigger.js

@ -58,6 +58,9 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP);
}); });
@ -324,6 +327,7 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
}); });
BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTrigger.EVENT_STOP = "EVENT_STOP";

330
src/widget/dynamicdatetime/__test__/dynamicdatetime.test.js

@ -0,0 +1,330 @@
/**
* @author windy
* @version 2.0
* Created by windy on 2019/9/4
*/
describe("DateTimeCombo", function () {
before(function () {
BI.holidays = {
"2010-02-28": true,
"2010-02-27": true
};
});
/**
* test_author_windy
*/
it("defaultValue", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_time_combo",
value: {
type: 1,
value: {
year: 2018,
month: 2,
day: 23,
hour: 12,
minute: 12,
second: 12
}
}
});
BI.nextTick(function () {
expect(dateCombo.element.find(".bi-date-time-trigger .bi-label").text()).to.equal("2018-02-23 12:12:12");
dateCombo.destroy();
done();
})
});
/**
* test_author_windy
*/
it("测试输入值收起下拉清空值下拉出现", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_time_combo",
width: 220,
height: 30,
value: {
type: 1,
value: {
year: 2018,
month: 2,
day: 23,
hour: 12,
minute: 12,
second: 12
}
}
});
BI.nextTick(function () {
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
// 输入8, 检查popup是否收起
BI.Test.triggerKeyDown(dateCombo.element.find(".bi-date-time-trigger .bi-input"), "8", 56, function () {
BI.nextTick(function () {
expect(dateCombo.element.find(".bi-date-time-trigger + .bi-popup-view").css("display")).to.equal("none");
// 清空输入, 检查popup是否弹出
BI.Test.triggerKeyDown(dateCombo.element.find(".bi-date-time-trigger .bi-input"), "", BI.KeyCode.BACKSPACE, function () {
BI.nextTick(function () {
expect(dateCombo.element.find(".bi-date-time-trigger + .bi-popup-view").css("display")).to.equal("block");
dateCombo.destroy();
done();
});
});
});
});
});
});
/**
* test_author_windy
*/
it("trigger的confirm-下拉面板选值confirm", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_time_combo",
width: 220,
height: 30
});
// 点击日期,是否收起下拉
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
BI.nextTick(function () {
dateCombo.element.find(".bi-calendar:visible .bi-list-item-select :contains(5)").parent().click();
expect(dateCombo.element.find(".bi-date-time-trigger + .bi-popup-view").css("display")).to.equal("block");
dateCombo.destroy();
done();
})
});
/**
* test_author_windy
*/
it("下拉后直接点击外部的触发的confirm", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_time_combo",
width: 220,
height: 30,
});
// 点击日期,是否收起下拉
BI.nextTick(function () {
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
BI.nextTick(function () {
var input = dateCombo.element.find(".bi-date-time-trigger .bi-input");
BI.Test.triggerKeyDown(input, null, BI.KeyCode.ENTER, function () {
BI.delay(function () {
expect(dateCombo.element.find(".bi-date-time-trigger + .bi-popup-view").css("display")).to.equal("none");
dateCombo.destroy();
done();
}, 300);
});
})
});
});
/**
* test_author_windy
*/
it("点击清空", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_time_combo",
width: 220,
height: 30,
value: {
type: 1,
value: {
year: 2018,
month: 2,
day: 23,
hour: 12,
minute: 12,
second: 12
}
}
});
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
BI.nextTick(function () {
dateCombo.element.find(".bi-dynamic-date-time-popup .bi-text:contains(清除)").parent().click();
expect(BI.isNull(dateCombo.getValue())).to.equal(true);
dateCombo.destroy();
done();
})
});
/**
* test_author_windy
*/
it("点击今天", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_time_combo",
width: 220,
height: 30,
value: {
type: 1,
value: {
year: 2018,
month: 2,
day: 23,
hour: 12,
minute: 12,
second: 12
}
}
});
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
BI.nextTick(function () {
dateCombo.element.find(".bi-dynamic-date-time-popup .bi-text:contains(今天)").parent().click();
var date = BI.getDate();
expect(dateCombo.getValue()).to.deep.equal({
type: 1,
value: {
year: date.getFullYear(),
month: date.getMonth() + 1,
day: date.getDate(),
hour: 0,
minute: 0,
second: 0
}
});
dateCombo.destroy();
done();
})
});
/**
* test_author_windy
*/
it("点击确定", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_time_combo",
width: 220,
height: 30,
value: {
type: 1,
value: {
year: 2018,
month: 2,
day: 23,
hour: 12,
minute: 12,
second: 12
}
}
});
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
BI.nextTick(function () {
dateCombo.element.find(".bi-dynamic-date-time-popup .bi-text:contains(确定)").parent().click();
expect(dateCombo.getValue()).to.deep.equal({
type: 1,
value: {
year: 2018,
month: 2,
day: 23,
hour: 12,
minute: 12,
second: 12
}
});
dateCombo.destroy();
done();
})
});
/**
* test_author_windy
*/
it("测试动态默认值", function () {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_time_combo",
width: 220,
height: 30,
value: {
type: 2,
value: {
year: -1,
month: 1,
quarter: -1,
week: 1,
day: -1,
position: 2
}
}
});
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
expect(dateCombo.getValue()).to.deep.equal({
type: 2,
value: {
year: -1,
month: 1,
quarter: -1,
week: 1,
day: -1,
position: 2
}
});
dateCombo.destroy();
});
/**
* test_author_windy
*/
it("测试工作日动态默认值", function () {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_time_combo",
width: 220,
height: 30,
value: {
type: 2,
value: {
workDay: -1
}
}
});
expect(dateCombo.getValue()).to.deep.equal({
type: 2,
value: {
workDay: -1
}
});
dateCombo.destroy();
});
/**
* test_author_windy
*/
it("trigger的输入日期后confirm", function (done) {
var dateCombo = BI.Test.createWidget({
type: "bi.dynamic_date_time_combo",
width: 220,
height: 30,
value: {
type: 1,
value: {
year: 2018,
month: 2,
day: 23
}
}
});
BI.nextTick(function () {
dateCombo.element.find(".bi-date-time-trigger .bi-basic-button").click();
BI.nextTick(function () {
var input = dateCombo.element.find(".bi-date-time-trigger .bi-input");
input.val("2017-1-1");
BI.Test.triggerKeyDown(dateCombo.element.find(".bi-date-time-trigger .bi-input"), null, BI.KeyCode.ENTER, function () {
BI.delay(function () {
expect(dateCombo.element.find(".bi-date-time-trigger .bi-text-button").text()).to.equal("2017-01-01 00:00:00");
dateCombo.destroy();
done();
}, 300);
});
});
})
});
});

8
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -7,7 +7,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
}, },
props: { props: {
baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow", baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",
height: 22, height: 22,
minDate: "1900-01-01", minDate: "1900-01-01",
maxDate: "2099-12-31", maxDate: "2099-12-31",
@ -87,6 +87,11 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS);
} }
}, {
eventName: BI.DynamicDateTimeTrigger.EVENT_BLUR,
action: function () {
self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR);
}
}, { }, {
eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR, eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,
action: function () { action: function () {
@ -289,6 +294,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; BI.DynamicDateTimeCombo.EVENT_KEY_DOWN = "EVENT_KEY_DOWN";
BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicDateTimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeCombo.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.DynamicDateTimeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID"; BI.DynamicDateTimeCombo.EVENT_VALID = "EVENT_VALID";
BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR"; BI.DynamicDateTimeCombo.EVENT_ERROR = "EVENT_ERROR";

6
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -58,6 +58,9 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);
}); });
this.editor.on(BI.SignEditor.EVENT_BLUR, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR);
});
this.editor.on(BI.SignEditor.EVENT_STOP, function () { this.editor.on(BI.SignEditor.EVENT_STOP, function () {
self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP);
}); });
@ -177,7 +180,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
v = BI.print(date, c.compareFormat); v = BI.print(date, c.compareFormat);
result = [0, 1, 2]; result = [0, 1, 2];
} }
var dateArray = v.match(/\d+/g); var dateArray = v.match(/\d+/g) || [];
var newArray = []; var newArray = [];
// 处理乱序的年月日 // 处理乱序的年月日
BI.each(dateArray.slice(0, 3), function (idx) { BI.each(dateArray.slice(0, 3), function (idx) {
@ -349,6 +352,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
}); });
BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR";
BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.DynamicDateTimeTrigger.EVENT_FOCUS = "EVENT_FOCUS";
BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START"; BI.DynamicDateTimeTrigger.EVENT_START = "EVENT_START";
BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicDateTimeTrigger.EVENT_STOP = "EVENT_STOP";

6
src/widget/time/time.combo.js

@ -65,6 +65,7 @@
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: { el: {
type: "bi.time_trigger", type: "bi.time_trigger",
height: opts.height,
allowEdit: opts.allowEdit, allowEdit: opts.allowEdit,
watermark: opts.watermark, watermark: opts.watermark,
format: opts.format, format: opts.format,
@ -96,6 +97,11 @@
} }
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_ERROR", eventName: "EVENT_ERROR",
action: function () { action: function () {

5
src/widget/time/time.trigger.js

@ -64,6 +64,11 @@
self.storeTriggerValue = self.getKey(); self.storeTriggerValue = self.getKey();
self.fireEvent("EVENT_FOCUS"); self.fireEvent("EVENT_FOCUS");
} }
}, {
eventName: "EVENT_BLUR",
action: function () {
self.fireEvent("EVENT_BLUR");
}
}, { }, {
eventName: "EVENT_STOP", eventName: "EVENT_STOP",
action: function () { action: function () {

10
test/utils.js

@ -32,6 +32,16 @@
element.trigger(e2); element.trigger(e2);
callback(); callback();
}, 300); }, 300);
},
/**
* 模拟一次鼠标hover
*/
triggerMouseover: function (element, callback) {
// keydown
var e = $.Event("mouseover");
element.trigger(e);
callback && callback();
} }
}) })
})(); })();
Loading…
Cancel
Save