Browse Source

层级替换

es6
windy 6 years ago
parent
commit
3efc812a82
  1. 18
      dist/_fineui.min.js
  2. 8
      dist/base.js
  3. 23
      dist/bundle.js
  4. 22
      dist/bundle.min.js
  5. 15
      dist/core.js
  6. 23
      dist/fineui.js
  7. 18
      dist/fineui.min.js
  8. 4
      src/base/foundation/message.js
  9. 2
      src/base/layer/layer.popup.js
  10. 2
      src/base/single/tip/tip.js
  11. 5
      src/core/controller/controller.layer.js
  12. 1
      src/core/controller/controller.masker.js
  13. 9
      src/core/controller/controller.popover.js

18
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

8
dist/base.js vendored

@ -1093,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++
}); });
}, },
@ -14867,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,
@ -14876,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,
@ -15644,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});

23
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();
@ -37008,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++
}); });
}, },
@ -50782,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,
@ -50791,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,
@ -51559,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});

22
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

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();

23
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();
@ -37257,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++
}); });
}, },
@ -51031,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,
@ -51040,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,
@ -51808,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});

18
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

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});

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

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();

Loading…
Cancel
Save