Browse Source

Merge pull request #539 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit '6dea2fbef412101a50064255bdcb41e2f5bcf708':
  update
  层级替换
  update
  update
  BI-28343 && BI-28368 single && combo && date && color && lodash.md && 阴影三角
es6
windy 7 years ago
parent
commit
438a8b3161
  1. 94
      dist/_fineui.min.js
  2. 107
      dist/base.css
  3. 38
      dist/base.js
  4. 107
      dist/bundle.css
  5. 115
      dist/bundle.js
  6. 2
      dist/bundle.min.css
  7. 96
      dist/bundle.min.js
  8. 4
      dist/case.js
  9. 15
      dist/core.js
  10. 107
      dist/fineui.css
  11. 115
      dist/fineui.js
  12. 2
      dist/fineui.min.css
  13. 94
      dist/fineui.min.js
  14. 2
      dist/utils.min.js
  15. 58
      dist/widget.js
  16. 1
      lodash.md
  17. 8
      src/base/combination/combo.js
  18. 3
      src/base/combination/group.combo.js
  19. 4
      src/base/foundation/message.js
  20. 2
      src/base/layer/layer.popup.js
  21. 7
      src/base/single/editor/editor.js
  22. 12
      src/base/single/single.js
  23. 2
      src/base/single/tip/tip.js
  24. 1
      src/case/colorchooser/colorchooser.popup.js
  25. 1
      src/case/combo/textvaluecombo/combo.textvalue.js
  26. 5
      src/core/controller/controller.layer.js
  27. 1
      src/core/controller/controller.masker.js
  28. 9
      src/core/controller/controller.popover.js
  29. 107
      src/css/base/combo/combo.css
  30. 99
      src/less/visual.less
  31. 4
      src/widget/date/calendar/combo.month.date.js
  32. 4
      src/widget/date/calendar/combo.year.date.js
  33. 2
      src/widget/dynamicdate/dynamicdate.card.js
  34. 1
      src/widget/dynamicdate/dynamicdate.param.item.js
  35. 8
      src/widget/multilayerdownlist/popup.downlist.js
  36. 34
      src/widget/numberinterval/numberinterval.js
  37. 5
      src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js

94
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

107
dist/base.css vendored

