Browse Source

Merge pull request #271 in FUI/fineui from ~WINDY/fui:master to master

* commit 'dd97569034355fb740c345b4fb9a928e066a64ac':
  bubble还原
es6
guy 7 years ago
parent
commit
b486f351e6
  1. 5
      dist/base.css
  2. 5
      dist/bundle.css
  3. 28
      dist/bundle.js
  4. 2
      dist/bundle.min.css
  5. 92
      dist/bundle.min.js
  6. 28
      dist/core.js
  7. 5
      dist/fineui.css
  8. 28
      dist/fineui.js
  9. 2
      dist/fineui.min.css
  10. 96
      dist/fineui.min.js
  11. 28
      src/core/controller/controller.bubbles.js
  12. 5
      src/css/base/single/tip/tip.css
  13. 2
      src/less/base/single/tip/tip.less
  14. 1
      src/less/base/single/tip/tip.toast.less
  15. 1
      src/less/base/single/tip/tip.tooltip.less

5
dist/base.css vendored

@ -1552,9 +1552,11 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
color: #faaa39; color: #faaa39;
} }
.bi-tip {
position: fixed !important;
}
.bi-toast { .bi-toast {
position: fixed !important;
font-size: 14px; font-size: 14px;
color: #ffffff; color: #ffffff;
max-width: 400px; max-width: 400px;
@ -1580,7 +1582,6 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
} }
.bi-tooltip { .bi-tooltip {
position: fixed !important;
max-width: 250px; max-width: 250px;
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;

5
dist/bundle.css vendored

@ -3599,9 +3599,11 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
color: #faaa39; color: #faaa39;
} }
.bi-tip {
position: fixed !important;
}
.bi-toast { .bi-toast {
position: fixed !important;
font-size: 14px; font-size: 14px;
color: #ffffff; color: #ffffff;
max-width: 400px; max-width: 400px;
@ -3627,7 +3629,6 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
} }
.bi-tooltip { .bi-tooltip {
position: fixed !important;
max-width: 250px; max-width: 250px;
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;

28
dist/bundle.js vendored

@ -26164,8 +26164,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () { _init: function () {
BI.BubblesController.superclass._init.apply(this, arguments); BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.bubblesManager = {}; this.bubblesManager = {};
this.storeBubbles = {}; this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
});
}, },
_createBubble: function (direct, text, level, height) { _createBubble: function (direct, text, level, height) {
@ -26181,60 +26189,60 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_getOffsetLeft: function (name, context, offsetStyle) { _getOffsetLeft: function (name, context, offsetStyle) {
var left = 0; var left = 0;
if ("center" === offsetStyle) { if ("center" === offsetStyle) {
left = (context.element.bounds().width - this.get(name).element.bounds().width) / 2; left = context.element.offset().left + (context.element.bounds().width - this.get(name).element.bounds().width) / 2;
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return left; return left;
} }
if ("right" === offsetStyle) { if ("right" === offsetStyle) {
left = context.element.bounds().width - this.get(name).element.bounds().width; left = context.element.offset().left + context.element.bounds().width - this.get(name).element.bounds().width;
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return left; return left;
} }
return left; return context.element.offset().left;
}, },
_getOffsetTop: function (name, context, offsetStyle) { _getOffsetTop: function (name, context, offsetStyle) {
var top = 0; var top = 0;
if ("center" === offsetStyle) { if ("center" === offsetStyle) {
top = (context.element.bounds().height - this.get(name).element.bounds().height) / 2; top = context.element.offset().top + (context.element.bounds().height - this.get(name).element.bounds().height) / 2;
if (top < 0) { if (top < 0) {
top = 0; top = 0;
} }
return top; return top;
} else if ("right" === offsetStyle) { } else if ("right" === offsetStyle) {
top = context.element.bounds().height - this.get(name).element.bounds().height; top = context.element.offset().top + context.element.bounds().height - this.get(name).element.bounds().height;
if (top < 0) { if (top < 0) {
top = 0; top = 0;
} }
return top; return top;
} }
return top; return context.element.offset().top;
}, },
_getLeftPosition: function (name, context, offsetStyle) { _getLeftPosition: function (name, context, offsetStyle) {
var position = {left: - this.get(name).element.bounds().width}; var position = $.getLeftPosition(context, this.get(name));
position.top = this._getOffsetTop(name, context, offsetStyle); position.top = this._getOffsetTop(name, context, offsetStyle);
return position; return position;
}, },
_getBottomPosition: function (name, context, offsetStyle) { _getBottomPosition: function (name, context, offsetStyle) {
var position = {top: context.element.bounds().height}; var position = $.getBottomPosition(context, this.get(name));
position.left = this._getOffsetLeft(name, context, offsetStyle); position.left = this._getOffsetLeft(name, context, offsetStyle);
return position; return position;
}, },
_getTopPosition: function (name, context, offsetStyle) { _getTopPosition: function (name, context, offsetStyle) {
var position = {top: -35}; var position = $.getTopPosition(context, this.get(name));
position.left = this._getOffsetLeft(name, context, offsetStyle); position.left = this._getOffsetLeft(name, context, offsetStyle);
return position; return position;
}, },
_getRightPosition: function (name, context, offsetStyle) { _getRightPosition: function (name, context, offsetStyle) {
var position = {left: context.element.bounds().width}; var position = $.getRightPosition(context, this.get(name));
position.top = this._getOffsetTop(name, context, offsetStyle); position.top = this._getOffsetTop(name, context, offsetStyle);
return position; return position;
}, },

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

92
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

28
dist/core.js vendored

@ -26164,8 +26164,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () { _init: function () {
BI.BubblesController.superclass._init.apply(this, arguments); BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.bubblesManager = {}; this.bubblesManager = {};
this.storeBubbles = {}; this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
});
}, },
_createBubble: function (direct, text, level, height) { _createBubble: function (direct, text, level, height) {
@ -26181,60 +26189,60 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_getOffsetLeft: function (name, context, offsetStyle) { _getOffsetLeft: function (name, context, offsetStyle) {
var left = 0; var left = 0;
if ("center" === offsetStyle) { if ("center" === offsetStyle) {
left = (context.element.bounds().width - this.get(name).element.bounds().width) / 2; left = context.element.offset().left + (context.element.bounds().width - this.get(name).element.bounds().width) / 2;
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return left; return left;
} }
if ("right" === offsetStyle) { if ("right" === offsetStyle) {
left = context.element.bounds().width - this.get(name).element.bounds().width; left = context.element.offset().left + context.element.bounds().width - this.get(name).element.bounds().width;
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return left; return left;
} }
return left; return context.element.offset().left;
}, },
_getOffsetTop: function (name, context, offsetStyle) { _getOffsetTop: function (name, context, offsetStyle) {
var top = 0; var top = 0;
if ("center" === offsetStyle) { if ("center" === offsetStyle) {
top = (context.element.bounds().height - this.get(name).element.bounds().height) / 2; top = context.element.offset().top + (context.element.bounds().height - this.get(name).element.bounds().height) / 2;
if (top < 0) { if (top < 0) {
top = 0; top = 0;
} }
return top; return top;
} else if ("right" === offsetStyle) { } else if ("right" === offsetStyle) {
top = context.element.bounds().height - this.get(name).element.bounds().height; top = context.element.offset().top + context.element.bounds().height - this.get(name).element.bounds().height;
if (top < 0) { if (top < 0) {
top = 0; top = 0;
} }
return top; return top;
} }
return top; return context.element.offset().top;
}, },
_getLeftPosition: function (name, context, offsetStyle) { _getLeftPosition: function (name, context, offsetStyle) {
var position = {left: - this.get(name).element.bounds().width}; var position = $.getLeftPosition(context, this.get(name));
position.top = this._getOffsetTop(name, context, offsetStyle); position.top = this._getOffsetTop(name, context, offsetStyle);
return position; return position;
}, },
_getBottomPosition: function (name, context, offsetStyle) { _getBottomPosition: function (name, context, offsetStyle) {
var position = {top: context.element.bounds().height}; var position = $.getBottomPosition(context, this.get(name));
position.left = this._getOffsetLeft(name, context, offsetStyle); position.left = this._getOffsetLeft(name, context, offsetStyle);
return position; return position;
}, },
_getTopPosition: function (name, context, offsetStyle) { _getTopPosition: function (name, context, offsetStyle) {
var position = {top: -35}; var position = $.getTopPosition(context, this.get(name));
position.left = this._getOffsetLeft(name, context, offsetStyle); position.left = this._getOffsetLeft(name, context, offsetStyle);
return position; return position;
}, },
_getRightPosition: function (name, context, offsetStyle) { _getRightPosition: function (name, context, offsetStyle) {
var position = {left: context.element.bounds().width}; var position = $.getRightPosition(context, this.get(name));
position.top = this._getOffsetTop(name, context, offsetStyle); position.top = this._getOffsetTop(name, context, offsetStyle);
return position; return position;
}, },

5
dist/fineui.css vendored

@ -3599,9 +3599,11 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
color: #faaa39; color: #faaa39;
} }
.bi-tip {
position: fixed !important;
}
.bi-toast { .bi-toast {
position: fixed !important;
font-size: 14px; font-size: 14px;
color: #ffffff; color: #ffffff;
max-width: 400px; max-width: 400px;
@ -3627,7 +3629,6 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
} }
.bi-tooltip { .bi-tooltip {
position: fixed !important;
max-width: 250px; max-width: 250px;
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;

28
dist/fineui.js vendored

@ -26407,8 +26407,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () { _init: function () {
BI.BubblesController.superclass._init.apply(this, arguments); BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.bubblesManager = {}; this.bubblesManager = {};
this.storeBubbles = {}; this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
});
}, },
_createBubble: function (direct, text, level, height) { _createBubble: function (direct, text, level, height) {
@ -26424,60 +26432,60 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_getOffsetLeft: function (name, context, offsetStyle) { _getOffsetLeft: function (name, context, offsetStyle) {
var left = 0; var left = 0;
if ("center" === offsetStyle) { if ("center" === offsetStyle) {
left = (context.element.bounds().width - this.get(name).element.bounds().width) / 2; left = context.element.offset().left + (context.element.bounds().width - this.get(name).element.bounds().width) / 2;
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return left; return left;
} }
if ("right" === offsetStyle) { if ("right" === offsetStyle) {
left = context.element.bounds().width - this.get(name).element.bounds().width; left = context.element.offset().left + context.element.bounds().width - this.get(name).element.bounds().width;
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return left; return left;
} }
return left; return context.element.offset().left;
}, },
_getOffsetTop: function (name, context, offsetStyle) { _getOffsetTop: function (name, context, offsetStyle) {
var top = 0; var top = 0;
if ("center" === offsetStyle) { if ("center" === offsetStyle) {
top = (context.element.bounds().height - this.get(name).element.bounds().height) / 2; top = context.element.offset().top + (context.element.bounds().height - this.get(name).element.bounds().height) / 2;
if (top < 0) { if (top < 0) {
top = 0; top = 0;
} }
return top; return top;
} else if ("right" === offsetStyle) { } else if ("right" === offsetStyle) {
top = context.element.bounds().height - this.get(name).element.bounds().height; top = context.element.offset().top + context.element.bounds().height - this.get(name).element.bounds().height;
if (top < 0) { if (top < 0) {
top = 0; top = 0;
} }
return top; return top;
} }
return top; return context.element.offset().top;
}, },
_getLeftPosition: function (name, context, offsetStyle) { _getLeftPosition: function (name, context, offsetStyle) {
var position = {left: - this.get(name).element.bounds().width}; var position = $.getLeftPosition(context, this.get(name));
position.top = this._getOffsetTop(name, context, offsetStyle); position.top = this._getOffsetTop(name, context, offsetStyle);
return position; return position;
}, },
_getBottomPosition: function (name, context, offsetStyle) { _getBottomPosition: function (name, context, offsetStyle) {
var position = {top: context.element.bounds().height}; var position = $.getBottomPosition(context, this.get(name));
position.left = this._getOffsetLeft(name, context, offsetStyle); position.left = this._getOffsetLeft(name, context, offsetStyle);
return position; return position;
}, },
_getTopPosition: function (name, context, offsetStyle) { _getTopPosition: function (name, context, offsetStyle) {
var position = {top: -35}; var position = $.getTopPosition(context, this.get(name));
position.left = this._getOffsetLeft(name, context, offsetStyle); position.left = this._getOffsetLeft(name, context, offsetStyle);
return position; return position;
}, },
_getRightPosition: function (name, context, offsetStyle) { _getRightPosition: function (name, context, offsetStyle) {
var position = {left: context.element.bounds().width}; var position = $.getRightPosition(context, this.get(name));
position.top = this._getOffsetTop(name, context, offsetStyle); position.top = this._getOffsetTop(name, context, offsetStyle);
return position; return position;
}, },

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

96
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

28
src/core/controller/controller.bubbles.js

@ -16,8 +16,16 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_init: function () { _init: function () {
BI.BubblesController.superclass._init.apply(this, arguments); BI.BubblesController.superclass._init.apply(this, arguments);
var self = this;
this.bubblesManager = {}; this.bubblesManager = {};
this.storeBubbles = {}; this.storeBubbles = {};
BI.Resizers.add("bubbleController" + BI.uniqueId(), function () {
BI.each(self.bubblesManager, function (name) {
self.remove(name);
});
self.bubblesManager = {};
self.storeBubbles = {};
});
}, },
_createBubble: function (direct, text, level, height) { _createBubble: function (direct, text, level, height) {
@ -33,60 +41,60 @@ BI.BubblesController = BI.inherit(BI.Controller, {
_getOffsetLeft: function (name, context, offsetStyle) { _getOffsetLeft: function (name, context, offsetStyle) {
var left = 0; var left = 0;
if ("center" === offsetStyle) { if ("center" === offsetStyle) {
left = (context.element.bounds().width - this.get(name).element.bounds().width) / 2; left = context.element.offset().left + (context.element.bounds().width - this.get(name).element.bounds().width) / 2;
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return left; return left;
} }
if ("right" === offsetStyle) { if ("right" === offsetStyle) {
left = context.element.bounds().width - this.get(name).element.bounds().width; left = context.element.offset().left + context.element.bounds().width - this.get(name).element.bounds().width;
if (left < 0) { if (left < 0) {
left = 0; left = 0;
} }
return left; return left;
} }
return left; return context.element.offset().left;
}, },
_getOffsetTop: function (name, context, offsetStyle) { _getOffsetTop: function (name, context, offsetStyle) {
var top = 0; var top = 0;
if ("center" === offsetStyle) { if ("center" === offsetStyle) {
top = (context.element.bounds().height - this.get(name).element.bounds().height) / 2; top = context.element.offset().top + (context.element.bounds().height - this.get(name).element.bounds().height) / 2;
if (top < 0) { if (top < 0) {
top = 0; top = 0;
} }
return top; return top;
} else if ("right" === offsetStyle) { } else if ("right" === offsetStyle) {
top = context.element.bounds().height - this.get(name).element.bounds().height; top = context.element.offset().top + context.element.bounds().height - this.get(name).element.bounds().height;
if (top < 0) { if (top < 0) {
top = 0; top = 0;
} }
return top; return top;
} }
return top; return context.element.offset().top;
}, },
_getLeftPosition: function (name, context, offsetStyle) { _getLeftPosition: function (name, context, offsetStyle) {
var position = {left: - this.get(name).element.bounds().width}; var position = $.getLeftPosition(context, this.get(name));
position.top = this._getOffsetTop(name, context, offsetStyle); position.top = this._getOffsetTop(name, context, offsetStyle);
return position; return position;
}, },
_getBottomPosition: function (name, context, offsetStyle) { _getBottomPosition: function (name, context, offsetStyle) {
var position = {top: context.element.bounds().height}; var position = $.getBottomPosition(context, this.get(name));
position.left = this._getOffsetLeft(name, context, offsetStyle); position.left = this._getOffsetLeft(name, context, offsetStyle);
return position; return position;
}, },
_getTopPosition: function (name, context, offsetStyle) { _getTopPosition: function (name, context, offsetStyle) {
var position = {top: -35}; var position = $.getTopPosition(context, this.get(name));
position.left = this._getOffsetLeft(name, context, offsetStyle); position.left = this._getOffsetLeft(name, context, offsetStyle);
return position; return position;
}, },
_getRightPosition: function (name, context, offsetStyle) { _getRightPosition: function (name, context, offsetStyle) {
var position = {left: context.element.bounds().width}; var position = $.getRightPosition(context, this.get(name));
position.top = this._getOffsetTop(name, context, offsetStyle); position.top = this._getOffsetTop(name, context, offsetStyle);
return position; return position;
}, },

5
src/css/base/single/tip/tip.css

@ -23,9 +23,11 @@
color: #faaa39; color: #faaa39;
} }
.bi-tip {
position: fixed !important;
}
.bi-toast { .bi-toast {
position: fixed !important;
font-size: 14px; font-size: 14px;
color: #ffffff; color: #ffffff;
max-width: 400px; max-width: 400px;
@ -51,7 +53,6 @@
} }
.bi-tooltip { .bi-tooltip {
position: fixed !important;
max-width: 250px; max-width: 250px;
-webkit-border-radius: 2px; -webkit-border-radius: 2px;
-moz-border-radius: 2px; -moz-border-radius: 2px;

2
src/less/base/single/tip/tip.less

@ -2,5 +2,5 @@
.bi-tip{ .bi-tip{
position: fixed !important;
} }

1
src/less/base/single/tip/tip.toast.less

@ -1,7 +1,6 @@
@import "../../../index"; @import "../../../index";
.bi-toast{ .bi-toast{
position: fixed !important;
font-size: @font-size-14; font-size: @font-size-14;
color: @color-bi-text; color: @color-bi-text;
max-width: 400px; max-width: 400px;

1
src/less/base/single/tip/tip.tooltip.less

@ -1,7 +1,6 @@
@import "../../../index"; @import "../../../index";
.bi-tooltip{ .bi-tooltip{
position: fixed !important;
max-width: 250px; max-width: 250px;
.border-radius(2px); .border-radius(2px);
font-size: 12px; font-size: 12px;

Loading…
Cancel
Save