windy 8 years ago
parent
commit
62068ed13c
  1. 9
      bi/base.js
  2. 4
      bi/core.js
  3. 9
      docs/base.js
  4. 4
      docs/core.js
  5. 2
      src/base/combination/combo.js
  6. 7
      src/base/single/tip/tip.tooltip.js
  7. 1
      src/core/controller/controller.tooltips.js
  8. 2
      src/core/func/dom.js
  9. 1
      src/core/widget.js

9
bi/base.js

@ -3051,7 +3051,7 @@ BI.Combo = BI.inherit(BI.Widget, {
break; break;
case "top": case "top":
case "top,right": 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; break;
case "left": case "left":
case "left,bottom": case "left,bottom":
@ -19759,6 +19759,8 @@ BI.Tooltip = BI.inherit(BI.Tip, {
extraCls: "bi-tooltip", extraCls: "bi-tooltip",
text: "", text: "",
level: "success",//success或warning level: "success",//success或warning
stopEvent: false,
stopPropagation: false,
height: 20 height: 20
}) })
}, },
@ -19767,9 +19769,8 @@ BI.Tooltip = BI.inherit(BI.Tip, {
var self = this, o = this.options; var self = this, o = this.options;
this.element.addClass("tooltip-" + o.level); this.element.addClass("tooltip-" + o.level);
var fn = function (e) { var fn = function (e) {
e.stopPropagation(); o.stopPropagation && e.stopPropagation();
e.stopEvent(); o.stopEvent && e.stopEvent();
return false;
}; };
this.element.bind({ this.element.bind({
"click": fn, "click": fn,

4
bi/core.js

@ -4512,6 +4512,7 @@ BI.Widget = BI.inherit(BI.OB, {
setVisible: function (visible) { setVisible: function (visible) {
if (visible === true) { if (visible === true) {
this.options.invisible = false; this.options.invisible = false;
//用this.element.show()会把display属性改成block
this.element.css("display", ""); this.element.css("display", "");
this._mount(); this._mount();
} else if (visible === false) { } else if (visible === false) {
@ -16186,6 +16187,7 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
type: "bi.tooltip", type: "bi.tooltip",
text: text, text: text,
level: level, level: level,
stopEvent: true,
height: this._const.height height: this._const.height
}); });
}, },
@ -17068,7 +17070,9 @@ BI.extend(jQuery, {
} }
break; break;
} }
if(needAdaptHeight === true) {
popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight));
}
return position; return position;
} }
});/** });/**

9
docs/base.js

@ -3051,7 +3051,7 @@ BI.Combo = BI.inherit(BI.Widget, {
break; break;
case "top": case "top":
case "top,right": 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; break;
case "left": case "left":
case "left,bottom": case "left,bottom":
@ -19759,6 +19759,8 @@ BI.Tooltip = BI.inherit(BI.Tip, {
extraCls: "bi-tooltip", extraCls: "bi-tooltip",
text: "", text: "",
level: "success",//success或warning level: "success",//success或warning
stopEvent: false,
stopPropagation: false,
height: 20 height: 20
}) })
}, },
@ -19767,9 +19769,8 @@ BI.Tooltip = BI.inherit(BI.Tip, {
var self = this, o = this.options; var self = this, o = this.options;
this.element.addClass("tooltip-" + o.level); this.element.addClass("tooltip-" + o.level);
var fn = function (e) { var fn = function (e) {
e.stopPropagation(); o.stopPropagation && e.stopPropagation();
e.stopEvent(); o.stopEvent && e.stopEvent();
return false;
}; };
this.element.bind({ this.element.bind({
"click": fn, "click": fn,

4
docs/core.js

@ -14507,6 +14507,7 @@ BI.Widget = BI.inherit(BI.OB, {
setVisible: function (visible) { setVisible: function (visible) {
if (visible === true) { if (visible === true) {
this.options.invisible = false; this.options.invisible = false;
//用this.element.show()会把display属性改成block
this.element.css("display", ""); this.element.css("display", "");
this._mount(); this._mount();
} else if (visible === false) { } else if (visible === false) {
@ -21260,6 +21261,7 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
type: "bi.tooltip", type: "bi.tooltip",
text: text, text: text,
level: level, level: level,
stopEvent: true,
height: this._const.height height: this._const.height
}); });
}, },
@ -22567,7 +22569,9 @@ BI.extend(jQuery, {
} }
break; break;
} }
if(needAdaptHeight === true) {
popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight));
}
return position; return position;
} }
});/** });/**

2
src/base/combination/combo.js

@ -248,7 +248,7 @@ BI.Combo = BI.inherit(BI.Widget, {
break; break;
case "top": case "top":
case "top,right": 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; break;
case "left": case "left":
case "left,bottom": case "left,bottom":

7
src/base/single/tip/tip.tooltip.js

@ -15,6 +15,8 @@ BI.Tooltip = BI.inherit(BI.Tip, {
extraCls: "bi-tooltip", extraCls: "bi-tooltip",
text: "", text: "",
level: "success",//success或warning level: "success",//success或warning
stopEvent: false,
stopPropagation: false,
height: 20 height: 20
}) })
}, },
@ -23,9 +25,8 @@ BI.Tooltip = BI.inherit(BI.Tip, {
var self = this, o = this.options; var self = this, o = this.options;
this.element.addClass("tooltip-" + o.level); this.element.addClass("tooltip-" + o.level);
var fn = function (e) { var fn = function (e) {
e.stopPropagation(); o.stopPropagation && e.stopPropagation();
e.stopEvent(); o.stopEvent && e.stopEvent();
return false;
}; };
this.element.bind({ this.element.bind({
"click": fn, "click": fn,

1
src/core/controller/controller.tooltips.js

@ -26,6 +26,7 @@ BI.TooltipsController = BI.inherit(BI.Controller, {
type: "bi.tooltip", type: "bi.tooltip",
text: text, text: text,
level: level, level: level,
stopEvent: true,
height: this._const.height height: this._const.height
}); });
}, },

2
src/core/func/dom.js

@ -577,7 +577,9 @@ BI.extend(jQuery, {
} }
break; break;
} }
if(needAdaptHeight === true) {
popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight)); popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight));
}
return position; return position;
} }
}); });

1
src/core/widget.js

@ -208,6 +208,7 @@ BI.Widget = BI.inherit(BI.OB, {
setVisible: function (visible) { setVisible: function (visible) {
if (visible === true) { if (visible === true) {
this.options.invisible = false; this.options.invisible = false;
//用this.element.show()会把display属性改成block
this.element.css("display", ""); this.element.css("display", "");
this._mount(); this._mount();
} else if (visible === false) { } else if (visible === false) {

Loading…
Cancel
Save