Browse Source

REPORT-60473 fix:实现下setWaterMark

es6
freddy 3 years ago
parent
commit
f5c47f8802
  1. 4
      src/base/combination/searcher.js
  2. 2
      src/case/editor/editor.state.js
  3. 3
      src/case/editor/editor.state.simple.js
  4. 4
      src/component/treevaluechooser/combo.listtreevaluechooser.js
  5. 4
      src/component/treevaluechooser/combo.treevaluechooser.insert.js
  6. 4
      src/component/treevaluechooser/combo.treevaluechooser.js
  7. 4
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  8. 4
      src/widget/multilayerselecttree/multilayerselecttree.trigger.js
  9. 4
      src/widget/multilayersingletree/multilayersingletree.combo.js
  10. 4
      src/widget/multilayersingletree/multilayersingletree.trigger.js
  11. 4
      src/widget/multiselect/multiselect.trigger.js
  12. 4
      src/widget/multiselect/trigger/editor.multiselect.js
  13. 4
      src/widget/multitree/multi.tree.combo.js
  14. 4
      src/widget/multitree/multi.tree.insert.combo.js
  15. 4
      src/widget/multitree/multi.tree.list.combo.js
  16. 4
      src/widget/multitree/trigger/searcher.list.multi.tree.js
  17. 4
      src/widget/multitree/trigger/searcher.multi.tree.js
  18. 2
      typescript/component/treevaluechooser/combo.listtreevaluechooser.ts
  19. 2
      typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts
  20. 2
      typescript/component/treevaluechooser/combo.treevaluechooser.ts
  21. 2
      typescript/widget/multitree/multi.tree.combo.ts
  22. 2
      typescript/widget/multitree/multi.tree.insert.combo.ts
  23. 2
      typescript/widget/multitree/multi.tree.list.combo.ts

4
src/base/combination/searcher.js

@ -315,6 +315,10 @@ BI.Searcher = BI.inherit(BI.Widget, {
blur: function () { blur: function () {
this.editor.blur(); this.editor.blur();
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
} }
}); });
BI.Searcher.EVENT_CHANGE = "EVENT_CHANGE"; BI.Searcher.EVENT_CHANGE = "EVENT_CHANGE";

2
src/case/editor/editor.state.js

@ -156,6 +156,8 @@ BI.StateEditor = BI.inherit(BI.Widget, {
setWaterMark: function (v) { setWaterMark: function (v) {
this.options.watermark = v; this.options.watermark = v;
this.options.defaultText = v;
this.setState(BI.isNull(this.stateValue) || this.stateValue === "" ? v : this.stateValue);
this.editor.setWaterMark(v); this.editor.setWaterMark(v);
}, },

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

@ -143,6 +143,8 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
setWaterMark: function (v) { setWaterMark: function (v) {
this.options.watermark = v; this.options.watermark = v;
this.options.text = v;
this.setState(this.stateValue);
this.editor.setWaterMark(v); this.editor.setWaterMark(v);
}, },
@ -232,6 +234,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
setState: function (v) { setState: function (v) {
var o = this.options; var o = this.options;
BI.SimpleStateEditor.superclass.setValue.apply(this, arguments); BI.SimpleStateEditor.superclass.setValue.apply(this, arguments);
this.stateValue = v;
if (BI.isNumber(v)) { if (BI.isNumber(v)) {
if (v === BI.Selection.All) { if (v === BI.Selection.All) {
this._setText(BI.i18nText("BI-Already_Selected")); this._setText(BI.i18nText("BI-Already_Selected"));

4
src/component/treevaluechooser/combo.listtreevaluechooser.js

@ -110,6 +110,10 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
blur: function () { blur: function () {
this.combo.blur(); this.combo.blur();
},
setWaterMark: function (v) {
this.combo.setWaterMark(v);
} }
}); });

4
src/component/treevaluechooser/combo.treevaluechooser.insert.js

@ -109,6 +109,10 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, {
blur: function () { blur: function () {
this.combo.blur(); this.combo.blur();
},
setWaterMark: function (v) {
this.combo.setWaterMark(v);
} }
}); });

4
src/component/treevaluechooser/combo.treevaluechooser.js

@ -113,6 +113,10 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
blur: function () { blur: function () {
this.combo.blur(); this.combo.blur();
},
setWaterMark: function (v) {
this.combo.setWaterMark(v);
} }
}); });