@ -338,105 +338,78 @@
.bi-bubble-combo .bubble-combo-triangle-left { .bi-bubble-combo .bubble-combo-triangle-left {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 5px; width: 6px;
height: 16px; height: 16px;
border-left: 1px solid #f5f5f5;
} }
.bi-bubble-combo .bubble-combo-triangle-left:before { .bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute; position: absolute;
left: 0px; width: 6px;
top: 0px; height: 6px;
right: 0px; margin-left: 2px;
border-left: 7px solid #ccc; margin-top: -5px;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-left:after {
position: absolute;
top: 1px;
left: 1px;
right: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-bubble-combo .bubble-combo-triangle-right { .bi-bubble-combo .bubble-combo-triangle-right {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 7px; width: 6px;
height: 16px; height: 16px;
} }
.bi-bubble-combo .bubble-combo-triangle-right:before { .bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute; position: absolute;
top: 0px; width: 6px;
right: 0px; height: 6px;
bottom: 0px; margin-left: 2px;
border-right: 7px solid #ccc; margin-top: 5px;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-right:after {
position: absolute;
right: 0px;
top: 0px;
bottom: 0px;
border-right: 7px solid #ffffff;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-bubble-combo .bubble-combo-triangle-top { .bi-bubble-combo .bubble-combo-triangle-top {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 10px; height: 6px;
border-top: 1px solid #ffffff;
}
.bi-bubble-combo .bubble-combo-triangle-top:after {
position: absolute;
right: 1px;
top: 0px;
border-top: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
} }
.bi-bubble-combo .bubble-combo-triangle-top:before { .bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute; position: absolute;
border-top: 7px solid #cccccc; width: 6px;
border-left: 8px solid transparent; height: 6px;
border-right: 8px solid transparent; margin-left: 3px;
margin-top: -3px;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-bubble-combo .bubble-combo-triangle-bottom { .bi-bubble-combo .bubble-combo-triangle-bottom {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 5px; height: 6px;
border-bottom: 1px solid #ffffff;
} }
.bi-bubble-combo .bubble-combo-triangle-bottom:before { .bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute; position: absolute;
top: 0px; width: 6px;
right: 0px; height: 6px;
bottom: 0px; margin-left: 3px;
border-bottom: 7px solid #ccc; margin-top: 3px;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-bottom:after {
position: absolute;
right: 1px;
top: 1px;
bottom: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-combo.bi-combo-popup { .bi-combo.bi-combo-popup {

38
dist/base.js vendored

@ -342,7 +342,9 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null, warningTitle: null,
tipType: null, // success或warning tipType: null, // success或warning
value: null, value: null,
belowMouse: false // title是否跟随鼠标, belowMouse: false, // title是否跟随鼠标,
// 之所以默认为body,是因为transform的效果影响
container: "body"
}); });
}, },
@ -376,7 +378,8 @@ BI.Single = BI.inherit(BI.Widget, {
if (BI.isKey(o.title) || BI.isKey(o.warningTitle) if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover({ this.enableHover({
belowMouse: o.belowMouse belowMouse: o.belowMouse,
container: o.container
}); });
} }
}, },
@ -484,6 +487,11 @@ BI.Single = BI.inherit(BI.Widget, {
getValue: function () { getValue: function () {
return this.options.value; return this.options.value;
},
_unMount: function () {
BI.Single.superclass._unMount.apply(this, arguments);
BI.Tooltips.remove(this.getName());
} }
});/** });/**
* guy 表示一行数据通过position来定位位置的数据 * guy 表示一行数据通过position来定位位置的数据
@ -1085,7 +1093,7 @@ BI.Tip = BI.inherit(BI.Single, {
var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); var conf = BI.Link.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-tip", baseCls: (conf.baseCls || "") + " bi-tip",
zIndex: BI.zIndex_tip zIndex: BI.zIndex_layer++
}); });
}, },
@ -3020,7 +3028,7 @@ BI.Combo = BI.inherit(BI.Widget, {
trigger: "click", trigger: "click",
toggle: true, toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
container: null, // popupview放置的容器,默认为this.element container: "body", // popupview放置的容器,默认为body
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
@ -3478,6 +3486,12 @@ BI.Combo = BI.inherit(BI.Widget, {
.unbind("mouseleave." + this.getName()); .unbind("mouseleave." + this.getName());
BI.Resizers.remove(this.getName()); BI.Resizers.remove(this.getName());
BI.Combo.superclass.destroy.apply(this, arguments); BI.Combo.superclass.destroy.apply(this, arguments);
},
destroyed: function () {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
} }
}); });
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";
@ -3792,7 +3806,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
el: {type: "bi.text_button", text: "", value: ""}, el: {type: "bi.text_button", text: "", value: ""},
children: [], children: [],
container: null,
popup: { popup: {
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
@ -3836,6 +3850,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
element: this, element: this,
container: o.container,
height: o.height, height: o.height,
trigger: o.trigger, trigger: o.trigger,
direction: o.direction, direction: o.direction,
@ -14852,7 +14867,7 @@ $.extend(BI, {
_show: function (hasCancel, title, message, callback) { _show: function (hasCancel, title, message, callback) {
$mask = $("<div class=\"bi-z-index-mask\">").css({ $mask = $("<div class=\"bi-z-index-mask\">").css({
position: "absolute", position: "absolute",
zIndex: BI.zIndex_tip - 2, zIndex: BI.zIndex_layer++,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -14861,7 +14876,7 @@ $.extend(BI, {
}).appendTo("body"); }).appendTo("body");
$pop = $("<div class=\"bi-message-depend\">").css({ $pop = $("<div class=\"bi-message-depend\">").css({
position: "absolute", position: "absolute",
zIndex: BI.zIndex_tip - 1, zIndex: BI.zIndex_layer++,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -15629,7 +15644,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
return false; return false;
}; };
this.element.css({ this.element.css({
"z-index": BI.zIndex_popup, "z-index": BI.zIndex_layer++,
"min-width": o.minWidth + "px", "min-width": o.minWidth + "px",
"max-width": o.maxWidth + "px" "max-width": o.maxWidth + "px"
}).bind({click: fn}); }).bind({click: fn});
@ -18514,7 +18529,8 @@ BI.Editor = BI.inherit(BI.Single, {
} }
if (!this.disabledError && BI.isKey(errorText)) { if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustYOffset: 2 adjustYOffset: 2,
container: "body"
}); });
this._checkToolTip(); this._checkToolTip();
return BI.Bubbles.get(this.getName()); return BI.Bubbles.get(this.getName());
@ -18587,6 +18603,10 @@ BI.Editor = BI.inherit(BI.Single, {
isValid: function () { isValid: function () {
return this.editor.isValid(); return this.editor.isValid();
},
destroyed: function () {
BI.Bubbles.remove(this.getName());
} }
}); });
BI.Editor.EVENT_CHANGE = "EVENT_CHANGE"; BI.Editor.EVENT_CHANGE = "EVENT_CHANGE";

107
dist/bundle.css vendored

@ -2184,105 +2184,78 @@ textarea {
.bi-bubble-combo .bubble-combo-triangle-left { .bi-bubble-combo .bubble-combo-triangle-left {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 5px; width: 6px;
height: 16px; height: 16px;
border-left: 1px solid #f5f5f5;
} }
.bi-bubble-combo .bubble-combo-triangle-left:before { .bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute; position: absolute;
left: 0px; width: 6px;
top: 0px; height: 6px;
right: 0px; margin-left: 2px;
border-left: 7px solid #ccc; margin-top: -5px;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-left:after {
position: absolute;
top: 1px;
left: 1px;
right: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-bubble-combo .bubble-combo-triangle-right { .bi-bubble-combo .bubble-combo-triangle-right {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 7px; width: 6px;
height: 16px; height: 16px;
} }
.bi-bubble-combo .bubble-combo-triangle-right:before { .bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute; position: absolute;
top: 0px; width: 6px;
right: 0px; height: 6px;
bottom: 0px; margin-left: 2px;
border-right: 7px solid #ccc; margin-top: 5px;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-right:after {
position: absolute;
right: 0px;
top: 0px;
bottom: 0px;
border-right: 7px solid #ffffff;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-bubble-combo .bubble-combo-triangle-top { .bi-bubble-combo .bubble-combo-triangle-top {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 10px; height: 6px;
border-top: 1px solid #ffffff;
}
.bi-bubble-combo .bubble-combo-triangle-top:after {
position: absolute;
right: 1px;
top: 0px;
border-top: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
} }
.bi-bubble-combo .bubble-combo-triangle-top:before { .bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute; position: absolute;
border-top: 7px solid #cccccc; width: 6px;
border-left: 8px solid transparent; height: 6px;
border-right: 8px solid transparent; margin-left: 3px;
margin-top: -3px;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-bubble-combo .bubble-combo-triangle-bottom { .bi-bubble-combo .bubble-combo-triangle-bottom {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 5px; height: 6px;
border-bottom: 1px solid #ffffff;
} }
.bi-bubble-combo .bubble-combo-triangle-bottom:before { .bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute; position: absolute;
top: 0px; width: 6px;
right: 0px; height: 6px;
bottom: 0px; margin-left: 3px;
border-bottom: 7px solid #ccc; margin-top: 3px;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-bottom:after {
position: absolute;
right: 1px;
top: 1px;
bottom: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-combo.bi-combo-popup { .bi-combo.bi-combo-popup {

115
dist/bundle.js vendored

@ -27001,7 +27001,6 @@ BI.LayerController = BI.inherit(BI.Controller, {
BI.LayerController.superclass._init.apply(this, arguments); BI.LayerController.superclass._init.apply(this, arguments);
this.layerManager = {}; this.layerManager = {};
this.layouts = {}; this.layouts = {};
this.zindex = BI.zIndex_layer;
BI.Resizers.add("layerController" + BI.uniqueId(), BI.bind(this._resize, this)); BI.Resizers.add("layerController" + BI.uniqueId(), BI.bind(this._resize, this));
}, },
@ -27101,7 +27100,7 @@ BI.LayerController = BI.inherit(BI.Controller, {
return this; return this;
} }
this._getLayout(name).visible(); this._getLayout(name).visible();
this._getLayout(name).element.css("z-index", this.zindex++).show(0, callback).trigger("__resize__"); this._getLayout(name).element.css("z-index", BI.zIndex_layer++).show(0, callback).trigger("__resize__");
return this; return this;
}, },
@ -27116,7 +27115,7 @@ BI.LayerController = BI.inherit(BI.Controller, {
layout.setVisible(false); layout.setVisible(false);
this.layerManager[name] = layer; this.layerManager[name] = layer;
this.layouts[name] = layout; this.layouts[name] = layout;
layout.element.css("z-index", this.zindex++); layout.element.css("z-index", BI.zIndex_layer++);
return this; return this;
}, },
@ -27155,7 +27154,6 @@ BI.MaskersController = BI.inherit(BI.LayerController, {
_init: function () { _init: function () {
BI.MaskersController.superclass._init.apply(this, arguments); BI.MaskersController.superclass._init.apply(this, arguments);
this.zindex = BI.zIndex_masker;
} }
});/** });/**
* guy * guy
@ -27178,7 +27176,6 @@ BI.PopoverController = BI.inherit(BI.Controller, {
this.floatLayer = {}; this.floatLayer = {};
this.floatContainer = {}; this.floatContainer = {};
this.floatOpened = {}; this.floatOpened = {};
this.zindex = BI.zIndex_popover;
this.zindexMap = {}; this.zindexMap = {};
}, },
@ -27244,11 +27241,11 @@ BI.PopoverController = BI.inherit(BI.Controller, {
if (!this.floatOpened[name]) { if (!this.floatOpened[name]) {
this.floatOpened[name] = true; this.floatOpened[name] = true;
var container = this.floatContainer[name]; var container = this.floatContainer[name];
container.element.css("zIndex", this.zindex++); container.element.css("zIndex", BI.zIndex_layer++);
this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]); this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]);
this.zindexMap[name] = this.zindex; this.zindexMap[name] = BI.zIndex_layer;
this.modal && container.element.__buildZIndexMask__(this.zindex++); this.modal && container.element.__buildZIndexMask__(BI.zIndex_layer++);
this.get(name).setZindex(this.zindex++); this.get(name).setZindex(BI.zIndex_layer++);
this.floatContainer[name].visible(); this.floatContainer[name].visible();
var popover = this.get(name); var popover = this.get(name);
popover.show && popover.show(); popover.show && popover.show();
@ -36257,7 +36254,9 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null, warningTitle: null,
tipType: null, // success或warning tipType: null, // success或warning
value: null, value: null,
belowMouse: false // title是否跟随鼠标, belowMouse: false, // title是否跟随鼠标,
// 之所以默认为body,是因为transform的效果影响
container: "body"
}); });
}, },
@ -36291,7 +36290,8 @@ BI.Single = BI.inherit(BI.Widget, {
if (BI.isKey(o.title) || BI.isKey(o.warningTitle) if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover({ this.enableHover({
belowMouse: o.belowMouse belowMouse: o.belowMouse,
container: o.container
}); });
} }
}, },
@ -36399,6 +36399,11 @@ BI.Single = BI.inherit(BI.Widget, {
getValue: function () { getValue: function () {
return this.options.value; return this.options.value;
},
_unMount: function () {
BI.Single.superclass._unMount.apply(this, arguments);
BI.Tooltips.remove(this.getName());
} }
});/** });/**
* guy 表示一行数据通过position来定位位置的数据 * guy 表示一行数据通过position来定位位置的数据
@ -37000,7 +37005,7 @@ BI.Tip = BI.inherit(BI.Single, {
var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); var conf = BI.Link.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-tip", baseCls: (conf.baseCls || "") + " bi-tip",
zIndex: BI.zIndex_tip zIndex: BI.zIndex_layer++
}); });
}, },
@ -38935,7 +38940,7 @@ BI.Combo = BI.inherit(BI.Widget, {
trigger: "click", trigger: "click",
toggle: true, toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
container: null, // popupview放置的容器,默认为this.element container: "body", // popupview放置的容器,默认为body
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
@ -39393,6 +39398,12 @@ BI.Combo = BI.inherit(BI.Widget, {
.unbind("mouseleave." + this.getName()); .unbind("mouseleave." + this.getName());
BI.Resizers.remove(this.getName()); BI.Resizers.remove(this.getName());
BI.Combo.superclass.destroy.apply(this, arguments); BI.Combo.superclass.destroy.apply(this, arguments);
},
destroyed: function () {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
} }
}); });
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";
@ -39707,7 +39718,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
el: {type: "bi.text_button", text: "", value: ""}, el: {type: "bi.text_button", text: "", value: ""},
children: [], children: [],
container: null,
popup: { popup: {
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
@ -39751,6 +39762,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
element: this, element: this,
container: o.container,
height: o.height, height: o.height,
trigger: o.trigger, trigger: o.trigger,
direction: o.direction, direction: o.direction,
@ -50767,7 +50779,7 @@ $.extend(BI, {
_show: function (hasCancel, title, message, callback) { _show: function (hasCancel, title, message, callback) {
$mask = $("<div class=\"bi-z-index-mask\">").css({ $mask = $("<div class=\"bi-z-index-mask\">").css({
position: "absolute", position: "absolute",
zIndex: BI.zIndex_tip - 2, zIndex: BI.zIndex_layer++,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -50776,7 +50788,7 @@ $.extend(BI, {
}).appendTo("body"); }).appendTo("body");
$pop = $("<div class=\"bi-message-depend\">").css({ $pop = $("<div class=\"bi-message-depend\">").css({
position: "absolute", position: "absolute",
zIndex: BI.zIndex_tip - 1, zIndex: BI.zIndex_layer++,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -51544,7 +51556,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
return false; return false;
}; };
this.element.css({ this.element.css({
"z-index": BI.zIndex_popup, "z-index": BI.zIndex_layer++,
"min-width": o.minWidth + "px", "min-width": o.minWidth + "px",
"max-width": o.maxWidth + "px" "max-width": o.maxWidth + "px"
}).bind({click: fn}); }).bind({click: fn});
@ -54429,7 +54441,8 @@ BI.Editor = BI.inherit(BI.Single, {
} }
if (!this.disabledError && BI.isKey(errorText)) { if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustYOffset: 2 adjustYOffset: 2,
container: "body"
}); });
this._checkToolTip(); this._checkToolTip();
return BI.Bubbles.get(this.getName()); return BI.Bubbles.get(this.getName());
@ -54502,6 +54515,10 @@ BI.Editor = BI.inherit(BI.Single, {
isValid: function () { isValid: function () {
return this.editor.isValid(); return this.editor.isValid();
},
destroyed: function () {
BI.Bubbles.remove(this.getName());
} }
}); });
BI.Editor.EVENT_CHANGE = "EVENT_CHANGE"; BI.Editor.EVENT_CHANGE = "EVENT_CHANGE";
@ -76477,6 +76494,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.more = BI.createWidget({ this.more = BI.createWidget({
type: "bi.combo", type: "bi.combo",
container: null,
direction: "right,top", direction: "right,top",
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
el: { el: {
@ -79371,6 +79389,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
}); });
this.textIconCombo = BI.createWidget({ this.textIconCombo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
container: o.container,
element: this, element: this,
adjustLength: 2, adjustLength: 2,
el: this.trigger, el: this.trigger,
@ -83496,7 +83515,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
setValue: function (v) { setValue: function (v) {
v = v || ( isIE11Below() ? "" : "<br>"); v = v || ( isIE11Below() ? "" : "<br>");
v = ($(v)[0] && $(v)[0].nodeName === "P") ? v : "<p>" + v + "</p>"; v = v.startWith("<p") ? v : "<p>" + v + "</p>";
this.instance.setContent(v); this.instance.setContent(v);
}, },
@ -88438,7 +88457,8 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-month-combo", baseCls: "bi-month-combo",
height: 24 height: 24,
container: null
}); });
}, },
_init: function () { _init: function () {
@ -88462,6 +88482,7 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
offsetStyle: "center", offsetStyle: "center",
container: null,
element: this, element: this,
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
@ -88506,7 +88527,8 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
behaviors: {}, behaviors: {},
height: 24 height: 24,
container: null
}); });
}, },
_init: function () { _init: function () {
@ -88535,6 +88557,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
type: "bi.combo", type: "bi.combo",
offsetStyle: "center", offsetStyle: "center",
element: this, element: this,
container: o.container,
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: this.trigger, el: this.trigger,
@ -91085,6 +91108,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
type: "bi.text_value_combo", type: "bi.text_value_combo",
height: 24, height: 24,
items: comboItems, items: comboItems,
container: null,
value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT, value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,
listeners: [{ listeners: [{
eventName: "EVENT_CHANGE", eventName: "EVENT_CHANGE",
@ -91099,6 +91123,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
items.push({ items.push({
type: "bi.text_value_combo", type: "bi.text_value_combo",
height: 24, height: 24,
container: null,
items: this._getText(BI.last(values).dateType), items: this._getText(BI.last(values).dateType),
value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT, value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,
listeners: [{ listeners: [{
@ -91603,6 +91628,7 @@ BI.extend(BI.DynamicDateCombo, {
ref: function () { ref: function () {
self.offsetCombo = this; self.offsetCombo = this;
}, },
container: null,
value: o.offset, value: o.offset,
listeners: [{ listeners: [{
eventName: BI.TextValueCombo.EVENT_CHANGE, eventName: BI.TextValueCombo.EVENT_CHANGE,
@ -95401,7 +95427,8 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
BI.createWidget({ BI.createWidget({
type: "bi.vertical", type: "bi.vertical",
element: this, element: this,
items: [this.popup] items: [this.popup],
vgap: 5
}); });
}, },
@ -95427,7 +95454,7 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
item.el.height = self.constants.height; item.el.height = self.constants.height;
item.el.iconCls2 = self.constants.nextIcon; item.el.iconCls2 = self.constants.nextIcon;
item.popup = { item.popup = {
lgap: 4, lgap: 1,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: 0, chooseType: 0,
@ -95435,7 +95462,8 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
type: "bi.vertical" type: "bi.vertical"
}] }]
} },
innerVGap: 5
}; };
item.el.childValues = []; item.el.childValues = [];
BI.each(item.children, function (i, child) { BI.each(item.children, function (i, child) {
@ -102638,19 +102666,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
default : default :
@ -102687,7 +102718,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self._checkValidation(); self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
}); });
@ -102701,14 +102733,16 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
@ -102726,19 +102760,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
default : default :
@ -102869,6 +102906,13 @@ BI.NumberInterval = BI.inherit(BI.Single, {
value.closeMax = true; value.closeMax = true;
} }
return value; return value;
},
destroyed: function () {
var c = this.constants;
BI.Bubbles.remove(c.typeError);
BI.Bubbles.remove(c.numberError);
BI.Bubbles.remove(c.signalError);
} }
}); });
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
@ -104124,7 +104168,6 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo", baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo",
height: 24, height: 24,
numOfPage: 10,
items: [] items: []
}); });
}, },
@ -104492,14 +104535,14 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
_getItemsByTimes: function (items, times) { _getItemsByTimes: function (items, times) {
var res = []; var res = [];
for (var i = (times - 1) * this.options.numOfPage; items[i] && i < times * this.options.numOfPage; i++) { for (var i = (times - 1) * 100; items[i] && i < times * 100; i++) {
res.push(items[i]); res.push(items[i]);
} }
return res; return res;
}, },
_hasNextByTimes: function (items, times) { _hasNextByTimes: function (items, times) {
return times * this.options.numOfPage < items.length; return times * 100 < items.length;
}, },
_itemsCreator: function (options, callback) { _itemsCreator: function (options, callback) {

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

96
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

4
dist/case.js vendored

@ -3814,6 +3814,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.more = BI.createWidget({ this.more = BI.createWidget({
type: "bi.combo", type: "bi.combo",
container: null,
direction: "right,top", direction: "right,top",
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
el: { el: {
@ -6708,6 +6709,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
}); });
this.textIconCombo = BI.createWidget({ this.textIconCombo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
container: o.container,
element: this, element: this,
adjustLength: 2, adjustLength: 2,
el: this.trigger, el: this.trigger,
@ -10833,7 +10835,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
setValue: function (v) { setValue: function (v) {
v = v || ( isIE11Below() ? "" : "<br>"); v = v || ( isIE11Below() ? "" : "<br>");
v = ($(v)[0] && $(v)[0].nodeName === "P") ? v : "<p>" + v + "</p>"; v = v.startWith("<p") ? v : "<p>" + v + "</p>";
this.instance.setContent(v); this.instance.setContent(v);
}, },

15
dist/core.js vendored

@ -27001,7 +27001,6 @@ BI.LayerController = BI.inherit(BI.Controller, {
BI.LayerController.superclass._init.apply(this, arguments); BI.LayerController.superclass._init.apply(this, arguments);
this.layerManager = {}; this.layerManager = {};
this.layouts = {}; this.layouts = {};
this.zindex = BI.zIndex_layer;
BI.Resizers.add("layerController" + BI.uniqueId(), BI.bind(this._resize, this)); BI.Resizers.add("layerController" + BI.uniqueId(), BI.bind(this._resize, this));
}, },
@ -27101,7 +27100,7 @@ BI.LayerController = BI.inherit(BI.Controller, {
return this; return this;
} }
this._getLayout(name).visible(); this._getLayout(name).visible();
this._getLayout(name).element.css("z-index", this.zindex++).show(0, callback).trigger("__resize__"); this._getLayout(name).element.css("z-index", BI.zIndex_layer++).show(0, callback).trigger("__resize__");
return this; return this;
}, },
@ -27116,7 +27115,7 @@ BI.LayerController = BI.inherit(BI.Controller, {
layout.setVisible(false); layout.setVisible(false);
this.layerManager[name] = layer; this.layerManager[name] = layer;
this.layouts[name] = layout; this.layouts[name] = layout;
layout.element.css("z-index", this.zindex++); layout.element.css("z-index", BI.zIndex_layer++);
return this; return this;
}, },
@ -27155,7 +27154,6 @@ BI.MaskersController = BI.inherit(BI.LayerController, {
_init: function () { _init: function () {
BI.MaskersController.superclass._init.apply(this, arguments); BI.MaskersController.superclass._init.apply(this, arguments);
this.zindex = BI.zIndex_masker;
} }
});/** });/**
* guy * guy
@ -27178,7 +27176,6 @@ BI.PopoverController = BI.inherit(BI.Controller, {
this.floatLayer = {}; this.floatLayer = {};
this.floatContainer = {}; this.floatContainer = {};
this.floatOpened = {}; this.floatOpened = {};
this.zindex = BI.zIndex_popover;
this.zindexMap = {}; this.zindexMap = {};
}, },
@ -27244,11 +27241,11 @@ BI.PopoverController = BI.inherit(BI.Controller, {
if (!this.floatOpened[name]) { if (!this.floatOpened[name]) {
this.floatOpened[name] = true; this.floatOpened[name] = true;
var container = this.floatContainer[name]; var container = this.floatContainer[name];
container.element.css("zIndex", this.zindex++); container.element.css("zIndex", BI.zIndex_layer++);
this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]); this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]);
this.zindexMap[name] = this.zindex; this.zindexMap[name] = BI.zIndex_layer;
this.modal && container.element.__buildZIndexMask__(this.zindex++); this.modal && container.element.__buildZIndexMask__(BI.zIndex_layer++);
this.get(name).setZindex(this.zindex++); this.get(name).setZindex(BI.zIndex_layer++);
this.floatContainer[name].visible(); this.floatContainer[name].visible();
var popover = this.get(name); var popover = this.get(name);
popover.show && popover.show(); popover.show && popover.show();

107
dist/fineui.css vendored

@ -2184,105 +2184,78 @@ textarea {
.bi-bubble-combo .bubble-combo-triangle-left { .bi-bubble-combo .bubble-combo-triangle-left {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 5px; width: 6px;
height: 16px; height: 16px;
border-left: 1px solid #f5f5f5;
} }
.bi-bubble-combo .bubble-combo-triangle-left:before { .bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute; position: absolute;
left: 0px; width: 6px;
top: 0px; height: 6px;
right: 0px; margin-left: 2px;
border-left: 7px solid #ccc; margin-top: -5px;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-left:after {
position: absolute;
top: 1px;
left: 1px;
right: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-bubble-combo .bubble-combo-triangle-right { .bi-bubble-combo .bubble-combo-triangle-right {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 7px; width: 6px;
height: 16px; height: 16px;
} }
.bi-bubble-combo .bubble-combo-triangle-right:before { .bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute; position: absolute;
top: 0px; width: 6px;
right: 0px; height: 6px;
bottom: 0px; margin-left: 2px;
border-right: 7px solid #ccc; margin-top: 5px;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-right:after {
position: absolute;
right: 0px;
top: 0px;
bottom: 0px;
border-right: 7px solid #ffffff;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-bubble-combo .bubble-combo-triangle-top { .bi-bubble-combo .bubble-combo-triangle-top {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 10px; height: 6px;
border-top: 1px solid #ffffff;
}
.bi-bubble-combo .bubble-combo-triangle-top:after {
position: absolute;
right: 1px;
top: 0px;
border-top: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
} }
.bi-bubble-combo .bubble-combo-triangle-top:before { .bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute; position: absolute;
border-top: 7px solid #cccccc; width: 6px;
border-left: 8px solid transparent; height: 6px;
border-right: 8px solid transparent; margin-left: 3px;
margin-top: -3px;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-bubble-combo .bubble-combo-triangle-bottom { .bi-bubble-combo .bubble-combo-triangle-bottom {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 5px; height: 6px;
border-bottom: 1px solid #ffffff;
} }
.bi-bubble-combo .bubble-combo-triangle-bottom:before { .bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute; position: absolute;
top: 0px; width: 6px;
right: 0px; height: 6px;
bottom: 0px; margin-left: 3px;
border-bottom: 7px solid #ccc; margin-top: 3px;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-bottom:after {
position: absolute;
right: 1px;
top: 1px;
bottom: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-combo.bi-combo-popup { .bi-combo.bi-combo-popup {

115
dist/fineui.js vendored

@ -27250,7 +27250,6 @@ BI.LayerController = BI.inherit(BI.Controller, {
BI.LayerController.superclass._init.apply(this, arguments); BI.LayerController.superclass._init.apply(this, arguments);
this.layerManager = {}; this.layerManager = {};
this.layouts = {}; this.layouts = {};
this.zindex = BI.zIndex_layer;
BI.Resizers.add("layerController" + BI.uniqueId(), BI.bind(this._resize, this)); BI.Resizers.add("layerController" + BI.uniqueId(), BI.bind(this._resize, this));
}, },
@ -27350,7 +27349,7 @@ BI.LayerController = BI.inherit(BI.Controller, {
return this; return this;
} }
this._getLayout(name).visible(); this._getLayout(name).visible();
this._getLayout(name).element.css("z-index", this.zindex++).show(0, callback).trigger("__resize__"); this._getLayout(name).element.css("z-index", BI.zIndex_layer++).show(0, callback).trigger("__resize__");
return this; return this;
}, },
@ -27365,7 +27364,7 @@ BI.LayerController = BI.inherit(BI.Controller, {
layout.setVisible(false); layout.setVisible(false);
this.layerManager[name] = layer; this.layerManager[name] = layer;
this.layouts[name] = layout; this.layouts[name] = layout;
layout.element.css("z-index", this.zindex++); layout.element.css("z-index", BI.zIndex_layer++);
return this; return this;
}, },
@ -27404,7 +27403,6 @@ BI.MaskersController = BI.inherit(BI.LayerController, {
_init: function () { _init: function () {
BI.MaskersController.superclass._init.apply(this, arguments); BI.MaskersController.superclass._init.apply(this, arguments);
this.zindex = BI.zIndex_masker;
} }
});/** });/**
* guy * guy
@ -27427,7 +27425,6 @@ BI.PopoverController = BI.inherit(BI.Controller, {
this.floatLayer = {}; this.floatLayer = {};
this.floatContainer = {}; this.floatContainer = {};
this.floatOpened = {}; this.floatOpened = {};
this.zindex = BI.zIndex_popover;
this.zindexMap = {}; this.zindexMap = {};
}, },
@ -27493,11 +27490,11 @@ BI.PopoverController = BI.inherit(BI.Controller, {
if (!this.floatOpened[name]) { if (!this.floatOpened[name]) {
this.floatOpened[name] = true; this.floatOpened[name] = true;
var container = this.floatContainer[name]; var container = this.floatContainer[name];
container.element.css("zIndex", this.zindex++); container.element.css("zIndex", BI.zIndex_layer++);
this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]); this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]);
this.zindexMap[name] = this.zindex; this.zindexMap[name] = BI.zIndex_layer;
this.modal && container.element.__buildZIndexMask__(this.zindex++); this.modal && container.element.__buildZIndexMask__(BI.zIndex_layer++);
this.get(name).setZindex(this.zindex++); this.get(name).setZindex(BI.zIndex_layer++);
this.floatContainer[name].visible(); this.floatContainer[name].visible();
var popover = this.get(name); var popover = this.get(name);
popover.show && popover.show(); popover.show && popover.show();
@ -36506,7 +36503,9 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null, warningTitle: null,
tipType: null, // success或warning tipType: null, // success或warning
value: null, value: null,
belowMouse: false // title是否跟随鼠标, belowMouse: false, // title是否跟随鼠标,
// 之所以默认为body,是因为transform的效果影响
container: "body"
}); });
}, },
@ -36540,7 +36539,8 @@ BI.Single = BI.inherit(BI.Widget, {
if (BI.isKey(o.title) || BI.isKey(o.warningTitle) if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover({ this.enableHover({
belowMouse: o.belowMouse belowMouse: o.belowMouse,
container: o.container
}); });
} }
}, },
@ -36648,6 +36648,11 @@ BI.Single = BI.inherit(BI.Widget, {
getValue: function () { getValue: function () {
return this.options.value; return this.options.value;
},
_unMount: function () {
BI.Single.superclass._unMount.apply(this, arguments);
BI.Tooltips.remove(this.getName());
} }
});/** });/**
* guy 表示一行数据通过position来定位位置的数据 * guy 表示一行数据通过position来定位位置的数据
@ -37249,7 +37254,7 @@ BI.Tip = BI.inherit(BI.Single, {
var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); var conf = BI.Link.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-tip", baseCls: (conf.baseCls || "") + " bi-tip",
zIndex: BI.zIndex_tip zIndex: BI.zIndex_layer++
}); });
}, },
@ -39184,7 +39189,7 @@ BI.Combo = BI.inherit(BI.Widget, {
trigger: "click", trigger: "click",
toggle: true, toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
container: null, // popupview放置的容器,默认为this.element container: "body", // popupview放置的容器,默认为body
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
@ -39642,6 +39647,12 @@ BI.Combo = BI.inherit(BI.Widget, {
.unbind("mouseleave." + this.getName()); .unbind("mouseleave." + this.getName());
BI.Resizers.remove(this.getName()); BI.Resizers.remove(this.getName());
BI.Combo.superclass.destroy.apply(this, arguments); BI.Combo.superclass.destroy.apply(this, arguments);
},
destroyed: function () {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
} }
}); });
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";
@ -39956,7 +39967,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
el: {type: "bi.text_button", text: "", value: ""}, el: {type: "bi.text_button", text: "", value: ""},
children: [], children: [],
container: null,
popup: { popup: {
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
@ -40000,6 +40011,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
element: this, element: this,
container: o.container,
height: o.height, height: o.height,
trigger: o.trigger, trigger: o.trigger,
direction: o.direction, direction: o.direction,
@ -51016,7 +51028,7 @@ $.extend(BI, {
_show: function (hasCancel, title, message, callback) { _show: function (hasCancel, title, message, callback) {
$mask = $("<div class=\"bi-z-index-mask\">").css({ $mask = $("<div class=\"bi-z-index-mask\">").css({
position: "absolute", position: "absolute",
zIndex: BI.zIndex_tip - 2, zIndex: BI.zIndex_layer++,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -51025,7 +51037,7 @@ $.extend(BI, {
}).appendTo("body"); }).appendTo("body");
$pop = $("<div class=\"bi-message-depend\">").css({ $pop = $("<div class=\"bi-message-depend\">").css({
position: "absolute", position: "absolute",
zIndex: BI.zIndex_tip - 1, zIndex: BI.zIndex_layer++,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -51793,7 +51805,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
return false; return false;
}; };
this.element.css({ this.element.css({
"z-index": BI.zIndex_popup, "z-index": BI.zIndex_layer++,
"min-width": o.minWidth + "px", "min-width": o.minWidth + "px",
"max-width": o.maxWidth + "px" "max-width": o.maxWidth + "px"
}).bind({click: fn}); }).bind({click: fn});
@ -54678,7 +54690,8 @@ BI.Editor = BI.inherit(BI.Single, {
} }
if (!this.disabledError && BI.isKey(errorText)) { if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustYOffset: 2 adjustYOffset: 2,
container: "body"
}); });
this._checkToolTip(); this._checkToolTip();
return BI.Bubbles.get(this.getName()); return BI.Bubbles.get(this.getName());
@ -54751,6 +54764,10 @@ BI.Editor = BI.inherit(BI.Single, {
isValid: function () { isValid: function () {
return this.editor.isValid(); return this.editor.isValid();
},
destroyed: function () {
BI.Bubbles.remove(this.getName());
} }
}); });
BI.Editor.EVENT_CHANGE = "EVENT_CHANGE"; BI.Editor.EVENT_CHANGE = "EVENT_CHANGE";
@ -76726,6 +76743,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.more = BI.createWidget({ this.more = BI.createWidget({
type: "bi.combo", type: "bi.combo",
container: null,
direction: "right,top", direction: "right,top",
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
el: { el: {
@ -79620,6 +79638,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
}); });
this.textIconCombo = BI.createWidget({ this.textIconCombo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
container: o.container,
element: this, element: this,
adjustLength: 2, adjustLength: 2,
el: this.trigger, el: this.trigger,
@ -83745,7 +83764,7 @@ BI.shortcut("bi.rich_editor_text_toolbar", BI.RichEditorTextToolbar);/**
setValue: function (v) { setValue: function (v) {
v = v || ( isIE11Below() ? "" : "<br>"); v = v || ( isIE11Below() ? "" : "<br>");
v = ($(v)[0] && $(v)[0].nodeName === "P") ? v : "<p>" + v + "</p>"; v = v.startWith("<p") ? v : "<p>" + v + "</p>";
this.instance.setContent(v); this.instance.setContent(v);
}, },
@ -88687,7 +88706,8 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-month-combo", baseCls: "bi-month-combo",
height: 24 height: 24,
container: null
}); });
}, },
_init: function () { _init: function () {
@ -88711,6 +88731,7 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
offsetStyle: "center", offsetStyle: "center",
container: null,
element: this, element: this,
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
@ -88755,7 +88776,8 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
behaviors: {}, behaviors: {},
height: 24 height: 24,
container: null
}); });
}, },
_init: function () { _init: function () {
@ -88784,6 +88806,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
type: "bi.combo", type: "bi.combo",
offsetStyle: "center", offsetStyle: "center",
element: this, element: this,
container: o.container,
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: this.trigger, el: this.trigger,
@ -91334,6 +91357,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
type: "bi.text_value_combo", type: "bi.text_value_combo",
height: 24, height: 24,
items: comboItems, items: comboItems,
container: null,
value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT, value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,
listeners: [{ listeners: [{
eventName: "EVENT_CHANGE", eventName: "EVENT_CHANGE",
@ -91348,6 +91372,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
items.push({ items.push({
type: "bi.text_value_combo", type: "bi.text_value_combo",
height: 24, height: 24,
container: null,
items: this._getText(BI.last(values).dateType), items: this._getText(BI.last(values).dateType),
value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT, value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,
listeners: [{ listeners: [{
@ -91852,6 +91877,7 @@ BI.extend(BI.DynamicDateCombo, {
ref: function () { ref: function () {
self.offsetCombo = this; self.offsetCombo = this;
}, },
container: null,
value: o.offset, value: o.offset,
listeners: [{ listeners: [{
eventName: BI.TextValueCombo.EVENT_CHANGE, eventName: BI.TextValueCombo.EVENT_CHANGE,
@ -95650,7 +95676,8 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
BI.createWidget({ BI.createWidget({
type: "bi.vertical", type: "bi.vertical",
element: this, element: this,
items: [this.popup] items: [this.popup],
vgap: 5
}); });
}, },
@ -95676,7 +95703,7 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
item.el.height = self.constants.height; item.el.height = self.constants.height;
item.el.iconCls2 = self.constants.nextIcon; item.el.iconCls2 = self.constants.nextIcon;
item.popup = { item.popup = {
lgap: 4, lgap: 1,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: 0, chooseType: 0,
@ -95684,7 +95711,8 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
type: "bi.vertical" type: "bi.vertical"
}] }]
} },
innerVGap: 5
}; };
item.el.childValues = []; item.el.childValues = [];
BI.each(item.children, function (i, child) { BI.each(item.children, function (i, child) {
@ -102887,19 +102915,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
default : default :
@ -102936,7 +102967,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self._checkValidation(); self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
}); });
@ -102950,14 +102982,16 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
@ -102975,19 +103009,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
default : default :
@ -103118,6 +103155,13 @@ BI.NumberInterval = BI.inherit(BI.Single, {
value.closeMax = true; value.closeMax = true;
} }
return value; return value;
},
destroyed: function () {
var c = this.constants;
BI.Bubbles.remove(c.typeError);
BI.Bubbles.remove(c.numberError);
BI.Bubbles.remove(c.signalError);
} }
}); });
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
@ -104373,7 +104417,6 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo", baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo",
height: 24, height: 24,
numOfPage: 10,
items: [] items: []
}); });
}, },
@ -104741,14 +104784,14 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
_getItemsByTimes: function (items, times) { _getItemsByTimes: function (items, times) {
var res = []; var res = [];
for (var i = (times - 1) * this.options.numOfPage; items[i] && i < times * this.options.numOfPage; i++) { for (var i = (times - 1) * 100; items[i] && i < times * 100; i++) {
res.push(items[i]); res.push(items[i]);
} }
return res; return res;
}, },
_hasNextByTimes: function (items, times) { _hasNextByTimes: function (items, times) {
return times * this.options.numOfPage < items.length; return times * 100 < items.length;
}, },
_itemsCreator: function (options, callback) { _itemsCreator: function (options, callback) {

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

94
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

58
dist/widget.js vendored

@ -429,7 +429,8 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-month-combo", baseCls: "bi-month-combo",
height: 24 height: 24,
container: null
}); });
}, },
_init: function () { _init: function () {
@ -453,6 +454,7 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
offsetStyle: "center", offsetStyle: "center",
container: null,
element: this, element: this,
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
@ -497,7 +499,8 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
behaviors: {}, behaviors: {},
height: 24 height: 24,
container: null
}); });
}, },
_init: function () { _init: function () {
@ -526,6 +529,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
type: "bi.combo", type: "bi.combo",
offsetStyle: "center", offsetStyle: "center",
element: this, element: this,
container: o.container,
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: this.trigger, el: this.trigger,
@ -3076,6 +3080,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
type: "bi.text_value_combo", type: "bi.text_value_combo",
height: 24, height: 24,
items: comboItems, items: comboItems,
container: null,
value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT, value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,
listeners: [{ listeners: [{
eventName: "EVENT_CHANGE", eventName: "EVENT_CHANGE",
@ -3090,6 +3095,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
items.push({ items.push({
type: "bi.text_value_combo", type: "bi.text_value_combo",
height: 24, height: 24,
container: null,
items: this._getText(BI.last(values).dateType), items: this._getText(BI.last(values).dateType),
value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT, value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,
listeners: [{ listeners: [{
@ -3594,6 +3600,7 @@ BI.extend(BI.DynamicDateCombo, {
ref: function () { ref: function () {
self.offsetCombo = this; self.offsetCombo = this;
}, },
container: null,
value: o.offset, value: o.offset,
listeners: [{ listeners: [{
eventName: BI.TextValueCombo.EVENT_CHANGE, eventName: BI.TextValueCombo.EVENT_CHANGE,
@ -7392,7 +7399,8 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
BI.createWidget({ BI.createWidget({
type: "bi.vertical", type: "bi.vertical",
element: this, element: this,
items: [this.popup] items: [this.popup],
vgap: 5
}); });
}, },
@ -7418,7 +7426,7 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
item.el.height = self.constants.height; item.el.height = self.constants.height;
item.el.iconCls2 = self.constants.nextIcon; item.el.iconCls2 = self.constants.nextIcon;
item.popup = { item.popup = {
lgap: 4, lgap: 1,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: 0, chooseType: 0,
@ -7426,7 +7434,8 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
type: "bi.vertical" type: "bi.vertical"
}] }]
} },
innerVGap: 5
}; };
item.el.childValues = []; item.el.childValues = [];
BI.each(item.children, function (i, child) { BI.each(item.children, function (i, child) {
@ -14629,19 +14638,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
default : default :
@ -14678,7 +14690,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self._checkValidation(); self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
}); });
@ -14692,14 +14705,16 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
@ -14717,19 +14732,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
default : default :
@ -14860,6 +14878,13 @@ BI.NumberInterval = BI.inherit(BI.Single, {
value.closeMax = true; value.closeMax = true;
} }
return value; return value;
},
destroyed: function () {
var c = this.constants;
BI.Bubbles.remove(c.typeError);
BI.Bubbles.remove(c.numberError);
BI.Bubbles.remove(c.signalError);
} }
}); });
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
@ -16115,7 +16140,6 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo", baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo",
height: 24, height: 24,
numOfPage: 10,
items: [] items: []
}); });
}, },
@ -16483,14 +16507,14 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
_getItemsByTimes: function (items, times) { _getItemsByTimes: function (items, times) {
var res = []; var res = [];
for (var i = (times - 1) * this.options.numOfPage; items[i] && i < times * this.options.numOfPage; i++) { for (var i = (times - 1) * 100; items[i] && i < times * 100; i++) {
res.push(items[i]); res.push(items[i]);
} }
return res; return res;
}, },
_hasNextByTimes: function (items, times) { _hasNextByTimes: function (items, times) {
return times * this.options.numOfPage < items.length; return times * 100 < items.length;
}, },
_itemsCreator: function (options, callback) { _itemsCreator: function (options, callback) {

1
lodash.md

@ -0,0 +1 @@
lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep

8
src/base/combination/combo.js

@ -10,7 +10,7 @@ BI.Combo = BI.inherit(BI.Widget, {
trigger: "click", trigger: "click",
toggle: true, toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
container: null, // popupview放置的容器,默认为this.element container: "body", // popupview放置的容器,默认为body
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
@ -468,6 +468,12 @@ BI.Combo = BI.inherit(BI.Widget, {
.unbind("mouseleave." + this.getName()); .unbind("mouseleave." + this.getName());
BI.Resizers.remove(this.getName()); BI.Resizers.remove(this.getName());
BI.Combo.superclass.destroy.apply(this, arguments); BI.Combo.superclass.destroy.apply(this, arguments);
},
destroyed: function () {
this.popupView && this.popupView.destroy();
this.popupView = null;
this._rendered = false;
} }
}); });
BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE";

3
src/base/combination/group.combo.js

@ -17,7 +17,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
el: {type: "bi.text_button", text: "", value: ""}, el: {type: "bi.text_button", text: "", value: ""},
children: [], children: [],
container: null,
popup: { popup: {
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
@ -61,6 +61,7 @@ BI.ComboGroup = BI.inherit(BI.Widget, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
element: this, element: this,
container: o.container,
height: o.height, height: o.height,
trigger: o.trigger, trigger: o.trigger,
direction: o.direction, direction: o.direction,

4
src/base/foundation/message.js

@ -52,7 +52,7 @@ $.extend(BI, {
_show: function (hasCancel, title, message, callback) { _show: function (hasCancel, title, message, callback) {
$mask = $("<div class=\"bi-z-index-mask\">").css({ $mask = $("<div class=\"bi-z-index-mask\">").css({
position: "absolute", position: "absolute",
zIndex: BI.zIndex_tip - 2, zIndex: BI.zIndex_layer++,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -61,7 +61,7 @@ $.extend(BI, {
}).appendTo("body"); }).appendTo("body");
$pop = $("<div class=\"bi-message-depend\">").css({ $pop = $("<div class=\"bi-message-depend\">").css({
position: "absolute", position: "absolute",
zIndex: BI.zIndex_tip - 1, zIndex: BI.zIndex_layer++,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,

2
src/base/layer/layer.popup.js

@ -51,7 +51,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
return false; return false;
}; };
this.element.css({ this.element.css({
"z-index": BI.zIndex_popup, "z-index": BI.zIndex_layer++,
"min-width": o.minWidth + "px", "min-width": o.minWidth + "px",
"max-width": o.maxWidth + "px" "max-width": o.maxWidth + "px"
}).bind({click: fn}); }).bind({click: fn});

7
src/base/single/editor/editor.js

@ -227,7 +227,8 @@ BI.Editor = BI.inherit(BI.Single, {
} }
if (!this.disabledError && BI.isKey(errorText)) { if (!this.disabledError && BI.isKey(errorText)) {
BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, { BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {
adjustYOffset: 2 adjustYOffset: 2,
container: "body"
}); });
this._checkToolTip(); this._checkToolTip();
return BI.Bubbles.get(this.getName()); return BI.Bubbles.get(this.getName());
@ -300,6 +301,10 @@ BI.Editor = BI.inherit(BI.Single, {
isValid: function () { isValid: function () {
return this.editor.isValid(); return this.editor.isValid();
},
destroyed: function () {
BI.Bubbles.remove(this.getName());
} }
}); });
BI.Editor.EVENT_CHANGE = "EVENT_CHANGE"; BI.Editor.EVENT_CHANGE = "EVENT_CHANGE";

12
src/base/single/single.js

@ -19,7 +19,9 @@ BI.Single = BI.inherit(BI.Widget, {
warningTitle: null, warningTitle: null,
tipType: null, // success或warning tipType: null, // success或warning
value: null, value: null,
belowMouse: false // title是否跟随鼠标, belowMouse: false, // title是否跟随鼠标,
// 之所以默认为body,是因为transform的效果影响
container: "body"
}); });
}, },
@ -53,7 +55,8 @@ BI.Single = BI.inherit(BI.Widget, {
if (BI.isKey(o.title) || BI.isKey(o.warningTitle) if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover({ this.enableHover({
belowMouse: o.belowMouse belowMouse: o.belowMouse,
container: o.container
}); });
} }
}, },
@ -161,5 +164,10 @@ BI.Single = BI.inherit(BI.Widget, {
getValue: function () { getValue: function () {
return this.options.value; return this.options.value;
},
_unMount: function () {
BI.Single.superclass._unMount.apply(this, arguments);
BI.Tooltips.remove(this.getName());
} }
}); });

2
src/base/single/tip/tip.js

@ -11,7 +11,7 @@ BI.Tip = BI.inherit(BI.Single, {
var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); var conf = BI.Link.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-tip", baseCls: (conf.baseCls || "") + " bi-tip",
zIndex: BI.zIndex_tip zIndex: BI.zIndex_layer++
}); });
}, },

1
src/case/colorchooser/colorchooser.popup.js

@ -94,6 +94,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.more = BI.createWidget({ this.more = BI.createWidget({
type: "bi.combo", type: "bi.combo",
container: null,
direction: "right,top", direction: "right,top",
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
el: { el: {

1
src/case/combo/textvaluecombo/combo.textvalue.js

@ -41,6 +41,7 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
}); });
this.textIconCombo = BI.createWidget({ this.textIconCombo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
container: o.container,
element: this, element: this,
adjustLength: 2, adjustLength: 2,
el: this.trigger, el: this.trigger,

5
src/core/controller/controller.layer.js

@ -15,7 +15,6 @@ BI.LayerController = BI.inherit(BI.Controller, {
BI.LayerController.superclass._init.apply(this, arguments); BI.LayerController.superclass._init.apply(this, arguments);
this.layerManager = {}; this.layerManager = {};
this.layouts = {}; this.layouts = {};
this.zindex = BI.zIndex_layer;
BI.Resizers.add("layerController" + BI.uniqueId(), BI.bind(this._resize, this)); BI.Resizers.add("layerController" + BI.uniqueId(), BI.bind(this._resize, this));
}, },
@ -115,7 +114,7 @@ BI.LayerController = BI.inherit(BI.Controller, {
return this; return this;
} }
this._getLayout(name).visible(); this._getLayout(name).visible();
this._getLayout(name).element.css("z-index", this.zindex++).show(0, callback).trigger("__resize__"); this._getLayout(name).element.css("z-index", BI.zIndex_layer++).show(0, callback).trigger("__resize__");
return this; return this;
}, },
@ -130,7 +129,7 @@ BI.LayerController = BI.inherit(BI.Controller, {
layout.setVisible(false); layout.setVisible(false);
this.layerManager[name] = layer; this.layerManager[name] = layer;
this.layouts[name] = layout; this.layouts[name] = layout;
layout.element.css("z-index", this.zindex++); layout.element.css("z-index", BI.zIndex_layer++);
return this; return this;
}, },

1
src/core/controller/controller.masker.js

@ -11,6 +11,5 @@ BI.MaskersController = BI.inherit(BI.LayerController, {
_init: function () { _init: function () {
BI.MaskersController.superclass._init.apply(this, arguments); BI.MaskersController.superclass._init.apply(this, arguments);
this.zindex = BI.zIndex_masker;
} }
}); });

9
src/core/controller/controller.popover.js

@ -19,7 +19,6 @@ BI.PopoverController = BI.inherit(BI.Controller, {
this.floatLayer = {}; this.floatLayer = {};
this.floatContainer = {}; this.floatContainer = {};
this.floatOpened = {}; this.floatOpened = {};
this.zindex = BI.zIndex_popover;
this.zindexMap = {}; this.zindexMap = {};
}, },
@ -85,11 +84,11 @@ BI.PopoverController = BI.inherit(BI.Controller, {
if (!this.floatOpened[name]) { if (!this.floatOpened[name]) {
this.floatOpened[name] = true; this.floatOpened[name] = true;
var container = this.floatContainer[name]; var container = this.floatContainer[name];
container.element.css("zIndex", this.zindex++); container.element.css("zIndex", BI.zIndex_layer++);
this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]); this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]);
this.zindexMap[name] = this.zindex; this.zindexMap[name] = BI.zIndex_layer;
this.modal && container.element.__buildZIndexMask__(this.zindex++); this.modal && container.element.__buildZIndexMask__(BI.zIndex_layer++);
this.get(name).setZindex(this.zindex++); this.get(name).setZindex(BI.zIndex_layer++);
this.floatContainer[name].visible(); this.floatContainer[name].visible();
var popover = this.get(name); var popover = this.get(name);
popover.show && popover.show(); popover.show && popover.show();

107
src/css/base/combo/combo.css

@ -5,105 +5,78 @@
.bi-bubble-combo .bubble-combo-triangle-left { .bi-bubble-combo .bubble-combo-triangle-left {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 5px; width: 6px;
height: 16px; height: 16px;
border-left: 1px solid #f5f5f5;
} }
.bi-bubble-combo .bubble-combo-triangle-left:before { .bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute; position: absolute;
left: 0px; width: 6px;
top: 0px; height: 6px;
right: 0px; margin-left: 2px;
border-left: 7px solid #ccc; margin-top: -5px;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-left:after {
position: absolute;
top: 1px;
left: 1px;
right: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-bubble-combo .bubble-combo-triangle-right { .bi-bubble-combo .bubble-combo-triangle-right {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 7px; width: 6px;
height: 16px; height: 16px;
} }
.bi-bubble-combo .bubble-combo-triangle-right:before { .bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute; position: absolute;
top: 0px; width: 6px;
right: 0px; height: 6px;
bottom: 0px; margin-left: 2px;
border-right: 7px solid #ccc; margin-top: 5px;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-right:after {
position: absolute;
right: 0px;
top: 0px;
bottom: 0px;
border-right: 7px solid #ffffff;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-bubble-combo .bubble-combo-triangle-top { .bi-bubble-combo .bubble-combo-triangle-top {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 10px; height: 6px;
border-top: 1px solid #ffffff;
}
.bi-bubble-combo .bubble-combo-triangle-top:after {
position: absolute;
right: 1px;
top: 0px;
border-top: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
} }
.bi-bubble-combo .bubble-combo-triangle-top:before { .bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute; position: absolute;
border-top: 7px solid #cccccc; width: 6px;
border-left: 8px solid transparent; height: 6px;
border-right: 8px solid transparent; margin-left: 3px;
margin-top: -3px;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-bubble-combo .bubble-combo-triangle-bottom { .bi-bubble-combo .bubble-combo-triangle-bottom {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 5px; height: 6px;
border-bottom: 1px solid #ffffff;
} }
.bi-bubble-combo .bubble-combo-triangle-bottom:before { .bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute; position: absolute;
top: 0px; width: 6px;
right: 0px; height: 6px;
bottom: 0px; margin-left: 3px;
border-bottom: 7px solid #ccc; margin-top: 3px;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
content: "";
}
.bi-bubble-combo .bubble-combo-triangle-bottom:after {
position: absolute;
right: 1px;
top: 1px;
bottom: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
-moz-box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
box-shadow: 0 1px 5px 0 rgba(35, 46, 64, 0.2);
} }
.bi-combo.bi-combo-popup { .bi-combo.bi-combo-popup {

99
src/less/visual.less

@ -188,107 +188,72 @@
.triangle-top() { .triangle-top() {
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 5px; height: 6px;
border-bottom: 1px solid #ffffff;
&:before { &:before {
position: absolute; position: absolute;
top: 0px; width: 6px;
right: 0px; height: 6px;
bottom: 0px; margin-left: 3px;
border-bottom: 7px solid #ccc; margin-top: 3px;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
content: "";
}
&:after {
position: absolute;
right: 1px;
top: 1px;
bottom: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
.box-shadow(0 1px 5px 0, fade(#232E40, 20));
} }
} }
.triangle-bottom() { .triangle-bottom() {
position: absolute; position: absolute;
width: 16px; width: 16px;
height: 10px; height: 6px;
border-top: 1px solid #ffffff;
&:after {
position: absolute;
right: 1px;
top: 0px;
border-top: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
}
&:before { &:before {
position: absolute; position: absolute;
border-top: 7px solid #cccccc; width: 6px;
border-left: 8px solid transparent; height: 6px;
border-right: 8px solid transparent; margin-left: 3px;
margin-top: -3px;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
.box-shadow(0 1px 5px 0, fade(#232E40, 20));
} }
} }
.triangle-left() { .triangle-left() {
position: absolute; position: absolute;
width: 7px; width: 6px;
height: 16px; height: 16px;
&:before { &:before {
position: absolute; position: absolute;
top: 0px; width: 6px;
right: 0px; height: 6px;
bottom: 0px; margin-left: 2px;
border-right: 7px solid #ccc; margin-top: 5px;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
&:after {
position: absolute;
right: 0px;
top: 0px;
bottom: 0px;
border-right: 7px solid #ffffff;
border-top: 7px solid transparent;
border-bottom: 8px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
.box-shadow(0 1px 5px 0, fade(#232E40, 20));
} }
} }
.triangle-right() { .triangle-right() {
position: absolute; position: absolute;
width: 5px; width: 6px;
height: 16px; height: 16px;
border-left: 1px solid #f5f5f5;
&:before { &:before {
position: absolute; position: absolute;
left: 0px; width: 6px;
top: 0px; height: 6px;
right: 0px; margin-left: 2px;
border-left: 7px solid #ccc; margin-top: -5px;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
content: "";
}
&:after {
position: absolute;
top: 1px;
left: 1px;
right: 0px;
border-bottom: 6px solid #ffffff;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: ""; content: "";
background-color: #ffffff;
transform: rotate(45deg);
.box-shadow(0 1px 5px 0, fade(#232E40, 20));
} }
} }

4
src/widget/date/calendar/combo.month.date.js

@ -9,7 +9,8 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-month-combo", baseCls: "bi-month-combo",
height: 24 height: 24,
container: null
}); });
}, },
_init: function () { _init: function () {
@ -33,6 +34,7 @@ BI.MonthDateCombo = BI.inherit(BI.Trigger, {
this.combo = BI.createWidget({ this.combo = BI.createWidget({
type: "bi.combo", type: "bi.combo",
offsetStyle: "center", offsetStyle: "center",
container: null,
element: this, element: this,
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
isNeedAdjustWidth: false, isNeedAdjustWidth: false,

4
src/widget/date/calendar/combo.year.date.js

@ -12,7 +12,8 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
min: "1900-01-01", // 最小日期 min: "1900-01-01", // 最小日期
max: "2099-12-31", // 最大日期 max: "2099-12-31", // 最大日期
behaviors: {}, behaviors: {},
height: 24 height: 24,
container: null
}); });
}, },
_init: function () { _init: function () {
@ -41,6 +42,7 @@ BI.YearDateCombo = BI.inherit(BI.Trigger, {
type: "bi.combo", type: "bi.combo",
offsetStyle: "center", offsetStyle: "center",
element: this, element: this,
container: o.container,
isNeedAdjustHeight: false, isNeedAdjustHeight: false,
isNeedAdjustWidth: false, isNeedAdjustWidth: false,
el: this.trigger, el: this.trigger,

2
src/widget/dynamicdate/dynamicdate.card.js

@ -158,6 +158,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
type: "bi.text_value_combo", type: "bi.text_value_combo",
height: 24, height: 24,
items: comboItems, items: comboItems,
container: null,
value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT, value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,
listeners: [{ listeners: [{
eventName: "EVENT_CHANGE", eventName: "EVENT_CHANGE",
@ -172,6 +173,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
items.push({ items.push({
type: "bi.text_value_combo", type: "bi.text_value_combo",
height: 24, height: 24,
container: null,
items: this._getText(BI.last(values).dateType), items: this._getText(BI.last(values).dateType),
value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT, value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,
listeners: [{ listeners: [{

1
src/widget/dynamicdate/dynamicdate.param.item.js

@ -59,6 +59,7 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
ref: function () { ref: function () {
self.offsetCombo = this; self.offsetCombo = this;
}, },
container: null,
value: o.offset, value: o.offset,
listeners: [{ listeners: [{
eventName: BI.TextValueCombo.EVENT_CHANGE, eventName: BI.TextValueCombo.EVENT_CHANGE,

8
src/widget/multilayerdownlist/popup.downlist.js

@ -71,7 +71,8 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
BI.createWidget({ BI.createWidget({
type: "bi.vertical", type: "bi.vertical",
element: this, element: this,
items: [this.popup] items: [this.popup],
vgap: 5
}); });
}, },
@ -97,7 +98,7 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
item.el.height = self.constants.height; item.el.height = self.constants.height;
item.el.iconCls2 = self.constants.nextIcon; item.el.iconCls2 = self.constants.nextIcon;
item.popup = { item.popup = {
lgap: 4, lgap: 1,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: 0, chooseType: 0,
@ -105,7 +106,8 @@ BI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {
type: "bi.vertical" type: "bi.vertical"
}] }]
} },
innerVGap: 5
}; };
item.el.childValues = []; item.el.childValues = [];
BI.each(item.children, function (i, child) { BI.each(item.children, function (i, child) {

34
src/widget/numberinterval/numberinterval.js

@ -305,19 +305,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
default : default :
@ -354,7 +357,8 @@ BI.NumberInterval = BI.inherit(BI.Single, {
self._checkValidation(); self._checkValidation();
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
}); });
@ -368,14 +372,16 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
self.fireEvent(BI.NumberInterval.EVENT_ERROR); self.fireEvent(BI.NumberInterval.EVENT_ERROR);
break; break;
@ -393,19 +399,22 @@ BI.NumberInterval = BI.inherit(BI.Single, {
case c.typeError: case c.typeError:
BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, { BI.Bubbles.show(c.typeError, BI.i18nText("BI-Numerical_Interval_Input_Data"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.numberError: case c.numberError:
BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, { BI.Bubbles.show(c.numberError, BI.i18nText("BI-Numerical_Interval_Number_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
case c.signalError: case c.signalError:
BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, { BI.Bubbles.show(c.signalError, BI.i18nText("BI-Numerical_Interval_Signal_Value"), self, {
offsetStyle: "left", offsetStyle: "left",
adjustYOffset: c.adjustYOffset adjustYOffset: c.adjustYOffset,
container: "body"
}); });
break; break;
default : default :
@ -536,6 +545,13 @@ BI.NumberInterval = BI.inherit(BI.Single, {
value.closeMax = true; value.closeMax = true;
} }
return value; return value;
},
destroyed: function () {
var c = this.constants;
BI.Bubbles.remove(c.typeError);
BI.Bubbles.remove(c.numberError);
BI.Bubbles.remove(c.signalError);
} }
}); });
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";

5
src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js

@ -9,7 +9,6 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo", baseCls: "bi-multi-select-combo bi-search-multi-text-value-combo",
height: 24, height: 24,
numOfPage: 10,
items: [] items: []
}); });
}, },
@ -377,14 +376,14 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
_getItemsByTimes: function (items, times) { _getItemsByTimes: function (items, times) {
var res = []; var res = [];
for (var i = (times - 1) * this.options.numOfPage; items[i] && i < times * this.options.numOfPage; i++) { for (var i = (times - 1) * 100; items[i] && i < times * 100; i++) {
res.push(items[i]); res.push(items[i]);
} }
return res; return res;
}, },
_hasNextByTimes: function (items, times) { _hasNextByTimes: function (items, times) {
return times * this.options.numOfPage < items.length; return times * 100 < items.length;
}, },
_itemsCreator: function (options, callback) { _itemsCreator: function (options, callback) {

Loading…
Cancel
Save