From 29ba88d93c781b2e1a0eea0bb66f29105c006bce Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Thu, 29 Aug 2019 18:16:55 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-21270=20&&=20BI-50853:=20fix:=20?= =?UTF-8?q?=E8=A1=A5=E5=85=85valuechooser=E7=9A=84=E6=B0=B4=E5=8D=B0?= =?UTF-8?q?=E5=92=8C=E9=BB=98=E8=AE=A4=E5=80=BC=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/2.0/fineui.ie.js | 21 +++++++++++++++++-- dist/2.0/fineui.js | 21 +++++++++++++++++-- dist/bundle.ie.js | 21 +++++++++++++++++-- dist/bundle.js | 21 +++++++++++++++++-- dist/fineui.ie.js | 21 +++++++++++++++++-- dist/fineui.js | 21 +++++++++++++++++-- dist/fineui_without_jquery_polyfill.js | 21 +++++++++++++++++-- dist/widget.js | 21 +++++++++++++++++-- .../combo.listtreevaluechooser.js | 2 ++ .../combo.treevaluechooser.insert.js | 2 ++ .../combo.treevaluechooser.js | 2 ++ .../dynamicdatetime.timeselect.js | 4 ++-- src/widget/multitree/multi.tree.combo.js | 2 ++ src/widget/multitree/multi.tree.list.combo.js | 1 + src/widget/numbereditor/number.editor.js | 8 +++++++ 15 files changed, 171 insertions(+), 18 deletions(-) diff --git a/dist/2.0/fineui.ie.js b/dist/2.0/fineui.ie.js index 14c66cb27..ef3d7742b 100644 --- a/dist/2.0/fineui.ie.js +++ b/dist/2.0/fineui.ie.js @@ -66173,7 +66173,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.HOUR); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.HOUR); this.setValue(value); } }], @@ -66209,7 +66209,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.MINUTE); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.MINUTE); this.setValue(value); } }], @@ -75934,6 +75934,8 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", height: o.height, valueFormatter: o.valueFormatter, + text: o.text, + watermark: o.watermark, // adapter: this.popup, masker: { offset: this.constants.offset @@ -76529,6 +76531,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", allowEdit: o.allowEdit, text: o.text, + watermark: o.watermark, height: o.height, valueFormatter: o.valueFormatter, // adapter: this.popup, @@ -77622,6 +77625,14 @@ BI.NumberEditor = BI.inherit(BI.Widget, { this.bottomBtn.setEnable(!!v); }, + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + getLastChangedValue: function () { + return this.editor.getLastChangedValue(); + }, + getValue: function () { return this.options.value; }, @@ -88525,6 +88536,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, this.combo = BI.createWidget({ type: "bi.multi_tree_list_combo", element: this, + text: o.text, + watermark: o.watermark, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), width: o.width, @@ -88610,6 +88623,8 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_insert_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), @@ -88696,6 +88711,8 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), diff --git a/dist/2.0/fineui.js b/dist/2.0/fineui.js index f8a23ed32..7f1f7b5e3 100644 --- a/dist/2.0/fineui.js +++ b/dist/2.0/fineui.js @@ -66577,7 +66577,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.HOUR); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.HOUR); this.setValue(value); } }], @@ -66613,7 +66613,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.MINUTE); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.MINUTE); this.setValue(value); } }], @@ -76338,6 +76338,8 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", height: o.height, valueFormatter: o.valueFormatter, + text: o.text, + watermark: o.watermark, // adapter: this.popup, masker: { offset: this.constants.offset @@ -76933,6 +76935,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", allowEdit: o.allowEdit, text: o.text, + watermark: o.watermark, height: o.height, valueFormatter: o.valueFormatter, // adapter: this.popup, @@ -78026,6 +78029,14 @@ BI.NumberEditor = BI.inherit(BI.Widget, { this.bottomBtn.setEnable(!!v); }, + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + getLastChangedValue: function () { + return this.editor.getLastChangedValue(); + }, + getValue: function () { return this.options.value; }, @@ -88929,6 +88940,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, this.combo = BI.createWidget({ type: "bi.multi_tree_list_combo", element: this, + text: o.text, + watermark: o.watermark, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), width: o.width, @@ -89014,6 +89027,8 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_insert_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), @@ -89100,6 +89115,8 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), diff --git a/dist/bundle.ie.js b/dist/bundle.ie.js index 14c66cb27..ef3d7742b 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -66173,7 +66173,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.HOUR); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.HOUR); this.setValue(value); } }], @@ -66209,7 +66209,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.MINUTE); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.MINUTE); this.setValue(value); } }], @@ -75934,6 +75934,8 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", height: o.height, valueFormatter: o.valueFormatter, + text: o.text, + watermark: o.watermark, // adapter: this.popup, masker: { offset: this.constants.offset @@ -76529,6 +76531,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", allowEdit: o.allowEdit, text: o.text, + watermark: o.watermark, height: o.height, valueFormatter: o.valueFormatter, // adapter: this.popup, @@ -77622,6 +77625,14 @@ BI.NumberEditor = BI.inherit(BI.Widget, { this.bottomBtn.setEnable(!!v); }, + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + getLastChangedValue: function () { + return this.editor.getLastChangedValue(); + }, + getValue: function () { return this.options.value; }, @@ -88525,6 +88536,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, this.combo = BI.createWidget({ type: "bi.multi_tree_list_combo", element: this, + text: o.text, + watermark: o.watermark, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), width: o.width, @@ -88610,6 +88623,8 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_insert_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), @@ -88696,6 +88711,8 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), diff --git a/dist/bundle.js b/dist/bundle.js index f8a23ed32..7f1f7b5e3 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -66577,7 +66577,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.HOUR); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.HOUR); this.setValue(value); } }], @@ -66613,7 +66613,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.MINUTE); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.MINUTE); this.setValue(value); } }], @@ -76338,6 +76338,8 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", height: o.height, valueFormatter: o.valueFormatter, + text: o.text, + watermark: o.watermark, // adapter: this.popup, masker: { offset: this.constants.offset @@ -76933,6 +76935,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", allowEdit: o.allowEdit, text: o.text, + watermark: o.watermark, height: o.height, valueFormatter: o.valueFormatter, // adapter: this.popup, @@ -78026,6 +78029,14 @@ BI.NumberEditor = BI.inherit(BI.Widget, { this.bottomBtn.setEnable(!!v); }, + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + getLastChangedValue: function () { + return this.editor.getLastChangedValue(); + }, + getValue: function () { return this.options.value; }, @@ -88929,6 +88940,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, this.combo = BI.createWidget({ type: "bi.multi_tree_list_combo", element: this, + text: o.text, + watermark: o.watermark, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), width: o.width, @@ -89014,6 +89027,8 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_insert_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), @@ -89100,6 +89115,8 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index f032073a1..0dcd4d2d3 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -66418,7 +66418,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.HOUR); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.HOUR); this.setValue(value); } }], @@ -66454,7 +66454,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.MINUTE); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.MINUTE); this.setValue(value); } }], @@ -76179,6 +76179,8 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", height: o.height, valueFormatter: o.valueFormatter, + text: o.text, + watermark: o.watermark, // adapter: this.popup, masker: { offset: this.constants.offset @@ -76774,6 +76776,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", allowEdit: o.allowEdit, text: o.text, + watermark: o.watermark, height: o.height, valueFormatter: o.valueFormatter, // adapter: this.popup, @@ -77867,6 +77870,14 @@ BI.NumberEditor = BI.inherit(BI.Widget, { this.bottomBtn.setEnable(!!v); }, + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + getLastChangedValue: function () { + return this.editor.getLastChangedValue(); + }, + getValue: function () { return this.options.value; }, @@ -88770,6 +88781,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, this.combo = BI.createWidget({ type: "bi.multi_tree_list_combo", element: this, + text: o.text, + watermark: o.watermark, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), width: o.width, @@ -88855,6 +88868,8 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_insert_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), @@ -88941,6 +88956,8 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), diff --git a/dist/fineui.js b/dist/fineui.js index fc0328d6e..0d4d63c4f 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -66822,7 +66822,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.HOUR); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.HOUR); this.setValue(value); } }], @@ -66858,7 +66858,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.MINUTE); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.MINUTE); this.setValue(value); } }], @@ -76583,6 +76583,8 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", height: o.height, valueFormatter: o.valueFormatter, + text: o.text, + watermark: o.watermark, // adapter: this.popup, masker: { offset: this.constants.offset @@ -77178,6 +77180,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", allowEdit: o.allowEdit, text: o.text, + watermark: o.watermark, height: o.height, valueFormatter: o.valueFormatter, // adapter: this.popup, @@ -78271,6 +78274,14 @@ BI.NumberEditor = BI.inherit(BI.Widget, { this.bottomBtn.setEnable(!!v); }, + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + getLastChangedValue: function () { + return this.editor.getLastChangedValue(); + }, + getValue: function () { return this.options.value; }, @@ -89174,6 +89185,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, this.combo = BI.createWidget({ type: "bi.multi_tree_list_combo", element: this, + text: o.text, + watermark: o.watermark, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), width: o.width, @@ -89259,6 +89272,8 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_insert_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), @@ -89345,6 +89360,8 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), diff --git a/dist/fineui_without_jquery_polyfill.js b/dist/fineui_without_jquery_polyfill.js index 1ac0fe3dc..466eb1ea0 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -49122,7 +49122,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.HOUR); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.HOUR); this.setValue(value); } }], @@ -49158,7 +49158,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.MINUTE); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.MINUTE); this.setValue(value); } }], @@ -58883,6 +58883,8 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", height: o.height, valueFormatter: o.valueFormatter, + text: o.text, + watermark: o.watermark, // adapter: this.popup, masker: { offset: this.constants.offset @@ -59478,6 +59480,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", allowEdit: o.allowEdit, text: o.text, + watermark: o.watermark, height: o.height, valueFormatter: o.valueFormatter, // adapter: this.popup, @@ -60571,6 +60574,14 @@ BI.NumberEditor = BI.inherit(BI.Widget, { this.bottomBtn.setEnable(!!v); }, + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + getLastChangedValue: function () { + return this.editor.getLastChangedValue(); + }, + getValue: function () { return this.options.value; }, @@ -71474,6 +71485,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, this.combo = BI.createWidget({ type: "bi.multi_tree_list_combo", element: this, + text: o.text, + watermark: o.watermark, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), width: o.width, @@ -71559,6 +71572,8 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_insert_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), @@ -71645,6 +71660,8 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), diff --git a/dist/widget.js b/dist/widget.js index ced6591b1..ad6aa5d23 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -4233,7 +4233,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.HOUR); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.HOUR); this.setValue(value); } }], @@ -4269,7 +4269,7 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.MINUTE); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.MINUTE); this.setValue(value); } }], @@ -13994,6 +13994,8 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", height: o.height, valueFormatter: o.valueFormatter, + text: o.text, + watermark: o.watermark, // adapter: this.popup, masker: { offset: this.constants.offset @@ -14589,6 +14591,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", allowEdit: o.allowEdit, text: o.text, + watermark: o.watermark, height: o.height, valueFormatter: o.valueFormatter, // adapter: this.popup, @@ -15682,6 +15685,14 @@ BI.NumberEditor = BI.inherit(BI.Widget, { this.bottomBtn.setEnable(!!v); }, + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + getLastChangedValue: function () { + return this.editor.getLastChangedValue(); + }, + getValue: function () { return this.options.value; }, @@ -26585,6 +26596,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, this.combo = BI.createWidget({ type: "bi.multi_tree_list_combo", element: this, + text: o.text, + watermark: o.watermark, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), width: o.width, @@ -26670,6 +26683,8 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_insert_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), @@ -26756,6 +26771,8 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), diff --git a/src/component/treevaluechooser/combo.listtreevaluechooser.js b/src/component/treevaluechooser/combo.listtreevaluechooser.js index 746dd4fa3..c817cd939 100644 --- a/src/component/treevaluechooser/combo.listtreevaluechooser.js +++ b/src/component/treevaluechooser/combo.listtreevaluechooser.js @@ -26,6 +26,8 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, this.combo = BI.createWidget({ type: "bi.multi_tree_list_combo", element: this, + text: o.text, + watermark: o.watermark, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), width: o.width, diff --git a/src/component/treevaluechooser/combo.treevaluechooser.insert.js b/src/component/treevaluechooser/combo.treevaluechooser.insert.js index 0048ee30e..e8314110f 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.insert.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.insert.js @@ -25,6 +25,8 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_insert_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), diff --git a/src/component/treevaluechooser/combo.treevaluechooser.js b/src/component/treevaluechooser/combo.treevaluechooser.js index d57b88297..84b93f876 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.js @@ -25,6 +25,8 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { } this.combo = BI.createWidget({ type: "bi.multi_tree_combo", + text: o.text, + watermark: o.watermark, element: this, itemsCreator: BI.bind(this._itemsCreator, this), valueFormatter: BI.bind(this._valueFormatter, this), diff --git a/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js b/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js index adf6dfb4b..84f54abcf 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js @@ -36,7 +36,7 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, { }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.HOUR); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.HOUR); this.setValue(value); } }], @@ -72,7 +72,7 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, { }, { eventName: BI.SignEditor.EVENT_CHANGE, action: function () { - var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.MINUTE); + var value = self._autoSwitch(this.getLastChangedValue(), BI.DynamicDateTimeSelect.MINUTE); this.setValue(value); } }], diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index 399df7e02..43d323fe1 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -38,6 +38,8 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", height: o.height, valueFormatter: o.valueFormatter, + text: o.text, + watermark: o.watermark, // adapter: this.popup, masker: { offset: this.constants.offset diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index c291e3fb2..5e965041c 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -39,6 +39,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { type: "bi.multi_select_trigger", allowEdit: o.allowEdit, text: o.text, + watermark: o.watermark, height: o.height, valueFormatter: o.valueFormatter, // adapter: this.popup, diff --git a/src/widget/numbereditor/number.editor.js b/src/widget/numbereditor/number.editor.js index 8ef971d40..fd8f4171f 100644 --- a/src/widget/numbereditor/number.editor.js +++ b/src/widget/numbereditor/number.editor.js @@ -105,6 +105,14 @@ BI.NumberEditor = BI.inherit(BI.Widget, { this.bottomBtn.setEnable(!!v); }, + getLastValidValue: function () { + return this.editor.getLastValidValue(); + }, + + getLastChangedValue: function () { + return this.editor.getLastChangedValue(); + }, + getValue: function () { return this.options.value; },