guy 7 years ago
parent
commit
123ff18922
  1. 11
      demo/js/core/popup/demo.popover.js
  2. 4
      dist/base.js
  3. 286
      dist/bundle.js
  4. 12
      dist/bundle.min.js
  5. 282
      dist/core.js
  6. 11
      dist/demo.js
  7. 286
      dist/fineui.js
  8. 10
      dist/fineui.min.js
  9. 4
      src/base/layer/layer.popover.js
  10. 4
      src/core/controller/controller.popover.js
  11. 2
      src/css/base/layer/panel.css
  12. 14
      src/css/base/pager/pager.css
  13. 67
      src/css/base/single/tip/tip.css
  14. 196
      src/css/base/table/table.css
  15. 14
      src/css/base/trigger/trigger.css
  16. 0
      src/css/base/view/popover.css
  17. 2
      src/css/core/utils/common.css
  18. 1
      src/css/resource/font.css
  19. 2
      src/css/theme/dark.css
  20. 5
      src/css/widget/exceltable/exceltable.css
  21. 13
      src/css/widget/previewtable/previewtable.css
  22. 2
      src/less/base/view/popover.less

11
demo/js/core/popup/demo.popover.js

@ -12,9 +12,10 @@ Demo.Func = BI.inherit(BI.Widget, {
text: "点击弹出Popover", text: "点击弹出Popover",
width: 200, width: 200,
height: 80, height: 80,
handler: function() { handler: function () {
BI.Popovers.remove(id); BI.Popovers.remove(id);
BI.Popovers.create(id, { BI.Popovers.create(id, {
type: "bi.bar_popover",
header: { header: {
type: "bi.label", type: "bi.label",
text: "这个是header" text: "这个是header"
@ -22,11 +23,11 @@ Demo.Func = BI.inherit(BI.Widget, {
body: { body: {
type: "bi.label", type: "bi.label",
text: "这个是body" text: "这个是body"
},
footer: {
type: "bi.label",
text: "这个是footer"
} }
// footer: {
// type: "bi.label",
// text: "这个是footer"
// }
}).open(id); }).open(id);
} }
}; };

4
dist/base.js vendored

@ -15309,7 +15309,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,
@ -15438,7 +15438,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"))]
}); });
}, },

286
dist/bundle.js vendored

@ -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"))]
}); });
}, },

12
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

282
dist/core.js vendored

@ -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 控制器
* *

11
dist/demo.js vendored

@ -8472,9 +8472,10 @@ Demo.Func = BI.inherit(BI.Widget, {
text: "点击弹出Popover", text: "点击弹出Popover",
width: 200, width: 200,
height: 80, height: 80,
handler: function() { handler: function () {
BI.Popovers.remove(id); BI.Popovers.remove(id);
BI.Popovers.create(id, { BI.Popovers.create(id, {
type: "bi.bar_popover",
header: { header: {
type: "bi.label", type: "bi.label",
text: "这个是header" text: "这个是header"
@ -8482,11 +8483,11 @@ Demo.Func = BI.inherit(BI.Widget, {
body: { body: {
type: "bi.label", type: "bi.label",
text: "这个是body" text: "这个是body"
},
footer: {
type: "bi.label",
text: "这个是footer"
} }
// footer: {
// type: "bi.label",
// text: "这个是footer"
// }
}).open(id); }).open(id);
} }
}; };

286
dist/fineui.js vendored

@ -26787,147 +26787,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层级
* *
@ -27100,6 +26959,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 控制器
* *
@ -50942,7 +50942,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,
@ -51071,7 +51071,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"))]
}); });
}, },

10
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

4
src/base/layer/layer.popover.js

@ -6,7 +6,7 @@
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,
@ -135,7 +135,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"))]
}); });
}, },

4
src/core/controller/controller.floatbox.js → src/core/controller/controller.popover.js

