|
|
@ -26544,147 +26544,6 @@ BI.BubblesController = BI.inherit(BI.Controller, { |
|
|
|
delete this.bubblesManager[name]; |
|
|
|
delete this.bubblesManager[name]; |
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
});/** |
|
|
|
|
|
|
|
* 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({ |
|
|
|
|
|
|
|
type: "bi.popover" |
|
|
|
|
|
|
|
}, options, 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; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
});/** |
|
|
|
});/** |
|
|
|
* 弹出层面板控制器, z-index在10w层级 |
|
|
|
* 弹出层面板控制器, z-index在10w层级 |
|
|
|
* |
|
|
|
* |
|
|
@ -26857,6 +26716,147 @@ BI.MaskersController = BI.inherit(BI.LayerController, { |
|
|
|
BI.MaskersController.superclass._init.apply(this, arguments); |
|
|
|
BI.MaskersController.superclass._init.apply(this, arguments); |
|
|
|
this.zindex = BI.zIndex_masker; |
|
|
|
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 控制器 |
|
|
|
* window.resize 控制器 |
|
|
|
* |
|
|
|
* |
|
|
@ -49136,7 +49136,7 @@ BI.shortcut("bi.grid_view", BI.GridView);/** |
|
|
|
BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
|
return BI.extend(BI.Popover.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
return BI.extend(BI.Popover.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
baseCls: "bi-float-box bi-card", |
|
|
|
baseCls: "bi-popover bi-card", |
|
|
|
width: 600, |
|
|
|
width: 600, |
|
|
|
height: 500, |
|
|
|
height: 500, |
|
|
|
header: null, |
|
|
|
header: null, |
|
|
@ -49265,7 +49265,7 @@ BI.shortcut("bi.popover", BI.Popover); |
|
|
|
|
|
|
|
|
|
|
|
BI.BarPopover = BI.inherit(BI.Popover, { |
|
|
|
BI.BarPopover = BI.inherit(BI.Popover, { |
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
|
return BI.extend(BI.Popover.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"))] |
|
|
|
btns: [BI.i18nText(BI.i18nText("BI-Basic_Sure")), BI.i18nText(BI.i18nText("BI-Basic_Cancel"))] |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|