Browse Source

REPORT-60473 && REPORT-64922 fix:实现下拉框和日期控件focus blur和日期控件setWaterMark

es6
freddy 3 years ago
parent
commit
ed1452ea80
  1. 8
      src/base/combination/searcher.js
  2. 8
      src/component/treevaluechooser/combo.listtreevaluechooser.js
  3. 8
      src/component/treevaluechooser/combo.treevaluechooser.insert.js
  4. 8
      src/component/treevaluechooser/combo.treevaluechooser.js
  5. 12
      src/widget/dynamicdate/dynamicdate.combo.js
  6. 13
      src/widget/dynamicdate/dynamicdate.trigger.js
  7. 12
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  8. 13
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js
  9. 12
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  10. 8
      src/widget/multilayerselecttree/multilayerselecttree.trigger.js
  11. 11
      src/widget/multilayersingletree/multilayersingletree.combo.js
  12. 8
      src/widget/multilayersingletree/multilayersingletree.trigger.js
  13. 8
      src/widget/multiselect/multiselect.trigger.js
  14. 8
      src/widget/multiselect/trigger/searcher.multiselect.js
  15. 11
      src/widget/multitree/multi.tree.combo.js
  16. 11
      src/widget/multitree/multi.tree.insert.combo.js
  17. 11
      src/widget/multitree/multi.tree.list.combo.js
  18. 8
      src/widget/multitree/trigger/searcher.list.multi.tree.js
  19. 8
      src/widget/multitree/trigger/searcher.multi.tree.js
  20. 12
      src/widget/time/time.combo.js
  21. 13
      src/widget/time/time.trigger.js
  22. 4
      typescript/component/treevaluechooser/combo.listtreevaluechooser.ts
  23. 4
      typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts
  24. 4
      typescript/component/treevaluechooser/combo.treevaluechooser.ts
  25. 6
      typescript/widget/dynamicdate/dynamicdate.combo.ts
  26. 6
      typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts
  27. 4
      typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts
  28. 4
      typescript/widget/multilayersingletree/multilayersingletree.combo.ts
  29. 4
      typescript/widget/multitree/multi.tree.combo.ts
  30. 4
      typescript/widget/multitree/multi.tree.insert.combo.ts
  31. 4
      typescript/widget/multitree/multi.tree.list.combo.ts
  32. 6
      typescript/widget/time/time.combo.ts

8
src/base/combination/searcher.js

@ -307,6 +307,14 @@ BI.Searcher = BI.inherit(BI.Widget, {
destroyed: function () {
BI.Maskers.remove(this.getName());
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
}
});
BI.Searcher.EVENT_CHANGE = "EVENT_CHANGE";

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

@ -102,6 +102,14 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser,
this._initData(items);
}
this.combo.populate();
},
focus: function () {
this.combo.focus();
},
blur: function () {
this.combo.blur();
}
});

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

@ -101,6 +101,14 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, {
this._initData(items);
}
this.combo.populate();
},
focus: function () {
this.combo.focus();
},
blur: function () {
this.combo.blur();
}
});

8
src/component/treevaluechooser/combo.treevaluechooser.js

@ -105,6 +105,14 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
this._initData(items);
}
this.combo.populate();
},
focus: function () {
this.combo.focus();
},
blur: function () {
this.combo.blur();
}
});

12
src/widget/dynamicdate/dynamicdate.combo.js

@ -298,6 +298,18 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
},
hidePopupView: function () {
this.combo.hideView();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
}
});

13
src/widget/dynamicdate/dynamicdate.trigger.js

@ -308,8 +308,19 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
},
getValue: function () {
return this.storeValue;
}
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
}
});
BI.DynamicDateTrigger.EVENT_BLUR = "EVENT_BLUR";

12
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -306,6 +306,18 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
isValid: function () {
return this.trigger.isValid();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
}
});

13
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -379,8 +379,19 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
isValid: function () {
return this.editor.isValid();
}
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
}
});
BI.DynamicDateTimeTrigger.EVENT_BLUR = "EVENT_BLUR";

12
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -156,6 +156,10 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}, {
eventName: BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS,
action: function () {
if (!self.combo.isViewVisible()) {
self.combo.showView();
}
self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_FOCUS);
}
}, {
@ -238,6 +242,14 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
populate: function (items) {
this.combo.populate(items);
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
}
});

8
src/widget/multilayerselecttree/multilayerselecttree.trigger.js

@ -237,6 +237,14 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
getValue: function () {
return this.searcher.getValue();
},
focus: function () {
this.searcher.focus();
},
blur: function () {
this.searcher.blur();
}
});

11
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -158,6 +158,9 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}, {
eventName: BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS,
action: function () {
if (!self.combo.isViewVisible()) {
self.combo.showView();
}
self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_FOCUS);
}
}, {
@ -239,6 +242,14 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
populate: function (items) {
this.combo.populate(items);
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
}
});

8
src/widget/multilayersingletree/multilayersingletree.trigger.js

