|
|
|
@ -26544,147 +26544,6 @@ BI.BubblesController = BI.inherit(BI.Controller, {
|
|
|
|
|
delete this.bubblesManager[name]; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
});/** |
|
|
|
|
* guy |
|
|
|
|
* FloatBox弹出层控制器, z-index在100w层级 |
|
|
|
|
* @class BI.FloatBoxController |
|
|
|
|
* @extends BI.Controller |
|
|
|
|
*/ |
|
|
|
|
BI.FloatBoxController = BI.inherit(BI.Controller, { |
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
return BI.extend(BI.FloatBoxController.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
modal: true, // 模态窗口
|
|
|
|
|
render: "body" |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
|
BI.FloatBoxController.superclass._init.apply(this, arguments); |
|
|
|
|
this.modal = this.options.modal; |
|
|
|
|
this.floatManager = {}; |
|
|
|
|
this.floatLayer = {}; |
|
|
|
|
this.floatContainer = {}; |
|
|
|
|
this.floatOpened = {}; |
|
|
|
|
this.zindex = BI.zIndex_floatbox; |
|
|
|
|
this.zindexMap = {}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_check: function (name) { |
|
|
|
|
return BI.isNotNull(this.floatManager[name]); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
create: function (name, options, context) { |
|
|
|
|
if (this._check(name)) { |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
var floatbox = BI.createWidget({ |
|
|
|
|
type: "bi.float_box" |
|
|
|
|
}, options, context); |
|
|
|
|
this.add(name, floatbox, options, context); |
|
|
|
|
return this; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
add: function (name, floatbox, options, context) { |
|
|
|
|
var self = this; |
|
|
|
|
options || (options = {}); |
|
|
|
|
if (this._check(name)) { |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
this.floatContainer[name] = BI.createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
cls: "bi-popup-view", |
|
|
|
|
items: [{ |
|
|
|
|
el: (this.floatLayer[name] = BI.createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [floatbox] |
|
|
|
|
}, context)), |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: 0 |
|
|
|
|
}] |
|
|
|
|
}); |
|
|
|
|
this.floatManager[name] = floatbox; |
|
|
|
|
(function (key) { |
|
|
|
|
floatbox.on(BI.FloatBox.EVENT_CLOSE, function () { |
|
|
|
|
self.close(key); |
|
|
|
|
}); |
|
|
|
|
})(name); |
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
element: options.container || this.options.render, |
|
|
|
|
items: [{ |
|
|
|
|
el: this.floatContainer[name], |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: 0 |
|
|
|
|
}] |
|
|
|
|
}); |
|
|
|
|
return this; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
open: function (name) { |
|
|
|
|
if (!this._check(name)) { |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
if (!this.floatOpened[name]) { |
|
|
|
|
this.floatOpened[name] = true; |
|
|
|
|
var container = this.floatContainer[name]; |
|
|
|
|
container.element.css("zIndex", this.zindex++); |
|
|
|
|
this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]); |
|
|
|
|
this.zindexMap[name] = this.zindex; |
|
|
|
|
this.modal && container.element.__buildZIndexMask__(this.zindex++); |
|
|
|
|
this.get(name).setZindex(this.zindex++); |
|
|
|
|
this.floatContainer[name].visible(); |
|
|
|
|
var floatbox = this.get(name); |
|
|
|
|
floatbox.show(); |
|
|
|
|
var W = $(this.options.render).width(), H = $(this.options.render).height(); |
|
|
|
|
var w = floatbox.element.width(), h = floatbox.element.height(); |
|
|
|
|
var left = (W - w) / 2, top = (H - h) / 2; |
|
|
|
|
if (left < 0) { |
|
|
|
|
left = 0; |
|
|
|
|
} |
|
|
|
|
if (top < 0) { |
|
|
|
|
top = 0; |
|
|
|
|
} |
|
|
|
|
floatbox.element.css({ |
|
|
|
|
left: left + "px", |
|
|
|
|
top: top + "px" |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
close: function (name) { |
|
|
|
|
if (!this._check(name)) { |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
if (this.floatOpened[name]) { |
|
|
|
|
delete this.floatOpened[name]; |
|
|
|
|
this.floatContainer[name].invisible(); |
|
|
|
|
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]); |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
get: function (name) { |
|
|
|
|
return this.floatManager[name]; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
remove: function (name) { |
|
|
|
|
if (!this._check(name)) { |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
this.floatContainer[name].destroy(); |
|
|
|
|
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]); |
|
|
|
|
delete this.floatManager[name]; |
|
|
|
|
delete this.floatLayer[name]; |
|
|
|
|
delete this.zindexMap[name]; |
|
|
|
|
delete this.floatContainer[name]; |
|
|
|
|
delete this.floatOpened[name]; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
});/** |
|
|
|
|
* 弹出层面板控制器, z-index在10w层级 |
|
|
|
|
* |
|
|
|
@ -26714,14 +26573,15 @@ BI.LayerController = BI.inherit(BI.Controller, {
|
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
make: function (name, container, op) { |
|
|
|
|
make: function (name, container, op, context) { |
|
|
|
|
if (BI.isWidget(container)) { |
|
|
|
|
op = op || {}; |
|
|
|
|
op.container = container; |
|
|
|
|
} else { |
|
|
|
|
context = op; |
|
|
|
|
op = container; |
|
|
|
|
} |
|
|
|
|
return this.create(name, null, op); |
|
|
|
|
return this.create(name, null, op, context); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
create: function (name, from, op, context) { |
|
|
|
@ -26740,10 +26600,9 @@ BI.LayerController = BI.inherit(BI.Controller, {
|
|
|
|
|
if (this.has(name)) { |
|
|
|
|
return this.get(name); |
|
|
|
|
} |
|
|
|
|
var widget = BI.createWidget((op.render || {}), { |
|
|
|
|
type: "bi.layout", |
|
|
|
|
cls: op.cls |
|
|
|
|
}, context); |
|
|
|
|
var widget = BI.createWidget((op.render || {}), BI.extend({ |
|
|
|
|
type: "bi.layout" |
|
|
|
|
}, op), context); |
|
|
|
|
var layout = BI.createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [{ |
|
|
|
@ -26770,16 +26629,16 @@ BI.LayerController = BI.inherit(BI.Controller, {
|
|
|
|
|
layout.element.css({ |
|
|
|
|
left: w.offset().left + (offset.left || 0), |
|
|
|
|
top: w.offset().top + (offset.top || 0), |
|
|
|
|
width: offset.width || (w.outerWidth() - (offset.right || 0)) || "", |
|
|
|
|
height: offset.height || (w.outerHeight() - (offset.bottom || 0)) || "" |
|
|
|
|
width: offset.width || (w.outerWidth() - (offset.left || 0) - (offset.right || 0)) || "", |
|
|
|
|
height: offset.height || (w.outerHeight() - (offset.top || 0) - (offset.bottom || 0)) || "" |
|
|
|
|
}); |
|
|
|
|
layout.element.on("__resize__", function () { |
|
|
|
|
w.is(":visible") && |
|
|
|
|
layout.element.css({ |
|
|
|
|
left: w.offset().left + (offset.left || 0), |
|
|
|
|
top: w.offset().top + (offset.top || 0), |
|
|
|
|
width: offset.width || (w.outerWidth() - (offset.right || 0)) || "", |
|
|
|
|
height: offset.height || (w.outerHeight() - (offset.bottom || 0)) || "" |
|
|
|
|
width: offset.width || (w.outerWidth() - (offset.left || 0) - (offset.right || 0)) || "", |
|
|
|
|
height: offset.height || (w.outerHeight() - (offset.top || 0) - (offset.bottom || 0)) || "" |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
@ -26857,6 +26716,147 @@ BI.MaskersController = BI.inherit(BI.LayerController, {
|
|
|
|
|
BI.MaskersController.superclass._init.apply(this, arguments); |
|
|
|
|
this.zindex = BI.zIndex_masker; |
|
|
|
|
} |
|
|
|
|
});/** |
|
|
|
|
* guy |
|
|
|
|
* popover弹出层控制器, z-index在100w层级 |
|
|
|
|
* @class BI.popoverController |
|
|
|
|
* @extends BI.Controller |
|
|
|
|
*/ |
|
|
|
|
BI.PopoverController = BI.inherit(BI.Controller, { |
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
return BI.extend(BI.PopoverController.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
modal: true, // 模态窗口
|
|
|
|
|
render: "body" |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
|
BI.PopoverController.superclass._init.apply(this, arguments); |
|
|
|
|
this.modal = this.options.modal; |
|
|
|
|
this.floatManager = {}; |
|
|
|
|
this.floatLayer = {}; |
|
|
|
|
this.floatContainer = {}; |
|
|
|
|
this.floatOpened = {}; |
|
|
|
|
this.zindex = BI.zIndex_popover; |
|
|
|
|
this.zindexMap = {}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_check: function (name) { |
|
|
|
|
return BI.isNotNull(this.floatManager[name]); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
create: function (name, options, context) { |
|
|
|
|
if (this._check(name)) { |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
var popover = BI.createWidget(options || {}, { |
|
|
|
|
type: "bi.popover" |
|
|
|
|
}, context); |
|
|
|
|
this.add(name, popover, options, context); |
|
|
|
|
return this; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
add: function (name, popover, options, context) { |
|
|
|
|
var self = this; |
|
|
|
|
options || (options = {}); |
|
|
|
|
if (this._check(name)) { |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
this.floatContainer[name] = BI.createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
cls: "bi-popup-view", |
|
|
|
|
items: [{ |
|
|
|
|
el: (this.floatLayer[name] = BI.createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [popover] |
|
|
|
|
}, context)), |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: 0 |
|
|
|
|
}] |
|
|
|
|
}); |
|
|
|
|
this.floatManager[name] = popover; |
|
|
|
|
(function (key) { |
|
|
|
|
popover.on(BI.Popover.EVENT_CLOSE, function () { |
|
|
|
|
self.close(key); |
|
|
|
|
}); |
|
|
|
|
})(name); |
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
element: options.container || this.options.render, |
|
|
|
|
items: [{ |
|
|
|
|
el: this.floatContainer[name], |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: 0 |
|
|
|
|
}] |
|
|
|
|
}); |
|
|
|
|
return this; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
open: function (name) { |
|
|
|
|
if (!this._check(name)) { |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
if (!this.floatOpened[name]) { |
|
|
|
|
this.floatOpened[name] = true; |
|
|
|
|
var container = this.floatContainer[name]; |
|
|
|
|
container.element.css("zIndex", this.zindex++); |
|
|
|
|
this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]); |
|
|
|
|
this.zindexMap[name] = this.zindex; |
|
|
|
|
this.modal && container.element.__buildZIndexMask__(this.zindex++); |
|
|
|
|
this.get(name).setZindex(this.zindex++); |
|
|
|
|
this.floatContainer[name].visible(); |
|
|
|
|
var popover = this.get(name); |
|
|
|
|
popover.show && popover.show(); |
|
|
|
|
var W = $(this.options.render).width(), H = $(this.options.render).height(); |
|
|
|
|
var w = popover.element.width(), h = popover.element.height(); |
|
|
|
|
var left = (W - w) / 2, top = (H - h) / 2; |
|
|
|
|
if (left < 0) { |
|
|
|
|
left = 0; |
|
|
|
|
} |
|
|
|
|
if (top < 0) { |
|
|
|
|
top = 0; |
|
|
|
|
} |
|
|
|
|
popover.element.css({ |
|
|
|
|
left: left + "px", |
|
|
|
|
top: top + "px" |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
close: function (name) { |
|
|
|
|
if (!this._check(name)) { |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
if (this.floatOpened[name]) { |
|
|
|
|
delete this.floatOpened[name]; |
|
|
|
|
this.floatContainer[name].invisible(); |
|
|
|
|
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]); |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
get: function (name) { |
|
|
|
|
return this.floatManager[name]; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
remove: function (name) { |
|
|
|
|
if (!this._check(name)) { |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
this.floatContainer[name].destroy(); |
|
|
|
|
this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]); |
|
|
|
|
delete this.floatManager[name]; |
|
|
|
|
delete this.floatLayer[name]; |
|
|
|
|
delete this.zindexMap[name]; |
|
|
|
|
delete this.floatContainer[name]; |
|
|
|
|
delete this.floatOpened[name]; |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
});/** |
|
|
|
|
* window.resize 控制器 |
|
|
|
|
* |
|
|
|
@ -30063,7 +30063,7 @@ _.extend(BI, {
|
|
|
|
|
MIN: -0xfffffffffffffff, |
|
|
|
|
EVENT_RESPONSE_TIME: 200, |
|
|
|
|
zIndex_layer: 1e5, |
|
|
|
|
zIndex_floatbox: 1e6, |
|
|
|
|
zIndex_popover: 1e6, |
|
|
|
|
zIndex_popup: 1e7, |
|
|
|
|
zIndex_masker: 1e8, |
|
|
|
|
zIndex_tip: 1e9, |
|
|
|
@ -36315,7 +36315,7 @@ BI.Layers = new BI.LayerController();
|
|
|
|
|
BI.Maskers = new BI.MaskersController(); |
|
|
|
|
BI.Bubbles = new BI.BubblesController(); |
|
|
|
|
BI.Tooltips = new BI.TooltipsController(); |
|
|
|
|
BI.Popovers = new BI.FloatBoxController(); |
|
|
|
|
BI.Popovers = new BI.PopoverController(); |
|
|
|
|
BI.Broadcasts = new BI.BroadcastController(); |
|
|
|
|
BI.StyleLoaders = new BI.StyleLoaderManager();/** |
|
|
|
|
* canvas绘图 |
|
|
|
@ -49129,14 +49129,14 @@ BI.GridView = BI.inherit(BI.Widget, {
|
|
|
|
|
}); |
|
|
|
|
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL"; |
|
|
|
|
BI.shortcut("bi.grid_view", BI.GridView);/** |
|
|
|
|
* floatBox弹出层, |
|
|
|
|
* @class BI.FloatBox |
|
|
|
|
* Popover弹出层, |
|
|
|
|
* @class BI.Popover |
|
|
|
|
* @extends BI.Widget |
|
|
|
|
*/ |
|
|
|
|
BI.FloatBox = BI.inherit(BI.Widget, { |
|
|
|
|
BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
return BI.extend(BI.FloatBox.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
baseCls: "bi-float-box bi-card", |
|
|
|
|
return BI.extend(BI.Popover.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
baseCls: "bi-popover bi-card", |
|
|
|
|
width: 600, |
|
|
|
|
height: 500, |
|
|
|
|
header: null, |
|
|
|
@ -49245,12 +49245,12 @@ BI.FloatBox = BI.inherit(BI.Widget, {
|
|
|
|
|
|
|
|
|
|
open: function () { |
|
|
|
|
this.show(); |
|
|
|
|
this.fireEvent(BI.FloatBox.EVENT_OPEN); |
|
|
|
|
this.fireEvent(BI.Popover.EVENT_OPEN, arguments); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
close: function () { |
|
|
|
|
this.hide(); |
|
|
|
|
this.fireEvent(BI.FloatBox.EVENT_CLOSE); |
|
|
|
|
this.fireEvent(BI.Popover.EVENT_CLOSE, arguments); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setZindex: function (zindex) { |
|
|
|
@ -49261,11 +49261,11 @@ BI.FloatBox = BI.inherit(BI.Widget, {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.float_box", BI.FloatBox); |
|
|
|
|
BI.shortcut("bi.popover", BI.Popover); |
|
|
|
|
|
|
|
|
|
BI.BarFloatBox = BI.inherit(BI.FloatBox, { |
|
|
|
|
BI.BarPopover = BI.inherit(BI.Popover, { |
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
return BI.extend(BI.FloatBox.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
return BI.extend(BI.BarPopover.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
|
btns: [BI.i18nText(BI.i18nText("BI-Basic_Sure")), BI.i18nText(BI.i18nText("BI-Basic_Cancel"))] |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
@ -49281,7 +49281,7 @@ BI.BarFloatBox = BI.inherit(BI.FloatBox, {
|
|
|
|
|
value: 1, |
|
|
|
|
level: "ignore", |
|
|
|
|
handler: function (v) { |
|
|
|
|
self.fireEvent(BI.FloatBox.EVENT_CANCEL, v); |
|
|
|
|
self.fireEvent(BI.Popover.EVENT_CANCEL, v); |
|
|
|
|
self.close(v); |
|
|
|
|
} |
|
|
|
|
}, { |
|
|
|
@ -49290,7 +49290,7 @@ BI.BarFloatBox = BI.inherit(BI.FloatBox, {
|
|
|
|
|
warningTitle: o.warningTitle, |
|
|
|
|
value: 0, |
|
|
|
|
handler: function (v) { |
|
|
|
|
self.fireEvent(BI.FloatBox.EVENT_CONFIRM, v); |
|
|
|
|
self.fireEvent(BI.Popover.EVENT_CONFIRM, v); |
|
|
|
|
self.close(v); |
|
|
|
|
} |
|
|
|
|
}] |
|
|
|
@ -49298,12 +49298,12 @@ BI.BarFloatBox = BI.inherit(BI.FloatBox, {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.bar_float_box", BI.BarFloatBox); |
|
|
|
|
BI.shortcut("bi.bar_popover", BI.BarPopover); |
|
|
|
|
|
|
|
|
|
BI.FloatBox.EVENT_CLOSE = "EVENT_CLOSE"; |
|
|
|
|
BI.FloatBox.EVENT_OPEN = "EVENT_OPEN"; |
|
|
|
|
BI.FloatBox.EVENT_CANCEL = "EVENT_CANCEL"; |
|
|
|
|
BI.FloatBox.EVENT_CONFIRM = "EVENT_CONFIRM"; |
|
|
|
|
BI.Popover.EVENT_CLOSE = "EVENT_CLOSE"; |
|
|
|
|
BI.Popover.EVENT_OPEN = "EVENT_OPEN"; |
|
|
|
|
BI.Popover.EVENT_CANCEL = "EVENT_CANCEL"; |
|
|
|
|
BI.Popover.EVENT_CONFIRM = "EVENT_CONFIRM"; |
|
|
|
|
/** |
|
|
|
|
* 下拉框弹出层, zIndex在1000w |
|
|
|
|
* @class BI.PopupView |
|
|
|
|