Browse Source

Pull request #1584: REPORT-43504 多选树查看已选,关闭popup时需要调整counter大小

Merge in VISUAL/fineui from ~TELLER/fineui:bugfix to master

* commit 'b23670a54b8446d025fca42f311e6b9a5c1c96ba':
  REPORT-43504 fix: 多选树查看已选,关闭popup时需要调整大小
es6
Teller 4 years ago
parent
commit
3ab088731e
  1. 6
      src/widget/multiselect/multiselect.combo.js
  2. 6
      src/widget/multiselect/multiselect.combo.nobar.js
  3. 6
      src/widget/multiselect/multiselect.insert.combo.js
  4. 6
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  5. 4
      src/widget/multiselect/trigger/switcher.checkselected.js
  6. 6
      src/widget/multitree/multi.tree.combo.js
  7. 6
      src/widget/multitree/multi.tree.insert.combo.js
  8. 6
      src/widget/multitree/multi.tree.list.combo.js

6
src/widget/multiselect/multiselect.combo.js

@ -251,6 +251,12 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
});
});
this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () {
BI.nextTick(function () {// 收起时自动调整宽度
self.trigger.refreshPlaceHolderWidth(0);
});
});
this.trigger.element.click(function (e) {
if (self.trigger.element.find(e.target).length > 0) {
self.numberCounter.hideView();

6
src/widget/multiselect/multiselect.combo.nobar.js

@ -248,6 +248,12 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
});
});
this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () {
BI.nextTick(function () {// 收起时自动调整宽度
self.trigger.refreshPlaceHolderWidth(0);
});
});
this.trigger.element.click(function (e) {
if (self.trigger.element.find(e.target).length > 0) {
self.numberCounter.hideView();

6
src/widget/multiselect/multiselect.insert.combo.js

@ -248,6 +248,12 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
});
});
this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () {
BI.nextTick(function () {// 收起时自动调整宽度
self.trigger.refreshPlaceHolderWidth(0);
});
});
this.trigger.element.click(function (e) {
if (self.trigger.element.find(e.target).length > 0) {
self.numberCounter.hideView();

6
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -245,6 +245,12 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
});
});
this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () {
BI.nextTick(function () {// 收起时自动调整宽度
self.trigger.refreshPlaceHolderWidth(0);
});
});
this.trigger.element.click(function (e) {
if (self.trigger.element.find(e.target).length > 0) {
self.numberCounter.hideView();

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

@ -56,6 +56,9 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW, function () {
self.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW);
});
this.switcher.on(BI.Switcher.EVENT_AFTER_HIDEVIEW, function () {
self.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW);
});
this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW, function () {
var me = this;
BI.nextTick(function () {
@ -105,4 +108,5 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";
BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW = "EVENT_AFTER_HIDEVIEW";
BI.shortcut("bi.multi_select_check_selected_switcher", BI.MultiSelectCheckSelectedSwitcher);

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

@ -269,6 +269,12 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
});
});
this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () {
BI.nextTick(function () {// 收起时自动调整宽度
self.trigger.refreshPlaceHolderWidth(0);
});
});
this.trigger.element.click(function (e) {
if (self.trigger.element.find(e.target).length > 0) {
self.numberCounter.hideView();

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

@ -273,6 +273,12 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, {
}
});
this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () {
BI.nextTick(function () {// 收起时自动调整宽度
self.trigger.refreshPlaceHolderWidth(0);
});
});
this.numberCounter.on(BI.Events.VIEW, function (b) {
BI.nextTick(function () {// 自动调整宽度
self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));

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

@ -303,6 +303,12 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, {
});
});
this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_AFTER_HIDEVIEW, function () {
BI.nextTick(function () {// 收起时自动调整宽度
self.trigger.refreshPlaceHolderWidth(0);
});
});
this.trigger.element.click(function (e) {
if (self.trigger.element.find(e.target).length > 0) {
self.numberCounter.hideView();

Loading…
Cancel
Save