diff --git a/bi/base.js b/bi/base.js index 511fb732d..cc33c66a5 100644 --- a/bi/base.js +++ b/bi/base.js @@ -2935,7 +2935,7 @@ BI.Combo = BI.inherit(BI.Widget, { } } }, BI.EVENT_RESPONSE_TIME, true); - self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function(e){ + self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function (e) { debounce(e); st(e); }); @@ -3051,7 +3051,7 @@ BI.Combo = BI.inherit(BI.Widget, { break; case "top": case "top,right": - p = $.getComboPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'right', 'left'], o.offsetStyle); + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'right', 'left'], o.offsetStyle); break; case "left": case "left,bottom": @@ -19759,6 +19759,8 @@ BI.Tooltip = BI.inherit(BI.Tip, { extraCls: "bi-tooltip", text: "", level: "success",//success或warning + stopEvent: false, + stopPropagation: false, height: 20 }) }, @@ -19767,9 +19769,8 @@ BI.Tooltip = BI.inherit(BI.Tip, { var self = this, o = this.options; this.element.addClass("tooltip-" + o.level); var fn = function (e) { - e.stopPropagation(); - e.stopEvent(); - return false; + o.stopPropagation && e.stopPropagation(); + o.stopEvent && e.stopEvent(); }; this.element.bind({ "click": fn, diff --git a/bi/core.js b/bi/core.js index d231221cd..0ea460553 100644 --- a/bi/core.js +++ b/bi/core.js @@ -4512,6 +4512,7 @@ BI.Widget = BI.inherit(BI.OB, { setVisible: function (visible) { if (visible === true) { this.options.invisible = false; + //用this.element.show()会把display属性改成block this.element.css("display", ""); this._mount(); } else if (visible === false) { @@ -16186,6 +16187,7 @@ BI.TooltipsController = BI.inherit(BI.Controller, { type: "bi.tooltip", text: text, level: level, + stopEvent: true, height: this._const.height }); }, @@ -17068,7 +17070,9 @@ BI.extend(jQuery, { } break; } - popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); + if(needAdaptHeight === true) { + popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); + } return position; } });/** diff --git a/docs/base.js b/docs/base.js index 511fb732d..cc33c66a5 100644 --- a/docs/base.js +++ b/docs/base.js @@ -2935,7 +2935,7 @@ BI.Combo = BI.inherit(BI.Widget, { } } }, BI.EVENT_RESPONSE_TIME, true); - self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function(e){ + self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function (e) { debounce(e); st(e); }); @@ -3051,7 +3051,7 @@ BI.Combo = BI.inherit(BI.Widget, { break; case "top": case "top,right": - p = $.getComboPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'right', 'left'], o.offsetStyle); + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'right', 'left'], o.offsetStyle); break; case "left": case "left,bottom": @@ -19759,6 +19759,8 @@ BI.Tooltip = BI.inherit(BI.Tip, { extraCls: "bi-tooltip", text: "", level: "success",//success或warning + stopEvent: false, + stopPropagation: false, height: 20 }) }, @@ -19767,9 +19769,8 @@ BI.Tooltip = BI.inherit(BI.Tip, { var self = this, o = this.options; this.element.addClass("tooltip-" + o.level); var fn = function (e) { - e.stopPropagation(); - e.stopEvent(); - return false; + o.stopPropagation && e.stopPropagation(); + o.stopEvent && e.stopEvent(); }; this.element.bind({ "click": fn, diff --git a/docs/core.js b/docs/core.js index 0fe1565f2..bb99b48a9 100644 --- a/docs/core.js +++ b/docs/core.js @@ -14507,6 +14507,7 @@ BI.Widget = BI.inherit(BI.OB, { setVisible: function (visible) { if (visible === true) { this.options.invisible = false; + //用this.element.show()会把display属性改成block this.element.css("display", ""); this._mount(); } else if (visible === false) { @@ -21260,6 +21261,7 @@ BI.TooltipsController = BI.inherit(BI.Controller, { type: "bi.tooltip", text: text, level: level, + stopEvent: true, height: this._const.height }); }, @@ -22567,7 +22569,9 @@ BI.extend(jQuery, { } break; } - popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); + if(needAdaptHeight === true) { + popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); + } return position; } });/** diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 105339c08..fae9df972 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -132,7 +132,7 @@ BI.Combo = BI.inherit(BI.Widget, { } } }, BI.EVENT_RESPONSE_TIME, true); - self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function(e){ + self.element.off(ev + "." + self.getName()).on(ev + "." + self.getName(), function (e) { debounce(e); st(e); }); @@ -248,7 +248,7 @@ BI.Combo = BI.inherit(BI.Widget, { break; case "top": case "top,right": - p = $.getComboPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'right', 'left'], o.offsetStyle); + p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ['top', 'bottom', 'right', 'left'], o.offsetStyle); break; case "left": case "left,bottom": diff --git a/src/base/single/tip/tip.tooltip.js b/src/base/single/tip/tip.tooltip.js index 8d947f6c2..64dd0c594 100644 --- a/src/base/single/tip/tip.tooltip.js +++ b/src/base/single/tip/tip.tooltip.js @@ -15,6 +15,8 @@ BI.Tooltip = BI.inherit(BI.Tip, { extraCls: "bi-tooltip", text: "", level: "success",//success或warning + stopEvent: false, + stopPropagation: false, height: 20 }) }, @@ -23,9 +25,8 @@ BI.Tooltip = BI.inherit(BI.Tip, { var self = this, o = this.options; this.element.addClass("tooltip-" + o.level); var fn = function (e) { - e.stopPropagation(); - e.stopEvent(); - return false; + o.stopPropagation && e.stopPropagation(); + o.stopEvent && e.stopEvent(); }; this.element.bind({ "click": fn, diff --git a/src/core/controller/controller.tooltips.js b/src/core/controller/controller.tooltips.js index 4f0c21dc4..c470722b5 100644 --- a/src/core/controller/controller.tooltips.js +++ b/src/core/controller/controller.tooltips.js @@ -26,6 +26,7 @@ BI.TooltipsController = BI.inherit(BI.Controller, { type: "bi.tooltip", text: text, level: level, + stopEvent: true, height: this._const.height }); }, diff --git a/src/core/func/dom.js b/src/core/func/dom.js index 95213e37c..b8c9d6505 100644 --- a/src/core/func/dom.js +++ b/src/core/func/dom.js @@ -577,7 +577,9 @@ BI.extend(jQuery, { } break; } - popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); + if(needAdaptHeight === true) { + popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); + } return position; } }); \ No newline at end of file diff --git a/src/core/widget.js b/src/core/widget.js index 2805ce98b..af3aed4ca 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -208,6 +208,7 @@ BI.Widget = BI.inherit(BI.OB, { setVisible: function (visible) { if (visible === true) { this.options.invisible = false; + //用this.element.show()会把display属性改成block this.element.css("display", ""); this._mount(); } else if (visible === false) {