@ -31,9 +31,9 @@ BI.PopoverController = BI.inherit(BI.Controller, {
if (this._check(name)) { if (this._check(name)) {
return this; return this;
} }
var popover = BI.createWidget({ var popover = BI.createWidget(options || {}, {
type: "bi.popover" type: "bi.popover"
}, options, context); }, context);
this.add(name, popover, options, context); this.add(name, popover, options, context);
return this; return this;
}, },

2
src/css/base/layer/panel.css

@ -4,7 +4,7 @@
border-radius: 2px; border-radius: 2px;
} }
.bi-panel .panel-title { .bi-panel .panel-title {
background-color: #f2f4f7; background-color: #F2F4F7;
} }
.bi-panel .panel-title .panel-title-text { .bi-panel .panel-title .panel-title-text {
cursor: text; cursor: text;

14
src/css/base/pager/pager.css

@ -1,3 +1,17 @@
.bi-all-count-pager .all-pager-prev {
font-size: 16px;
}
.bi-all-count-pager .all-pager-next {
font-size: 16px;
}
.bi-direction-pager .direction-pager-prev {
font-size: 16px;
}
.bi-direction-pager .direction-pager-next {
font-size: 16px;
}
.bi-pager .page-item { .bi-pager .page-item {
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;

67
src/css/base/single/tip/tip.css

@ -1,3 +1,70 @@
.bi-bubble {
font-size: 14px;
}
.bi-bubble .bubble-text {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-bubble .bubble-error {
background: #ffecec;
color: #ff4949;
}
.bi-bubble .bubble-common {
background: #eaf2fd;
color: #3685f2;
}
.bi-bubble .bubble-success {
background: #e1f4e7;
color: #5cb75d;
}
.bi-bubble .bubble-warning {
background: #feeed7;
color: #faaa39;
}
.bi-tip { .bi-tip {
position: fixed !important; position: fixed !important;
} }
.bi-toast {
font-size: 14px;
color: #ffffff;
max-width: 400px;
min-width: 150px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-toast.toast-success {
background: #58cc7d;
}
.bi-toast.toast-warning {
background: #faaa39;
}
.bi-toast.toast-error {
background: #ff4949;
}
.bi-toast.toast-normal {
background: #3f8ce8;
}
.bi-toast .toast-icon {
font-size: 16px;
}
.bi-tooltip {
max-width: 250px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
font-size: 12px;
color: #ffffff;
}
.bi-tooltip.tooltip-success {
background: #647185;
border: 1px solid #647185;
}
.bi-tooltip.tooltip-warning {
background: #ff4949;
border: 1px solid #e85050;
}

196
src/css/base/table/table.css

@ -1,3 +1,169 @@
.bi-collection-table-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-collection-table-cell.first-row {
border-top: 1px solid #d4dadd;
}
.bi-collection-table-cell.first-col {
border-left: 1px solid #d4dadd;
}
.bi-theme-dark .bi-collection-table-cell.first-row {
border-top: 1px solid #525466;
}
.bi-theme-dark .bi-collection-table-cell.first-col {
border-left: 1px solid #525466;
}
.bi-quick-collection-table > div > .bi-collection {
overflow: hidden !important;
overflow-x: hidden !important;
overflow-y: hidden !important;
}
.bi-grid-table-cell {
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
}
.bi-grid-table-cell.first-row {
border-top: 1px solid #d4dadd;
}
.bi-grid-table-cell.first-col {
border-left: 1px solid #d4dadd;
}
.bi-theme-dark .bi-grid-table-cell.first-row {
border-top: 1px solid #525466;
}
.bi-theme-dark .bi-grid-table-cell.first-col {
border-left: 1px solid #525466;
}
.scrollbar-layout-main {
box-sizing: border-box;
outline: none;
overflow: hidden;
position: absolute;
transition-duration: 250ms;
transition-timing-function: ease;
user-select: none;
background-color: rgba(102, 102, 102, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666,endColorstr=#0d666666);
border-radius: 5px;
}
.bi-theme-dark .scrollbar-layout-main {
background-color: rgba(204, 204, 204, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc,endColorstr=#0dcccccc);
}
.scrollbar-layout-main-vertical {
bottom: 0;
right: 0;
top: 0;
transition-property: background-color;
width: 10px;
}
.scrollbar-layout-main-vertical.public-scrollbar-main-active,
.scrollbar-layout-main-vertical:hover {
width: 10px;
}
.scrollbar-layout-main-horizontal {
bottom: 0;
height: 10px;
left: 0;
transition-property: background-color;
background-color: rgba(102, 102, 102, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0d666666,endColorstr=#0d666666);
}
.bi-theme-dark .scrollbar-layout-main-horizontal {
background-color: rgba(204, 204, 204, 0.05);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#0dcccccc,endColorstr=#0dcccccc);
}
/* Touching the scroll-track directly makes the scroll-track bolder */
.scrollbar-layout-main-horizontal.public-scrollbar-main-active,
.scrollbar-layout-main-horizontal:hover {
height: 10px;
}
.scrollbar-layout-face {
left: 0;
overflow: hidden;
position: absolute;
z-index: 1;
}
/**
* This selector renders the "nub" of the scrollface. The nub must
* be rendered as pseudo-element so that it won't receive any UI events then
* we can get the correct `event.offsetX` and `event.offsetY` from the
* scrollface element while dragging it.
*/
.scrollbar-layout-face:after {
border-radius: 6px;
content: '';
display: block;
position: absolute;
transition: background-color 250ms ease;
}
.scrollbar-layout-face-horizontal {
bottom: 0;
left: 0;
top: 0;
}
.scrollbar-layout-face-horizontal:after {
bottom: 2px;
left: 0;
top: 2px;
width: 100%;
}
.scrollbar-layout-face-vertical {
left: 0;
right: 0;
top: 0;
}
.scrollbar-layout-face-vertical:after {
height: 100%;
left: 2px;
right: 2px;
top: 0;
}
/**
* scrollbars.
*/
/* Touching the scroll-track directly makes the scroll-track bolder */
.public-scrollbar-face:after {
background-color: rgba(102, 102, 102, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d666666,endColorstr=#4d666666);
}
.bi-theme-dark .public-scrollbar-face:after {
background-color: rgba(204, 204, 204, 0.3);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4dcccccc,endColorstr=#4dcccccc);
}
.public-scrollbar-main:hover .public-scrollbar-face:after,
.public-scrollbar-main-active .public-scrollbar-face:after,
.public-scrollbar-face-active:after {
background-color: rgba(102, 102, 102, 0.7);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3666666,endColorstr=#b3666666);
}
.bi-theme-dark .public-scrollbar-main:hover .public-scrollbar-face:after,
.bi-theme-dark .public-scrollbar-main-active .public-scrollbar-face:after,
.bi-theme-dark .public-scrollbar-face-active:after {
background-color: rgba(204, 204, 204, 0.7);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b3cccccc,endColorstr=#b3cccccc);
}
.horizontal-scrollbar {
bottom: 0;
position: absolute;
}
.bi-table > .first-col { .bi-table > .first-col {
border-left: none; border-left: none;
} }
@ -76,3 +242,33 @@
border-top: 1px solid #525466; border-top: 1px solid #525466;
border-left: 1px solid #525466; border-left: 1px solid #525466;
} }
.bi-resizable-table-cell .resizable-table-cell-resizer-container {
cursor: ew-resize;
z-index: 1;
}
.bi-resizable-table-cell .resizable-table-cell-resizer-container:hover .resizable-table-cell-resizer-knob,
.bi-resizable-table-cell .resizable-table-cell-resizer-container.dragging .resizable-table-cell-resizer-knob {
background-color: #3f8ce8;
}
.bi-resizable-table-cell .resizable-table-cell-resizer-container.suitable .resizable-table-cell-resizer-knob {
background-color: #58cc7d;
}
.bi-resizable-table .resizable-table-resizer {
cursor: ew-resize;
z-index: 1;
background-color: #3f8ce8;
}
.bi-resizable-table .resizable-table-resizer.suitable {
background-color: #58cc7d;
}
.bi-resizable-table .resizable-table-region-resizer {
cursor: ew-resize;
z-index: 1;
}
.bi-resizable-table .resizable-table-region-resizer:hover .resizable-table-region-resizer-knob,
.bi-resizable-table .resizable-table-region-resizer.dragging .resizable-table-region-resizer-knob {
background-color: #3f8ce8;
}

14
src/css/base/trigger/trigger.css

@ -1,3 +1,17 @@
.bi-trigger .bi-trigger-icon-button { .bi-trigger .bi-trigger-icon-button {
font-size: 16px; font-size: 16px;
} }
.bi-select-text-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-small-select-text-trigger {
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}

0
src/css/base/view/popover.css

2
src/css/core/utils/common.css

@ -57,7 +57,7 @@ textarea {
color: #3d4d66; color: #3d4d66;
} }
.bi-theme-dark .bi-background { .bi-theme-dark .bi-background {
background-color: #191b2b; background-color: #191B2B;
color: #cccccc; color: #cccccc;
} }
.bi-theme-dark .bi-background .bi-input { .bi-theme-dark .bi-background .bi-input {

1
src/css/resource/font.css

@ -2,7 +2,6 @@
font-family: 'bi'; font-family: 'bi';
src: url('font/iconfont.eot'); src: url('font/iconfont.eot');
src: url('font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('font/iconfont.woff') format('woff'), /* chrome、firefox */ url('font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('font/iconfont.svg#svgFontName') format('svg'); src: url('font/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('font/iconfont.woff') format('woff'), /* chrome、firefox */ url('font/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ url('font/iconfont.svg#svgFontName') format('svg');
/* iOS 4.1- */ /* iOS 4.1- */
} }
.b-font { .b-font {

2
src/css/theme/dark.css

@ -1,5 +1,5 @@
.bi-theme-dark { .bi-theme-dark {
background-color: #191b2b; background-color: #191B2B;
color: #cccccc; color: #cccccc;
} }
.bi-theme-dark .bi-input { .bi-theme-dark .bi-input {

5
src/css/widget/exceltable/exceltable.css

@ -1,3 +1,8 @@
.bi-excel-table-header-cell {
font-weight: bold;
}
.bi-excel-table > div.bottom-right > div > div > table { .bi-excel-table > div.bottom-right > div > div > table {
border-right: 1px solid #d4dadd; border-right: 1px solid #d4dadd;
} }

13
src/css/widget/previewtable/previewtable.css

@ -1,3 +1,14 @@
.bi-preview-table-cell {
min-height: 25px;
min-width: 80px;
}
.bi-preview-table-header-cell {
font-weight: bold;
min-height: 25px;
min-width: 80px;
}
.bi-preview-table { .bi-preview-table {
-webkit-user-select: text; -webkit-user-select: text;
-khtml-user-select: text; -khtml-user-select: text;
@ -12,5 +23,5 @@
} }
.bi-theme-dark .bi-preview-table > div > table > thead > tr.odd, .bi-theme-dark .bi-preview-table > div > table > thead > tr.odd,
.bi-theme-dark .bi-preview-table > div > div > div > table > thead > tr.odd { .bi-theme-dark .bi-preview-table > div > div > div > table > thead > tr.odd {
background-color: #191b2b; background-color: #191B2B;
} }

2
src/less/base/view/floatboxview.less → src/less/base/view/popover.less

@ -1,4 +1,4 @@
@import "../../index"; @import "../../index";
.bi-float-box { .bi-popover {
} }
Loading…
Cancel
Save