From 7528b86a78480987351a80abfdd0b016d0d9b736 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 5 Jun 2017 17:24:19 +0800 Subject: [PATCH] add --- bi/base.js | 19 +++++++++++++++---- docs/base.js | 19 +++++++++++++++---- src/base/combination/combo.js | 8 ++++++-- src/base/combination/expander.js | 2 +- src/base/combination/switcher.js | 7 ++++++- src/base/table/table.resizable.js | 2 ++ 6 files changed, 45 insertions(+), 12 deletions(-) diff --git a/bi/base.js b/bi/base.js index 947c621ac..a042a6c63 100644 --- a/bi/base.js +++ b/bi/base.js @@ -2920,10 +2920,14 @@ BI.Combo = BI.inherit(BI.Widget, { if (type === BI.Events.COLLAPSE) { self._hideView(); } - if (type === BI.Events.EXPAND || type === BI.Events.COLLAPSE) { + if (type === BI.Events.EXPAND) { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } + if (type === BI.Events.COLLAPSE) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.isViewVisible() && self.fireEvent(BI.Combo.EVENT_COLLAPSE); } - if (type === BI.Events.CLICK) { self.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE, obj); } @@ -3324,7 +3328,7 @@ BI.Expander = BI.inherit(BI.Widget, { } if (type === BI.Events.COLLAPSE) { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.fireEvent(BI.Expander.EVENT_COLLAPSE); + self.isViewVisible() && self.fireEvent(BI.Expander.EVENT_COLLAPSE); } if (type === BI.Events.CLICK) { self.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE, value, obj); @@ -4486,8 +4490,13 @@ BI.Switcher = BI.inherit(BI.Widget, { if (type === BI.Events.COLLAPSE) { self._hideView(); } - if (type === BI.Events.EXPAND || type === BI.Events.COLLAPSE) { + if (type === BI.Events.EXPAND) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.Switcher.EVENT_EXPAND); + } + if (type === BI.Events.COLLAPSE) { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.isViewVisible() && self.fireEvent(BI.Switcher.EVENT_COLLAPSE); } if (type === BI.Events.CLICK) { self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE, value, obj); @@ -32490,6 +32499,8 @@ BI.ResizableTable = BI.inherit(BI.Widget, { mergeCols: [], mergeRule: BI.emptyFn, columnSize: [], + minColumnSize: [], + maxColumnSize: [], freezeCols: [], header: [], items: [], diff --git a/docs/base.js b/docs/base.js index 947c621ac..a042a6c63 100644 --- a/docs/base.js +++ b/docs/base.js @@ -2920,10 +2920,14 @@ BI.Combo = BI.inherit(BI.Widget, { if (type === BI.Events.COLLAPSE) { self._hideView(); } - if (type === BI.Events.EXPAND || type === BI.Events.COLLAPSE) { + if (type === BI.Events.EXPAND) { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } + if (type === BI.Events.COLLAPSE) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.isViewVisible() && self.fireEvent(BI.Combo.EVENT_COLLAPSE); } - if (type === BI.Events.CLICK) { self.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE, obj); } @@ -3324,7 +3328,7 @@ BI.Expander = BI.inherit(BI.Widget, { } if (type === BI.Events.COLLAPSE) { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.fireEvent(BI.Expander.EVENT_COLLAPSE); + self.isViewVisible() && self.fireEvent(BI.Expander.EVENT_COLLAPSE); } if (type === BI.Events.CLICK) { self.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE, value, obj); @@ -4486,8 +4490,13 @@ BI.Switcher = BI.inherit(BI.Widget, { if (type === BI.Events.COLLAPSE) { self._hideView(); } - if (type === BI.Events.EXPAND || type === BI.Events.COLLAPSE) { + if (type === BI.Events.EXPAND) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.Switcher.EVENT_EXPAND); + } + if (type === BI.Events.COLLAPSE) { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.isViewVisible() && self.fireEvent(BI.Switcher.EVENT_COLLAPSE); } if (type === BI.Events.CLICK) { self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE, value, obj); @@ -32490,6 +32499,8 @@ BI.ResizableTable = BI.inherit(BI.Widget, { mergeCols: [], mergeRule: BI.emptyFn, columnSize: [], + minColumnSize: [], + maxColumnSize: [], freezeCols: [], header: [], items: [], diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 18ef17019..2f79b2930 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -41,10 +41,14 @@ BI.Combo = BI.inherit(BI.Widget, { if (type === BI.Events.COLLAPSE) { self._hideView(); } - if (type === BI.Events.EXPAND || type === BI.Events.COLLAPSE) { + if (type === BI.Events.EXPAND) { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.Combo.EVENT_EXPAND); + } + if (type === BI.Events.COLLAPSE) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.isViewVisible() && self.fireEvent(BI.Combo.EVENT_COLLAPSE); } - if (type === BI.Events.CLICK) { self.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE, obj); } diff --git a/src/base/combination/expander.js b/src/base/combination/expander.js index a204124d3..8c57326af 100644 --- a/src/base/combination/expander.js +++ b/src/base/combination/expander.js @@ -41,7 +41,7 @@ BI.Expander = BI.inherit(BI.Widget, { } if (type === BI.Events.COLLAPSE) { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); - self.fireEvent(BI.Expander.EVENT_COLLAPSE); + self.isViewVisible() && self.fireEvent(BI.Expander.EVENT_COLLAPSE); } if (type === BI.Events.CLICK) { self.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE, value, obj); diff --git a/src/base/combination/switcher.js b/src/base/combination/switcher.js index 9428fa81c..a4edaec70 100644 --- a/src/base/combination/switcher.js +++ b/src/base/combination/switcher.js @@ -35,8 +35,13 @@ BI.Switcher = BI.inherit(BI.Widget, { if (type === BI.Events.COLLAPSE) { self._hideView(); } - if (type === BI.Events.EXPAND || type === BI.Events.COLLAPSE) { + if (type === BI.Events.EXPAND) { + self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.fireEvent(BI.Switcher.EVENT_EXPAND); + } + if (type === BI.Events.COLLAPSE) { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); + self.isViewVisible() && self.fireEvent(BI.Switcher.EVENT_COLLAPSE); } if (type === BI.Events.CLICK) { self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE, value, obj); diff --git a/src/base/table/table.resizable.js b/src/base/table/table.resizable.js index 1055ef37a..2a9194294 100644 --- a/src/base/table/table.resizable.js +++ b/src/base/table/table.resizable.js @@ -22,6 +22,8 @@ BI.ResizableTable = BI.inherit(BI.Widget, { mergeCols: [], mergeRule: BI.emptyFn, columnSize: [], + minColumnSize: [], + maxColumnSize: [], freezeCols: [], header: [], items: [],