Browse Source

combo container还原 && layer层级还原

es6
windy 6 years ago
parent
commit
db5b45d180
  1. 92
      dist/_fineui.min.js
  2. 25
      dist/base.js
  3. 90
      dist/bundle.js
  4. 94
      dist/bundle.min.js
  5. 2
      dist/case.js
  6. 18
      dist/core.js
  7. 90
      dist/fineui.js
  8. 92
      dist/fineui.min.js
  9. 3
      dist/utils.js
  10. 4
      dist/utils.min.js
  11. 45
      dist/widget.js
  12. 8
      src/base/combination/combo.js
  13. 2
      src/base/combination/group.combo.js
  14. 4
      src/base/foundation/message.js
  15. 2
      src/base/layer/layer.popup.js
  16. 3
      src/base/single/editor/editor.js
  17. 4
      src/base/single/single.js
  18. 2
      src/base/single/tip/tip.js
  19. 2
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  20. 5
      src/core/controller/controller.layer.js
  21. 1
      src/core/controller/controller.masker.js
  22. 9
      src/core/controller/controller.popover.js
  23. 3
      src/core/var.js
  24. 1
      src/widget/downlist/combo.downlist.js
  25. 2
      src/widget/multiselect/multiselect.combo.js
  26. 4
      src/widget/multiselect/multiselect.insert.combo.js
  27. 2
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  28. 3
      src/widget/multitree/multi.tree.combo.js
  29. 27
      src/widget/numberinterval/numberinterval.js
  30. 2
      src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js
  31. 2
      src/widget/singleselect/singleselect.combo.js
  32. 2
      src/widget/singleselect/singleselect.insert.combo.js

92
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

25
dist/base.js vendored

