From b406d635fa475450a613fa9dd2f2a0e12981a190 Mon Sep 17 00:00:00 2001 From: qcc Date: Thu, 21 Mar 2019 14:23:09 +0800 Subject: [PATCH] =?UTF-8?q?BI-41980=20fix:=20=E6=97=B6=E9=97=B4=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC=E5=92=8C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/2.0/fineui.ie.js | 19 ++++++++++--------- dist/2.0/fineui.js | 19 ++++++++++--------- dist/bundle.ie.js | 19 ++++++++++--------- dist/bundle.js | 19 ++++++++++--------- dist/fineui.ie.js | 19 ++++++++++--------- dist/fineui.js | 19 ++++++++++--------- dist/fineui_without_jquery_polyfill.js | 19 ++++++++++--------- dist/widget.js | 19 ++++++++++--------- src/widget/time/datetime.popup.js | 16 +++++++--------- src/widget/time/time.trigger.js | 3 +++ 10 files changed, 90 insertions(+), 81 deletions(-) diff --git a/dist/2.0/fineui.ie.js b/dist/2.0/fineui.ie.js index e5e1ac6f7..6d7cd1310 100644 --- a/dist/2.0/fineui.ie.js +++ b/dist/2.0/fineui.ie.js @@ -78887,15 +78887,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { }; }, - setValue: function (v) { - var value = v; - if (BI.isNull(value)) { - var date = BI.getDate(); - this.timeSelect.setValue({ - hour: date.getHours(), - minute: date.getMinutes(), - second: date.getSeconds() - }); + setValue: function (value) { + if (this._checkValueValid(value)) { + this.timeSelect.setValue(); } else { this.timeSelect.setValue({ hour: value.hour, @@ -78907,6 +78901,10 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { getValue: function () { return this.timeSelect.getValue(); + }, + + _checkValueValid: function (value) { + return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value); } }); BI.TimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE"; @@ -79079,6 +79077,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { items: [{ el: { type: "bi.label", + title: function () { + return self.text.getText(); + }, textAlign: "left", height: o.height, width: o.width, diff --git a/dist/2.0/fineui.js b/dist/2.0/fineui.js index b300f4178..35f27da45 100644 --- a/dist/2.0/fineui.js +++ b/dist/2.0/fineui.js @@ -79291,15 +79291,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { }; }, - setValue: function (v) { - var value = v; - if (BI.isNull(value)) { - var date = BI.getDate(); - this.timeSelect.setValue({ - hour: date.getHours(), - minute: date.getMinutes(), - second: date.getSeconds() - }); + setValue: function (value) { + if (this._checkValueValid(value)) { + this.timeSelect.setValue(); } else { this.timeSelect.setValue({ hour: value.hour, @@ -79311,6 +79305,10 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { getValue: function () { return this.timeSelect.getValue(); + }, + + _checkValueValid: function (value) { + return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value); } }); BI.TimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE"; @@ -79483,6 +79481,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { items: [{ el: { type: "bi.label", + title: function () { + return self.text.getText(); + }, textAlign: "left", height: o.height, width: o.width, diff --git a/dist/bundle.ie.js b/dist/bundle.ie.js index e5e1ac6f7..6d7cd1310 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -78887,15 +78887,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { }; }, - setValue: function (v) { - var value = v; - if (BI.isNull(value)) { - var date = BI.getDate(); - this.timeSelect.setValue({ - hour: date.getHours(), - minute: date.getMinutes(), - second: date.getSeconds() - }); + setValue: function (value) { + if (this._checkValueValid(value)) { + this.timeSelect.setValue(); } else { this.timeSelect.setValue({ hour: value.hour, @@ -78907,6 +78901,10 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { getValue: function () { return this.timeSelect.getValue(); + }, + + _checkValueValid: function (value) { + return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value); } }); BI.TimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE"; @@ -79079,6 +79077,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { items: [{ el: { type: "bi.label", + title: function () { + return self.text.getText(); + }, textAlign: "left", height: o.height, width: o.width, diff --git a/dist/bundle.js b/dist/bundle.js index b300f4178..35f27da45 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -79291,15 +79291,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { }; }, - setValue: function (v) { - var value = v; - if (BI.isNull(value)) { - var date = BI.getDate(); - this.timeSelect.setValue({ - hour: date.getHours(), - minute: date.getMinutes(), - second: date.getSeconds() - }); + setValue: function (value) { + if (this._checkValueValid(value)) { + this.timeSelect.setValue(); } else { this.timeSelect.setValue({ hour: value.hour, @@ -79311,6 +79305,10 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { getValue: function () { return this.timeSelect.getValue(); + }, + + _checkValueValid: function (value) { + return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value); } }); BI.TimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE"; @@ -79483,6 +79481,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { items: [{ el: { type: "bi.label", + title: function () { + return self.text.getText(); + }, textAlign: "left", height: o.height, width: o.width, diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index 9ad359721..4b6ebfb31 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -79132,15 +79132,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { }; }, - setValue: function (v) { - var value = v; - if (BI.isNull(value)) { - var date = BI.getDate(); - this.timeSelect.setValue({ - hour: date.getHours(), - minute: date.getMinutes(), - second: date.getSeconds() - }); + setValue: function (value) { + if (this._checkValueValid(value)) { + this.timeSelect.setValue(); } else { this.timeSelect.setValue({ hour: value.hour, @@ -79152,6 +79146,10 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { getValue: function () { return this.timeSelect.getValue(); + }, + + _checkValueValid: function (value) { + return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value); } }); BI.TimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE"; @@ -79324,6 +79322,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { items: [{ el: { type: "bi.label", + title: function () { + return self.text.getText(); + }, textAlign: "left", height: o.height, width: o.width, diff --git a/dist/fineui.js b/dist/fineui.js index d20f355f0..b26d2d9a2 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -79536,15 +79536,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { }; }, - setValue: function (v) { - var value = v; - if (BI.isNull(value)) { - var date = BI.getDate(); - this.timeSelect.setValue({ - hour: date.getHours(), - minute: date.getMinutes(), - second: date.getSeconds() - }); + setValue: function (value) { + if (this._checkValueValid(value)) { + this.timeSelect.setValue(); } else { this.timeSelect.setValue({ hour: value.hour, @@ -79556,6 +79550,10 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { getValue: function () { return this.timeSelect.getValue(); + }, + + _checkValueValid: function (value) { + return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value); } }); BI.TimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE"; @@ -79728,6 +79726,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { items: [{ el: { type: "bi.label", + title: function () { + return self.text.getText(); + }, textAlign: "left", height: o.height, width: o.width, diff --git a/dist/fineui_without_jquery_polyfill.js b/dist/fineui_without_jquery_polyfill.js index 3ac9bc092..2478f7d89 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -62371,15 +62371,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { }; }, - setValue: function (v) { - var value = v; - if (BI.isNull(value)) { - var date = BI.getDate(); - this.timeSelect.setValue({ - hour: date.getHours(), - minute: date.getMinutes(), - second: date.getSeconds() - }); + setValue: function (value) { + if (this._checkValueValid(value)) { + this.timeSelect.setValue(); } else { this.timeSelect.setValue({ hour: value.hour, @@ -62391,6 +62385,10 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { getValue: function () { return this.timeSelect.getValue(); + }, + + _checkValueValid: function (value) { + return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value); } }); BI.TimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE"; @@ -62563,6 +62561,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { items: [{ el: { type: "bi.label", + title: function () { + return self.text.getText(); + }, textAlign: "left", height: o.height, width: o.width, diff --git a/dist/widget.js b/dist/widget.js index 41be4bad9..747de22b0 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -19445,15 +19445,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { }; }, - setValue: function (v) { - var value = v; - if (BI.isNull(value)) { - var date = BI.getDate(); - this.timeSelect.setValue({ - hour: date.getHours(), - minute: date.getMinutes(), - second: date.getSeconds() - }); + setValue: function (value) { + if (this._checkValueValid(value)) { + this.timeSelect.setValue(); } else { this.timeSelect.setValue({ hour: value.hour, @@ -19465,6 +19459,10 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { getValue: function () { return this.timeSelect.getValue(); + }, + + _checkValueValid: function (value) { + return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value); } }); BI.TimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE"; @@ -19637,6 +19635,9 @@ BI.shortcut("bi.single_tree_trigger", BI.SingleTreeTrigger);!(function () { items: [{ el: { type: "bi.label", + title: function () { + return self.text.getText(); + }, textAlign: "left", height: o.height, width: o.width, diff --git a/src/widget/time/datetime.popup.js b/src/widget/time/datetime.popup.js index 97c741c8a..adc18925b 100644 --- a/src/widget/time/datetime.popup.js +++ b/src/widget/time/datetime.popup.js @@ -69,15 +69,9 @@ }; }, - setValue: function (v) { - var value = v; - if (BI.isNull(value)) { - var date = BI.getDate(); - this.timeSelect.setValue({ - hour: date.getHours(), - minute: date.getMinutes(), - second: date.getSeconds() - }); + setValue: function (value) { + if (this._checkValueValid(value)) { + this.timeSelect.setValue(); } else { this.timeSelect.setValue({ hour: value.hour, @@ -89,6 +83,10 @@ getValue: function () { return this.timeSelect.getValue(); + }, + + _checkValueValid: function (value) { + return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value); } }); BI.TimePopup.BUTTON_OK_EVENT_CHANGE = "BUTTON_OK_EVENT_CHANGE"; diff --git a/src/widget/time/time.trigger.js b/src/widget/time/time.trigger.js index 27c4917b4..860d2f6d7 100644 --- a/src/widget/time/time.trigger.js +++ b/src/widget/time/time.trigger.js @@ -13,6 +13,9 @@ items: [{ el: { type: "bi.label", + title: function () { + return self.text.getText(); + }, textAlign: "left", height: o.height, width: o.width,