@ -239,6 +239,14 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
getValue: function () {
return this.searcher.getValue();
},
focus: function () {
this.searcher.focus();
},
blur: function () {
this.searcher.blur();
}
});
BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS = "EVENT_FOCUS";

8
src/widget/multiselect/multiselect.trigger.js

@ -136,6 +136,14 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, {
getValue: function () {
return this.searcher.getValue();
},
focus: function () {
this.searcher.focus();
},
blur: function () {
this.searcher.blur();
}
});

8
src/widget/multiselect/trigger/searcher.multiselect.js

@ -94,6 +94,14 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, {
}
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
},
adjustView: function () {
this.searcher.adjustView();
},

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

@ -124,6 +124,9 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
};
this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {
if (!self.combo.isViewVisible()) {
self.combo.showView();
}
self.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS);
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {
@ -344,6 +347,14 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
populate: function () {
this.combo.populate();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
}
});

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

@ -140,6 +140,9 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
};
this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {
if (!self.combo.isViewVisible()) {
self.combo.showView();
}
self.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS);
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {
@ -360,6 +363,14 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
populate: function () {
this.combo.populate();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
}
});

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

@ -158,6 +158,9 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
};
this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {
if (!self.combo.isViewVisible()) {
self.combo.showView();
}
self.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS);
});
this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {
@ -378,6 +381,14 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
populate: function () {
this.combo.populate();
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
}
});

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

@ -153,6 +153,14 @@ BI.MultiListTreeSearcher = BI.inherit(BI.Widget, {
populate: function (items) {
this.searcher.populate.apply(this.searcher, arguments);
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
}
});

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

@ -184,6 +184,14 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
populate: function (items) {
this.searcher.populate.apply(this.searcher, arguments);
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
}
});

12
src/widget/time/time.combo.js

@ -222,6 +222,18 @@
this.setValue(nowTome);
this.hidePopupView();
this.fireEvent(BI.TimeCombo.EVENT_CONFIRM);
},
focus: function () {
this.trigger.focus();
},
blur: function () {
this.trigger.blur();
},
setWaterMark: function (v) {
this.trigger.setWaterMark(v);
}
});

13
src/widget/time/time.trigger.js

@ -180,8 +180,19 @@
getValue: function () {
return this.storeValue;
}
},
focus: function () {
this.editor.focus();
},
blur: function () {
this.editor.blur();
},
setWaterMark: function (v) {
this.editor.setWaterMark(v);
}
});
BI.shortcut("bi.time_trigger", BI.TimeTrigger);
})();

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

@ -23,4 +23,8 @@ export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeVal
populate<T>(items: T[]): void;
getSearcher(): Widget;
focus(): void;
blur(): void;
}

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

@ -22,4 +22,8 @@ export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChoose
populate<T>(items: T[]): void;
getSearcher(): Widget;
focus(): void;
blur(): void;
}

4
typescript/component/treevaluechooser/combo.treevaluechooser.ts

@ -24,4 +24,8 @@ export declare class TreeValueChooserCombo extends AbstractTreeValueChooser {
populate<T>(items: T[]): void;
getSearcher(): Widget;
focus(): void;
blur(): void;
}

6
typescript/widget/dynamicdate/dynamicdate.combo.ts

@ -36,6 +36,12 @@ export declare class DynamicDateCombo extends Single {
hidePopupView(): void;
getValue(): DynamicDataComboValue;
focus(): void;
blur(): void;
setWaterMark(v: string): void;
}
export interface DynamicDataComboValue {

6
typescript/widget/dynamicdatetime/dynamicdatetime.combo.ts

@ -32,4 +32,10 @@ export declare class DynamicDateTimeCombo extends Single {
getKey(): string;
hidePopupView(): void;
focus(): void;
blur(): void;
setWaterMark(v: string): void
}

4
typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts

@ -15,4 +15,8 @@ export declare class MultiLayerSelectTreeCombo extends Widget {
populate<T>(items: T[]): void;
getSearcher(): Widget;
focus(): void;
blur(): void;
}

4
typescript/widget/multilayersingletree/multilayersingletree.combo.ts

@ -15,4 +15,8 @@ export declare class MultiLayerSingleTreeCombo extends Widget {
populate<T>(items: T[]): void;
getSearcher(): Widget;
focus(): void;
blur(): void;
}

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

@ -15,4 +15,8 @@ export declare class MultiTreeCombo extends Single {
hideView(): void;
getSearcher(): Widget;
focus(): void;
blur(): void;
}

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

@ -23,4 +23,8 @@ export declare class MultiTreeInsertCombo extends Single {
populate(): void;
getSearcher(): Widget;
focus(): void;
blur(): void;
}

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

@ -22,4 +22,8 @@ export declare class MultiTreeListCombo extends Single {
populate(): void;
getSearcher(): Widget;
focus(): void;
blur(): void;
}

6
typescript/widget/time/time.combo.ts

@ -10,4 +10,10 @@ export declare class TimeCombo extends Single {
static EVENT_BEFORE_POPUPVIEW: string;
hidePopupView(): void;
focus(): void;
blur(): void;
setWaterMark(v: string): void;
}

Loading…
Cancel
Save