guy 7 years ago
parent
commit
eed14a4d76
  1. 3
      bi/base.css
  2. 9
      bi/base.js
  3. 32
      bi/case.js
  4. 3
      docs/base.css
  5. 9
      docs/base.js
  6. 32
      docs/case.js
  7. 9
      src/base/combination/combo.js
  8. 32
      src/case/combo/bubblecombo/combo.bubble.js
  9. 3
      src/css/base/combo/combo.bubble.css
  10. 3
      src/less/base/combo/combo.bubble.less

3
bi/base.css

@ -32,6 +32,9 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important;
}
.bi-bubble-combo .bubble-combo-triangle-left {
z-index: 1;
width: 0;

9
bi/base.js

@ -2903,6 +2903,7 @@ BI.Combo = BI.inherit(BI.Widget, {
toggle: true,
direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
isDefaultInit: false,
destroyWhenHide: false,
isNeedAdjustHeight: true,//是否需要高度调整
isNeedAdjustWidth: true,
stopEvent: false,
@ -3088,7 +3089,13 @@ BI.Combo = BI.inherit(BI.Widget, {
_hideView: function () {
this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW);
this.popupView && this.popupView.invisible();
if (this.options.destroyWhenHide === true) {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
} else {
this.popupView && this.popupView.invisible();
}
this.element.removeClass(this.options.comboClass);
$(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName());

32
bi/case.js

@ -4761,6 +4761,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
toggle: true,
direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
isDefaultInit: false,
destroyWhenHide: false,
isNeedAdjustHeight: true,//是否需要高度调整
isNeedAdjustWidth: true,
stopPropagation: false,
@ -4783,6 +4784,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
toggle: o.toggle,
direction: o.direction,
isDefaultInit: o.isDefaultInit,
destroyWhenHide: o.destroyWhenHide,
isNeedAdjustHeight: o.isNeedAdjustHeight,
isNeedAdjustWidth: o.isNeedAdjustWidth,
adjustLength: this._getAdjustLength(),
@ -4833,37 +4835,40 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_createTriangle: function (direction) {
var pos = {}, op = {};
var adjustLength = this._getAdjustLength();
var adjustLength = this.options.adjustLength;
var offset = this.element.offset();
var left = offset.left, right = offset.left + this.element.outerWidth();
var top = offset.top, bottom = offset.top + this.element.outerHeight();
switch (direction) {
case "left":
pos = {
top: 0,
bottom: 0,
left: -adjustLength
top: top,
height: this.element.outerHeight(),
left: left - adjustLength - this._const.TRIANGLE_LENGTH
};
op = {width: this._const.TRIANGLE_LENGTH};
break;
case "right":
pos = {
top: 0,
bottom: 0,
right: -adjustLength
top: top,
height: this.element.outerHeight(),
left: right + adjustLength
};
op = {width: this._const.TRIANGLE_LENGTH};
break;
case "top":
pos = {
left: 0,
right: 0,
top: -adjustLength
left: left,
width: this.element.outerWidth(),
top: top - adjustLength - this._const.TRIANGLE_LENGTH
};
op = {height: this._const.TRIANGLE_LENGTH};
break;
case "bottom":
pos = {
left: 0,
right: 0,
bottom: -adjustLength
left: left,
width: this.element.outerWidth(),
top: bottom + adjustLength
};
op = {height: this._const.TRIANGLE_LENGTH};
break;
@ -4872,6 +4877,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
}
this.triangle = BI.createWidget(op, {
type: "bi.center_adapt",
cls: "button-combo-triangle-wrapper",
items: [{
type: "bi.layout",
cls: "bubble-combo-triangle-" + direction + " bi-high-light-border"

3
docs/base.css

@ -32,6 +32,9 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important;
}
.bi-bubble-combo .bubble-combo-triangle-left {
z-index: 1;
width: 0;

9
docs/base.js

@ -2903,6 +2903,7 @@ BI.Combo = BI.inherit(BI.Widget, {
toggle: true,
direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
isDefaultInit: false,
destroyWhenHide: false,
isNeedAdjustHeight: true,//是否需要高度调整
isNeedAdjustWidth: true,
stopEvent: false,
@ -3088,7 +3089,13 @@ BI.Combo = BI.inherit(BI.Widget, {
_hideView: function () {
this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW);
this.popupView && this.popupView.invisible();
if (this.options.destroyWhenHide === true) {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
} else {
this.popupView && this.popupView.invisible();
}
this.element.removeClass(this.options.comboClass);
$(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName());

32
docs/case.js

@ -4761,6 +4761,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
toggle: true,
direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
isDefaultInit: false,
destroyWhenHide: false,
isNeedAdjustHeight: true,//是否需要高度调整
isNeedAdjustWidth: true,
stopPropagation: false,
@ -4783,6 +4784,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
toggle: o.toggle,
direction: o.direction,
isDefaultInit: o.isDefaultInit,
destroyWhenHide: o.destroyWhenHide,
isNeedAdjustHeight: o.isNeedAdjustHeight,
isNeedAdjustWidth: o.isNeedAdjustWidth,
adjustLength: this._getAdjustLength(),
@ -4833,37 +4835,40 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_createTriangle: function (direction) {
var pos = {}, op = {};
var adjustLength = this._getAdjustLength();
var adjustLength = this.options.adjustLength;
var offset = this.element.offset();
var left = offset.left, right = offset.left + this.element.outerWidth();
var top = offset.top, bottom = offset.top + this.element.outerHeight();
switch (direction) {
case "left":
pos = {
top: 0,
bottom: 0,
left: -adjustLength
top: top,
height: this.element.outerHeight(),
left: left - adjustLength - this._const.TRIANGLE_LENGTH
};
op = {width: this._const.TRIANGLE_LENGTH};
break;
case "right":
pos = {
top: 0,
bottom: 0,
right: -adjustLength
top: top,
height: this.element.outerHeight(),
left: right + adjustLength
};
op = {width: this._const.TRIANGLE_LENGTH};
break;
case "top":
pos = {
left: 0,
right: 0,
top: -adjustLength
left: left,
width: this.element.outerWidth(),
top: top - adjustLength - this._const.TRIANGLE_LENGTH
};
op = {height: this._const.TRIANGLE_LENGTH};
break;
case "bottom":
pos = {
left: 0,
right: 0,
bottom: -adjustLength
left: left,
width: this.element.outerWidth(),
top: bottom + adjustLength
};
op = {height: this._const.TRIANGLE_LENGTH};
break;
@ -4872,6 +4877,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
}
this.triangle = BI.createWidget(op, {
type: "bi.center_adapt",
cls: "button-combo-triangle-wrapper",
items: [{
type: "bi.layout",
cls: "bubble-combo-triangle-" + direction + " bi-high-light-border"

9
src/base/combination/combo.js

@ -11,6 +11,7 @@ BI.Combo = BI.inherit(BI.Widget, {
toggle: true,
direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
isDefaultInit: false,
destroyWhenHide: false,
isNeedAdjustHeight: true,//是否需要高度调整
isNeedAdjustWidth: true,
stopEvent: false,
@ -196,7 +197,13 @@ BI.Combo = BI.inherit(BI.Widget, {
_hideView: function () {
this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW);
this.popupView && this.popupView.invisible();
if (this.options.destroyWhenHide === true) {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
} else {
this.popupView && this.popupView.invisible();
}
this.element.removeClass(this.options.comboClass);
$(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName());

32
src/case/combo/bubblecombo/combo.bubble.js

@ -15,6 +15,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
toggle: true,
direction: "bottom", //top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
isDefaultInit: false,
destroyWhenHide: false,
isNeedAdjustHeight: true,//是否需要高度调整
isNeedAdjustWidth: true,
stopPropagation: false,
@ -37,6 +38,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
toggle: o.toggle,
direction: o.direction,
isDefaultInit: o.isDefaultInit,
destroyWhenHide: o.destroyWhenHide,
isNeedAdjustHeight: o.isNeedAdjustHeight,
isNeedAdjustWidth: o.isNeedAdjustWidth,
adjustLength: this._getAdjustLength(),
@ -87,37 +89,40 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_createTriangle: function (direction) {
var pos = {}, op = {};
var adjustLength = this._getAdjustLength();
var adjustLength = this.options.adjustLength;
var offset = this.element.offset();
var left = offset.left, right = offset.left + this.element.outerWidth();
var top = offset.top, bottom = offset.top + this.element.outerHeight();
switch (direction) {
case "left":
pos = {
top: 0,
bottom: 0,
left: -adjustLength
top: top,
height: this.element.outerHeight(),
left: left - adjustLength - this._const.TRIANGLE_LENGTH
};
op = {width: this._const.TRIANGLE_LENGTH};
break;
case "right":
pos = {
top: 0,
bottom: 0,
right: -adjustLength
top: top,
height: this.element.outerHeight(),
left: right + adjustLength
};
op = {width: this._const.TRIANGLE_LENGTH};
break;
case "top":
pos = {
left: 0,
right: 0,
top: -adjustLength
left: left,
width: this.element.outerWidth(),
top: top - adjustLength - this._const.TRIANGLE_LENGTH
};
op = {height: this._const.TRIANGLE_LENGTH};
break;
case "bottom":
pos = {
left: 0,
right: 0,
bottom: -adjustLength
left: left,
width: this.element.outerWidth(),
top: bottom + adjustLength
};
op = {height: this._const.TRIANGLE_LENGTH};
break;
@ -126,6 +131,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
}
this.triangle = BI.createWidget(op, {
type: "bi.center_adapt",
cls: "button-combo-triangle-wrapper",
items: [{
type: "bi.layout",
cls: "bubble-combo-triangle-" + direction + " bi-high-light-border"

3
src/css/base/combo/combo.bubble.css

@ -1,6 +1,9 @@
/****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/
.bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important;
}
.bi-bubble-combo .bubble-combo-triangle-left {
z-index: 1;
width: 0;

3
src/less/base/combo/combo.bubble.less

@ -1,6 +1,9 @@
@import "../../bibase";
.bi-bubble-combo {
& .button-combo-triangle-wrapper {
position: fixed !important;
}
& .bubble-combo-triangle-left {
z-index: 1;
.solid-triangle-right(@color-bi-background-highlight);

Loading…
Cancel
Save