@ -342,9 +342,7 @@ 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"
}); });
}, },
@ -1093,7 +1091,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_layer++ zIndex: BI.zIndex_tip
}); });
}, },
@ -3028,7 +3026,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: "body", // popupview放置的容器,默认为body container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
@ -3486,12 +3484,6 @@ 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";
@ -3806,7 +3798,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",
@ -14867,7 +14859,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_layer++, zIndex: BI.zIndex_tip - 2,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -14876,7 +14868,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_layer++, zIndex: BI.zIndex_tip - 1,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -15646,7 +15638,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
return false; return false;
}; };
this.element.css({ this.element.css({
"z-index": BI.zIndex_layer++, "z-index": BI.zIndex_popup,
"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});
@ -18531,8 +18523,7 @@ 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());

90
dist/bundle.js vendored

@ -27002,6 +27002,7 @@ 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 +27102,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", BI.zIndex_layer++).show(0, callback).trigger("__resize__"); this._getLayout(name).element.css("z-index", this.zindex++).show(0, callback).trigger("__resize__");
return this; return this;
}, },
@ -27116,7 +27117,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", BI.zIndex_layer++); layout.element.css("z-index", this.zindex++);
return this; return this;
}, },
@ -27155,6 +27156,7 @@ 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
@ -27177,6 +27179,7 @@ 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 = {};
}, },
@ -27242,11 +27245,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", BI.zIndex_layer++); container.element.css("zIndex", this.zindex++);
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] = BI.zIndex_layer; this.zindexMap[name] = this.zindex;
this.modal && container.element.__buildZIndexMask__(BI.zIndex_layer++); this.modal && container.element.__buildZIndexMask__(this.zindex++);
this.get(name).setZindex(BI.zIndex_layer++); this.get(name).setZindex(this.zindex++);
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();
@ -30680,7 +30683,8 @@ _.extend(BI, {
Top: "top", Top: "top",
Bottom: "bottom", Bottom: "bottom",
Stretch: "stretch" Stretch: "stretch"
} },
StartOfWeek: 0
});BI.version = "2.0";/** });BI.version = "2.0";/**
* absolute实现的居中布局 * absolute实现的居中布局
* @class BI.AbsoluteCenterLayout * @class BI.AbsoluteCenterLayout
@ -36255,9 +36259,7 @@ 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"
}); });
}, },
@ -37006,7 +37008,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_layer++ zIndex: BI.zIndex_tip
}); });
}, },
@ -38941,7 +38943,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: "body", // popupview放置的容器,默认为body container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
@ -39399,12 +39401,6 @@ 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";
@ -39719,7 +39715,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",
@ -50780,7 +50776,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_layer++, zIndex: BI.zIndex_tip - 2,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -50789,7 +50785,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_layer++, zIndex: BI.zIndex_tip - 1,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -51559,7 +51555,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
return false; return false;
}; };
this.element.css({ this.element.css({
"z-index": BI.zIndex_layer++, "z-index": BI.zIndex_popup,
"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});
@ -54444,8 +54440,7 @@ 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());
@ -78838,7 +78833,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
} }
}], }],
hideChecker: function (e) { hideChecker: function (e) {
return self.triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return self.triggerBtn.element.find(e.target).length === 0;
} }
}, },
left: 0, left: 0,
@ -90411,6 +90406,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
adjustLength: 0, adjustLength: 0,
direction: "bottom", direction: "bottom",
trigger: "click", trigger: "click",
container: null,
stopPropagation: false, stopPropagation: false,
el: {} el: {}
}); });
@ -97554,7 +97550,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
}, },
value: o.value, value: o.value,
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });
@ -97814,7 +97810,6 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
text: o.text, text: o.text,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {
container: "body",
offset: { offset: {
left: 0, left: 0,
top: 0, top: 0,
@ -97936,8 +97931,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
}, },
value: o.value, value: o.value,
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && return triggerBtn.element.find(e.target).length === 0;
(self.popup && !self.popup.element.__isMouseInBounds__(e));
} }
}); });
@ -98325,7 +98319,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
value: o.value value: o.value
}, },
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });
@ -101771,7 +101765,6 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {
container: "body",
offset: this.constants.offset offset: this.constants.offset
}, },
searcher: { searcher: {
@ -101846,7 +101839,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
}, },
value: {value: o.value || {}}, value: {value: o.value || {}},
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });
@ -102831,22 +102824,19 @@ 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 :
@ -102883,8 +102873,7 @@ 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);
}); });
@ -102898,16 +102887,14 @@ 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;
@ -102925,22 +102912,19 @@ 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 :
@ -104491,7 +104475,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
}, },
value: o.value, value: o.value,
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });
@ -106809,7 +106793,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
} }
}, },
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
}, },
value: o.value value: o.value
}); });
@ -107079,7 +107063,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
} }
}, },
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
}, },
value: o.value value: o.value
}); });

94
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/case.js vendored

@ -6155,7 +6155,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
} }
}], }],
hideChecker: function (e) { hideChecker: function (e) {
return self.triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return self.triggerBtn.element.find(e.target).length === 0;
} }
}, },
left: 0, left: 0,

18
dist/core.js vendored

@ -27002,6 +27002,7 @@ 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 +27102,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", BI.zIndex_layer++).show(0, callback).trigger("__resize__"); this._getLayout(name).element.css("z-index", this.zindex++).show(0, callback).trigger("__resize__");
return this; return this;
}, },
@ -27116,7 +27117,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", BI.zIndex_layer++); layout.element.css("z-index", this.zindex++);
return this; return this;
}, },
@ -27155,6 +27156,7 @@ 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
@ -27177,6 +27179,7 @@ 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 = {};
}, },
@ -27242,11 +27245,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", BI.zIndex_layer++); container.element.css("zIndex", this.zindex++);
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] = BI.zIndex_layer; this.zindexMap[name] = this.zindex;
this.modal && container.element.__buildZIndexMask__(BI.zIndex_layer++); this.modal && container.element.__buildZIndexMask__(this.zindex++);
this.get(name).setZindex(BI.zIndex_layer++); this.get(name).setZindex(this.zindex++);
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();
@ -30680,7 +30683,8 @@ _.extend(BI, {
Top: "top", Top: "top",
Bottom: "bottom", Bottom: "bottom",
Stretch: "stretch" Stretch: "stretch"
} },
StartOfWeek: 0
});BI.version = "2.0";/** });BI.version = "2.0";/**
* absolute实现的居中布局 * absolute实现的居中布局
* @class BI.AbsoluteCenterLayout * @class BI.AbsoluteCenterLayout

90
dist/fineui.js vendored

@ -27251,6 +27251,7 @@ 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 +27351,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", BI.zIndex_layer++).show(0, callback).trigger("__resize__"); this._getLayout(name).element.css("z-index", this.zindex++).show(0, callback).trigger("__resize__");
return this; return this;
}, },
@ -27365,7 +27366,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", BI.zIndex_layer++); layout.element.css("z-index", this.zindex++);
return this; return this;
}, },
@ -27404,6 +27405,7 @@ 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
@ -27426,6 +27428,7 @@ 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 = {};
}, },
@ -27491,11 +27494,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", BI.zIndex_layer++); container.element.css("zIndex", this.zindex++);
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] = BI.zIndex_layer; this.zindexMap[name] = this.zindex;
this.modal && container.element.__buildZIndexMask__(BI.zIndex_layer++); this.modal && container.element.__buildZIndexMask__(this.zindex++);
this.get(name).setZindex(BI.zIndex_layer++); this.get(name).setZindex(this.zindex++);
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();
@ -30929,7 +30932,8 @@ _.extend(BI, {
Top: "top", Top: "top",
Bottom: "bottom", Bottom: "bottom",
Stretch: "stretch" Stretch: "stretch"
} },
StartOfWeek: 0
});BI.version = "2.0";/** });BI.version = "2.0";/**
* absolute实现的居中布局 * absolute实现的居中布局
* @class BI.AbsoluteCenterLayout * @class BI.AbsoluteCenterLayout
@ -36504,9 +36508,7 @@ 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"
}); });
}, },
@ -37255,7 +37257,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_layer++ zIndex: BI.zIndex_tip
}); });
}, },
@ -39190,7 +39192,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: "body", // popupview放置的容器,默认为body container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
@ -39648,12 +39650,6 @@ 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";
@ -39968,7 +39964,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",
@ -51029,7 +51025,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_layer++, zIndex: BI.zIndex_tip - 2,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -51038,7 +51034,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_layer++, zIndex: BI.zIndex_tip - 1,
top: 0, top: 0,
left: 0, left: 0,
right: 0, right: 0,
@ -51808,7 +51804,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
return false; return false;
}; };
this.element.css({ this.element.css({
"z-index": BI.zIndex_layer++, "z-index": BI.zIndex_popup,
"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});
@ -54693,8 +54689,7 @@ 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());
@ -79087,7 +79082,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
} }
}], }],
hideChecker: function (e) { hideChecker: function (e) {
return self.triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return self.triggerBtn.element.find(e.target).length === 0;
} }
}, },
left: 0, left: 0,
@ -90660,6 +90655,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
adjustLength: 0, adjustLength: 0,
direction: "bottom", direction: "bottom",
trigger: "click", trigger: "click",
container: null,
stopPropagation: false, stopPropagation: false,
el: {} el: {}
}); });
@ -97803,7 +97799,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
}, },
value: o.value, value: o.value,
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });
@ -98063,7 +98059,6 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
text: o.text, text: o.text,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {
container: "body",
offset: { offset: {
left: 0, left: 0,
top: 0, top: 0,
@ -98185,8 +98180,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
}, },
value: o.value, value: o.value,
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && return triggerBtn.element.find(e.target).length === 0;
(self.popup && !self.popup.element.__isMouseInBounds__(e));
} }
}); });
@ -98574,7 +98568,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
value: o.value value: o.value
}, },
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });
@ -102020,7 +102014,6 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {
container: "body",
offset: this.constants.offset offset: this.constants.offset
}, },
searcher: { searcher: {
@ -102095,7 +102088,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
}, },
value: {value: o.value || {}}, value: {value: o.value || {}},
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });
@ -103080,22 +103073,19 @@ 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 :
@ -103132,8 +103122,7 @@ 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);
}); });
@ -103147,16 +103136,14 @@ 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;
@ -103174,22 +103161,19 @@ 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 :
@ -104740,7 +104724,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
}, },
value: o.value, value: o.value,
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });
@ -107058,7 +107042,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
} }
}, },
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
}, },
value: o.value value: o.value
}); });
@ -107328,7 +107312,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
} }
}, },
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
}, },
value: o.value value: o.value
}); });

92
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

3
dist/utils.js vendored

@ -10143,7 +10143,8 @@ _.extend(BI, {
Top: "top", Top: "top",
Bottom: "bottom", Bottom: "bottom",
Stretch: "stretch" Stretch: "stretch"
} },
StartOfWeek: 0
});/** });/**
* 对数组对象的扩展 * 对数组对象的扩展
* @class Array * @class Array

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

45
dist/widget.js vendored

@ -2225,6 +2225,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
adjustLength: 0, adjustLength: 0,
direction: "bottom", direction: "bottom",
trigger: "click", trigger: "click",
container: null,
stopPropagation: false, stopPropagation: false,
el: {} el: {}
}); });
@ -9368,7 +9369,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
}, },
value: o.value, value: o.value,
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });
@ -9628,7 +9629,6 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
text: o.text, text: o.text,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {
container: "body",
offset: { offset: {
left: 0, left: 0,
top: 0, top: 0,
@ -9750,8 +9750,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
}, },
value: o.value, value: o.value,
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && return triggerBtn.element.find(e.target).length === 0;
(self.popup && !self.popup.element.__isMouseInBounds__(e));
} }
}); });
@ -10139,7 +10138,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
value: o.value value: o.value
}, },
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });
@ -13585,7 +13584,6 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {
container: "body",
offset: this.constants.offset offset: this.constants.offset
}, },
searcher: { searcher: {
@ -13660,7 +13658,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
}, },
value: {value: o.value || {}}, value: {value: o.value || {}},
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });
@ -14645,22 +14643,19 @@ 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 :
@ -14697,8 +14692,7 @@ 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);
}); });
@ -14712,16 +14706,14 @@ 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;
@ -14739,22 +14731,19 @@ 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 :
@ -16305,7 +16294,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
}, },
value: o.value, value: o.value,
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });
@ -18623,7 +18612,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
} }
}, },
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
}, },
value: o.value value: o.value
}); });
@ -18893,7 +18882,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
} }
}, },
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
}, },
value: o.value value: o.value
}); });

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: "body", // popupview放置的容器,默认为body container: null, // popupview放置的容器,默认为this.element
isDefaultInit: false, isDefaultInit: false,
destroyWhenHide: false, destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整 isNeedAdjustHeight: true, // 是否需要高度调整
@ -468,12 +468,6 @@ 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";

2
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",

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_layer++, zIndex: BI.zIndex_tip - 2,
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_layer++, zIndex: BI.zIndex_tip - 1,
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_layer++, "z-index": BI.zIndex_popup,
"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});

3
src/base/single/editor/editor.js

@ -227,8 +227,7 @@ 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());

4
src/base/single/single.js

@ -19,9 +19,7 @@ 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"
}); });
}, },

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_layer++ zIndex: BI.zIndex_tip
}); });
}, },

2
src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js

@ -80,7 +80,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
} }
}], }],
hideChecker: function (e) { hideChecker: function (e) {
return self.triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return self.triggerBtn.element.find(e.target).length === 0;
} }
}, },
left: 0, left: 0,

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

@ -15,6 +15,7 @@ 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));
}, },
@ -114,7 +115,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", BI.zIndex_layer++).show(0, callback).trigger("__resize__"); this._getLayout(name).element.css("z-index", this.zindex++).show(0, callback).trigger("__resize__");
return this; return this;
}, },
@ -129,7 +130,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", BI.zIndex_layer++); layout.element.css("z-index", this.zindex++);
return this; return this;
}, },

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

@ -11,5 +11,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;
} }
}); });

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

@ -19,6 +19,7 @@ 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 = {};
}, },
@ -84,11 +85,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", BI.zIndex_layer++); container.element.css("zIndex", this.zindex++);
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] = BI.zIndex_layer; this.zindexMap[name] = this.zindex;
this.modal && container.element.__buildZIndexMask__(BI.zIndex_layer++); this.modal && container.element.__buildZIndexMask__(this.zindex++);
this.get(name).setZindex(BI.zIndex_layer++); this.get(name).setZindex(this.zindex++);
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();

3
src/core/var.js

@ -132,5 +132,6 @@ _.extend(BI, {
Top: "top", Top: "top",
Bottom: "bottom", Bottom: "bottom",
Stretch: "stretch" Stretch: "stretch"
} },
StartOfWeek: 0
}); });

1
src/widget/downlist/combo.downlist.js

@ -10,6 +10,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, {
adjustLength: 0, adjustLength: 0,
direction: "bottom", direction: "bottom",
trigger: "click", trigger: "click",
container: null,
stopPropagation: false, stopPropagation: false,
el: {} el: {}
}); });

2
src/widget/multiselect/multiselect.combo.js

@ -161,7 +161,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
}, },
value: o.value, value: o.value,
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });

4
src/widget/multiselect/multiselect.insert.combo.js

@ -33,7 +33,6 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
text: o.text, text: o.text,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {
container: "body",
offset: { offset: {
left: 0, left: 0,
top: 0, top: 0,
@ -155,8 +154,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
}, },
value: o.value, value: o.value,
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && return triggerBtn.element.find(e.target).length === 0;
(self.popup && !self.popup.element.__isMouseInBounds__(e));
} }
}); });

2
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -166,7 +166,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
value: o.value value: o.value
}, },
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });

3
src/widget/multitree/multi.tree.combo.js

@ -40,7 +40,6 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
valueFormatter: o.valueFormatter, valueFormatter: o.valueFormatter,
// adapter: this.popup, // adapter: this.popup,
masker: { masker: {
container: "body",
offset: this.constants.offset offset: this.constants.offset
}, },
searcher: { searcher: {
@ -115,7 +114,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, {
}, },
value: {value: o.value || {}}, value: {value: o.value || {}},
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });

27
src/widget/numberinterval/numberinterval.js

@ -305,22 +305,19 @@ 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 :
@ -357,8 +354,7 @@ 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);
}); });
@ -372,16 +368,14 @@ 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;
@ -399,22 +393,19 @@ 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 :

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

@ -166,7 +166,7 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {
}, },
value: o.value, value: o.value,
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
} }
}); });

2
src/widget/singleselect/singleselect.combo.js

@ -122,7 +122,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, {
} }
}, },
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
}, },
value: o.value value: o.value
}); });

2
src/widget/singleselect/singleselect.insert.combo.js

@ -121,7 +121,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, {
} }
}, },
hideChecker: function (e) { hideChecker: function (e) {
return triggerBtn.element.find(e.target).length === 0 && (self.popup && !self.popup.element.__isMouseInBounds__(e)); return triggerBtn.element.find(e.target).length === 0;
}, },
value: o.value value: o.value
}); });

Loading…
Cancel
Save