From 645c4685c44b4d0c809737dce9e80dccba305eb3 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 14 Jun 2019 15:06:39 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-702=20feat:=20=E6=A0=91=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E5=8F=AF=E9=85=8Dtrigger=E9=BB=98=E8=AE=A4=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=96=87=E6=9C=AC=20&&=20simple=5Fstate=5Feditor?= =?UTF-8?q?=E5=92=8Cstate=5Feditor=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/editor/editor.state.simple.js | 10 ++++++---- src/widget/multitree/multi.tree.insert.combo.js | 1 + src/widget/multitree/multi.tree.list.combo.js | 1 + src/widget/multitree/trigger/searcher.multi.tree.js | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/case/editor/editor.state.simple.js b/src/case/editor/editor.state.simple.js index eff5c303f..a2486f790 100644 --- a/src/case/editor/editor.state.simple.js +++ b/src/case/editor/editor.state.simple.js @@ -21,7 +21,8 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, { allowBlank: true, watermark: "", errorText: "", - height: 24 + height: 24, + text: BI.i18nText("BI-Basic_Unrestricted") }); }, @@ -48,8 +49,8 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, { type: "bi.text_button", cls: "state-editor-infinite-text", textAlign: "left", + text: o.text, height: o.height, - text: BI.i18nText("BI-Basic_Unrestricted"), hgap: 4, handler: function () { self._showInput(); @@ -218,6 +219,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, { }, setState: function (v) { + var o = this.options; BI.SimpleStateEditor.superclass.setValue.apply(this, arguments); if (BI.isNumber(v)) { if (v === BI.Selection.All) { @@ -227,7 +229,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, { this.text.setText(BI.i18nText("BI-Already_Selected")); this.text.element.removeClass("state-editor-infinite-text"); } else { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + this.text.setText(o.text); this.text.element.addClass("state-editor-infinite-text"); } return; @@ -237,7 +239,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, { this.text.setTitle(v); this.text.element.removeClass("state-editor-infinite-text"); } else if (BI.isEmpty(v)) { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + this.text.setText(o.text); this.text.element.addClass("state-editor-infinite-text"); } else { this.text.setText(BI.i18nText("BI-Already_Selected")); diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index 39e06b447..1295282c9 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -46,6 +46,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { }, searcher: { type: "bi.multi_tree_searcher", + text: o.text, itemsCreator: o.itemsCreator, popup: { type: "bi.multi_tree_search_insert_pane", diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index 6b7ffc356..0a97af0b6 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -38,6 +38,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { this.trigger = BI.createWidget({ type: "bi.multi_select_trigger", allowEdit: o.allowEdit, + text: o.text, height: o.height, valueFormatter: o.valueFormatter, // adapter: this.popup, diff --git a/src/widget/multitree/trigger/searcher.multi.tree.js b/src/widget/multitree/trigger/searcher.multi.tree.js index 98da4abc1..2d05ae857 100644 --- a/src/widget/multitree/trigger/searcher.multi.tree.js +++ b/src/widget/multitree/trigger/searcher.multi.tree.js @@ -28,6 +28,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, { height: o.height, el: { type: "bi.simple_state_editor", + text: o.text, height: o.height } });