4
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -250,6 +250,10 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
showView: function () { showView: function () {
this.combo.showView(); this.combo.showView();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
} }
}); });

4
src/widget/multilayerselecttree/multilayerselecttree.trigger.js

@ -245,6 +245,10 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
blur: function () { blur: function () {
this.searcher.blur(); this.searcher.blur();
},
setWaterMark: function (v) {
this.searcher.setWaterMark(v);
} }
}); });

4
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -251,6 +251,10 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
showView: function () { showView: function () {
this.combo.showView(); this.combo.showView();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
} }
}); });

4
src/widget/multilayersingletree/multilayersingletree.trigger.js

@ -247,6 +247,10 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
blur: function () { blur: function () {
this.searcher.blur(); this.searcher.blur();
},
setWaterMark: function (v) {
this.searcher.setWaterMark(v);
} }
}); });
BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS = "EVENT_FOCUS";

4
src/widget/multiselect/multiselect.trigger.js

@ -144,6 +144,10 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
blur: function () { blur: function () {
this.searcher.blur(); this.searcher.blur();
},
setWaterMark: function (v) {
this.searcher.setWaterMark(v);
} }
}); });

4
src/widget/multiselect/trigger/editor.multiselect.js

@ -93,6 +93,10 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, {
populate: function (items) { populate: function (items) {
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
} }
}); });

4
src/widget/multitree/multi.tree.combo.js

@ -352,6 +352,10 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
blur: function () { blur: function () {
this.trigger.blur(); this.trigger.blur();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
} }
}); });

4
src/widget/multitree/multi.tree.insert.combo.js

@ -368,6 +368,10 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
blur: function () { blur: function () {
this.trigger.blur(); this.trigger.blur();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
} }
}); });

4
src/widget/multitree/multi.tree.list.combo.js

@ -386,6 +386,10 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
blur: function () { blur: function () {
this.trigger.blur(); this.trigger.blur();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
} }
}); });

4
src/widget/multitree/trigger/searcher.list.multi.tree.js

@ -172,6 +172,10 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
blur: function () { blur: function () {
this.editor.blur(); this.editor.blur();
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
} }
}); });

4
src/widget/multitree/trigger/searcher.multi.tree.js

@ -192,6 +192,10 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
blur: function () { blur: function () {
this.editor.blur(); this.editor.blur();
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
} }
}); });

2
typescript/component/treevaluechooser/combo.listtreevaluechooser.ts

@ -27,4 +27,6 @@ export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeVal
focus(): void; focus(): void;
blur(): void; blur(): void;
setWaterMark(v: string): void;
} }

2
typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts

@ -26,4 +26,6 @@ export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChoose
focus(): void; focus(): void;
blur(): void; blur(): void;
setWaterMark(v: string): void;
} }

2
typescript/component/treevaluechooser/combo.treevaluechooser.ts

@ -28,4 +28,6 @@ export declare class TreeValueChooserCombo extends AbstractTreeValueChooser {
focus(): void; focus(): void;
blur(): void; blur(): void;
setWaterMark(v: string): void;
} }

2
typescript/widget/multitree/multi.tree.combo.ts

@ -19,4 +19,6 @@ export declare class MultiTreeCombo extends Single {
focus(): void; focus(): void;
blur(): void; blur(): void;
setWaterMark(v: string): void;
} }

2
typescript/widget/multitree/multi.tree.insert.combo.ts

@ -27,4 +27,6 @@ export declare class MultiTreeInsertCombo extends Single {
focus(): void; focus(): void;
blur(): void; blur(): void;
setWaterMark(v: string): void;
} }

2
typescript/widget/multitree/multi.tree.list.combo.ts

@ -26,4 +26,6 @@ export declare class MultiTreeListCombo extends Single {
focus(): void; focus(): void;
blur(): void; blur(): void;
setWaterMark(v: string): void;
} }

Loading…
Cancel
Save