Browse Source

Merge pull request #794 in VISUAL/fineui from ~FRANK.QIU/fineui:master to master

* commit '156ac98583638fc7e2550ff279500bc2632e7fed':
  toast一个个往下堆叠
  简单颜色选择器的事件应该相同
  简单颜色选择器的宽高
es6
Frank.Qiu 6 years ago
parent
commit
8824548d09
  1. 8
      dist/base.css
  2. 32
      dist/base.js
  3. 8
      dist/bundle.css
  4. 36
      dist/bundle.ie.js
  5. 36
      dist/bundle.js
  6. 4
      dist/case.js
  7. 1
      dist/demo.js
  8. 8
      dist/fineui.css
  9. 36
      dist/fineui.ie.js
  10. 36
      dist/fineui.js
  11. 32
      dist/fineui_without_jquery_polyfill.js
  12. 26
      src/base/foundation/message.js
  13. 6
      src/base/single/tip/tip.toast.js
  14. 2
      src/case/colorchooser/colorchooser.simple.js
  15. 2
      src/case/colorchooser/colorpicker/editor.colorpicker.simple.js
  16. 8
      src/css/base/foundation/bi.css
  17. 2
      src/less/base/foundation/bi.message.less

8
dist/base.css vendored

@ -615,10 +615,10 @@
font-size: 16px;
}
.bi-message-animate {
-webkit-transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
-moz-transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
-o-transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
-webkit-transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
-moz-transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
-o-transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
}
.bi-message-enter {
opacity: 1;

32
dist/base.js vendored

@ -5176,6 +5176,8 @@ BI.Msg = function () {
var messageShow, $mask, $pop;
var toastStack = [];
return {
alert: function (title, message, callback) {
this._show(false, title, message, callback);
@ -5196,7 +5198,22 @@ BI.Msg = function () {
cls: "bi-message-animate bi-message-leave",
level: level,
autoClose: autoClose,
text: message
text: message,
listeners: [{
eventName: BI.Toast.EVENT_DESTORY,
action: function () {
BI.remove(toastStack, toast.element);
var _height = 10;
BI.each(toastStack, function (i, element) {
element.css({"top": _height});
_height += element.outerHeight() + 10;
});
}
}]
});
var height = 10;
BI.each(toastStack, function (i, element) {
height += element.outerHeight() + 10;
});
BI.createWidget({
type: "bi.absolute",
@ -5204,17 +5221,16 @@ BI.Msg = function () {
items: [{
el: toast,
left: "50%",
top: 10
top: height
}]
});
toastStack.push(toast.element);
toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2});
toast.element.removeClass("bi-message-leave").addClass("bi-message-enter");
autoClose && BI.delay(function () {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
BI.delay(function () {
toast.destroy();
}, 1000);
toast.destroy();
}, 5000);
},
_show: function (hasCancel, title, message, callback) {
@ -11502,9 +11518,13 @@ BI.Toast = BI.inherit(BI.Tip, {
setText: function (text) {
this.text.setText(text);
},
beforeDestroy: function () {
this.fireEvent(BI.Toast.EVENT_DESTORY);
}
});
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/**
* toast提示
*

8
dist/bundle.css vendored

@ -2587,10 +2587,10 @@ textarea {
font-size: 16px;
}
.bi-message-animate {
-webkit-transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
-moz-transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
-o-transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
-webkit-transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
-moz-transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
-o-transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
}
.bi-message-enter {
opacity: 1;

36
dist/bundle.ie.js vendored

@ -40262,6 +40262,8 @@ BI.Msg = function () {
var messageShow, $mask, $pop;
var toastStack = [];
return {
alert: function (title, message, callback) {
this._show(false, title, message, callback);
@ -40282,7 +40284,22 @@ BI.Msg = function () {
cls: "bi-message-animate bi-message-leave",
level: level,
autoClose: autoClose,
text: message
text: message,
listeners: [{
eventName: BI.Toast.EVENT_DESTORY,
action: function () {
BI.remove(toastStack, toast.element);
var _height = 10;
BI.each(toastStack, function (i, element) {
element.css({"top": _height});
_height += element.outerHeight() + 10;
});
}
}]
});
var height = 10;
BI.each(toastStack, function (i, element) {
height += element.outerHeight() + 10;
});
BI.createWidget({
type: "bi.absolute",
@ -40290,17 +40307,16 @@ BI.Msg = function () {
items: [{
el: toast,
left: "50%",
top: 10
top: height
}]
});
toastStack.push(toast.element);
toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2});
toast.element.removeClass("bi-message-leave").addClass("bi-message-enter");
autoClose && BI.delay(function () {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
BI.delay(function () {
toast.destroy();
}, 1000);
toast.destroy();
}, 5000);
},
_show: function (hasCancel, title, message, callback) {
@ -46588,9 +46604,13 @@ BI.Toast = BI.inherit(BI.Tip, {
setText: function (text) {
this.text.setText(text);
},
beforeDestroy: function () {
this.fireEvent(BI.Toast.EVENT_DESTORY);
}
});
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/**
* toast提示
*
@ -51803,6 +51823,8 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
value: o.value,
width: o.width,
height: o.height,
popup: {
type: "bi.simple_color_chooser_popup"
}
@ -52584,7 +52606,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
}));
}
});
BI.SimpleColorPickerEditor.EVENT_CHANGE = "SimpleColorPickerEditor.EVENT_CHANGE";
BI.SimpleColorPickerEditor.EVENT_CHANGE = "ColorPickerEditor.EVENT_CHANGE";
BI.shortcut("bi.simple_color_picker_editor", BI.SimpleColorPickerEditor);/**
* 选色控件
*

36
dist/bundle.js vendored

@ -40666,6 +40666,8 @@ BI.Msg = function () {
var messageShow, $mask, $pop;
var toastStack = [];
return {
alert: function (title, message, callback) {
this._show(false, title, message, callback);
@ -40686,7 +40688,22 @@ BI.Msg = function () {
cls: "bi-message-animate bi-message-leave",
level: level,
autoClose: autoClose,
text: message
text: message,
listeners: [{
eventName: BI.Toast.EVENT_DESTORY,
action: function () {
BI.remove(toastStack, toast.element);
var _height = 10;
BI.each(toastStack, function (i, element) {
element.css({"top": _height});
_height += element.outerHeight() + 10;
});
}
}]
});
var height = 10;
BI.each(toastStack, function (i, element) {
height += element.outerHeight() + 10;
});
BI.createWidget({
type: "bi.absolute",
@ -40694,17 +40711,16 @@ BI.Msg = function () {
items: [{
el: toast,
left: "50%",
top: 10
top: height
}]
});
toastStack.push(toast.element);
toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2});
toast.element.removeClass("bi-message-leave").addClass("bi-message-enter");
autoClose && BI.delay(function () {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
BI.delay(function () {
toast.destroy();
}, 1000);
toast.destroy();
}, 5000);
},
_show: function (hasCancel, title, message, callback) {
@ -46992,9 +47008,13 @@ BI.Toast = BI.inherit(BI.Tip, {
setText: function (text) {
this.text.setText(text);
},
beforeDestroy: function () {
this.fireEvent(BI.Toast.EVENT_DESTORY);
}
});
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/**
* toast提示
*
@ -52207,6 +52227,8 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
value: o.value,
width: o.width,
height: o.height,
popup: {
type: "bi.simple_color_chooser_popup"
}
@ -52988,7 +53010,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
}));
}
});
BI.SimpleColorPickerEditor.EVENT_CHANGE = "SimpleColorPickerEditor.EVENT_CHANGE";
BI.SimpleColorPickerEditor.EVENT_CHANGE = "ColorPickerEditor.EVENT_CHANGE";
BI.shortcut("bi.simple_color_picker_editor", BI.SimpleColorPickerEditor);/**
* 选色控件
*

4
dist/case.js vendored

@ -2611,6 +2611,8 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
value: o.value,
width: o.width,
height: o.height,
popup: {
type: "bi.simple_color_chooser_popup"
}
@ -3392,7 +3394,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
}));
}
});
BI.SimpleColorPickerEditor.EVENT_CHANGE = "SimpleColorPickerEditor.EVENT_CHANGE";
BI.SimpleColorPickerEditor.EVENT_CHANGE = "ColorPickerEditor.EVENT_CHANGE";
BI.shortcut("bi.simple_color_picker_editor", BI.SimpleColorPickerEditor);/**
* 选色控件
*

1
dist/demo.js vendored

@ -726,7 +726,6 @@ BI.shortcut("demo.editor", Demo.Editor);Demo.CodeEditor = BI.inherit(BI.Widget,
cls: "layout-bg1",
items: [{
type: "bi.multifile_editor",
accept: "*.zip;",
width: 400,
height: 300
}],

8
dist/fineui.css vendored

@ -2587,10 +2587,10 @@ textarea {
font-size: 16px;
}
.bi-message-animate {
-webkit-transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
-moz-transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
-o-transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
-webkit-transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
-moz-transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
-o-transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
}
.bi-message-enter {
opacity: 1;

36
dist/fineui.ie.js vendored

@ -40504,6 +40504,8 @@ BI.Msg = function () {
var messageShow, $mask, $pop;
var toastStack = [];
return {
alert: function (title, message, callback) {
this._show(false, title, message, callback);
@ -40524,7 +40526,22 @@ BI.Msg = function () {
cls: "bi-message-animate bi-message-leave",
level: level,
autoClose: autoClose,
text: message
text: message,
listeners: [{
eventName: BI.Toast.EVENT_DESTORY,
action: function () {
BI.remove(toastStack, toast.element);
var _height = 10;
BI.each(toastStack, function (i, element) {
element.css({"top": _height});
_height += element.outerHeight() + 10;
});
}
}]
});
var height = 10;
BI.each(toastStack, function (i, element) {
height += element.outerHeight() + 10;
});
BI.createWidget({
type: "bi.absolute",
@ -40532,17 +40549,16 @@ BI.Msg = function () {
items: [{
el: toast,
left: "50%",
top: 10
top: height
}]
});
toastStack.push(toast.element);
toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2});
toast.element.removeClass("bi-message-leave").addClass("bi-message-enter");
autoClose && BI.delay(function () {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
BI.delay(function () {
toast.destroy();
}, 1000);
toast.destroy();
}, 5000);
},
_show: function (hasCancel, title, message, callback) {
@ -46830,9 +46846,13 @@ BI.Toast = BI.inherit(BI.Tip, {
setText: function (text) {
this.text.setText(text);
},
beforeDestroy: function () {
this.fireEvent(BI.Toast.EVENT_DESTORY);
}
});
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/**
* toast提示
*
@ -52045,6 +52065,8 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
value: o.value,
width: o.width,
height: o.height,
popup: {
type: "bi.simple_color_chooser_popup"
}
@ -52826,7 +52848,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
}));
}
});
BI.SimpleColorPickerEditor.EVENT_CHANGE = "SimpleColorPickerEditor.EVENT_CHANGE";
BI.SimpleColorPickerEditor.EVENT_CHANGE = "ColorPickerEditor.EVENT_CHANGE";
BI.shortcut("bi.simple_color_picker_editor", BI.SimpleColorPickerEditor);/**
* 选色控件
*

36
dist/fineui.js vendored

@ -40908,6 +40908,8 @@ BI.Msg = function () {
var messageShow, $mask, $pop;
var toastStack = [];
return {
alert: function (title, message, callback) {
this._show(false, title, message, callback);
@ -40928,7 +40930,22 @@ BI.Msg = function () {
cls: "bi-message-animate bi-message-leave",
level: level,
autoClose: autoClose,
text: message
text: message,
listeners: [{
eventName: BI.Toast.EVENT_DESTORY,
action: function () {
BI.remove(toastStack, toast.element);
var _height = 10;
BI.each(toastStack, function (i, element) {
element.css({"top": _height});
_height += element.outerHeight() + 10;
});
}
}]
});
var height = 10;
BI.each(toastStack, function (i, element) {
height += element.outerHeight() + 10;
});
BI.createWidget({
type: "bi.absolute",
@ -40936,17 +40953,16 @@ BI.Msg = function () {
items: [{
el: toast,
left: "50%",
top: 10
top: height
}]
});
toastStack.push(toast.element);
toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2});
toast.element.removeClass("bi-message-leave").addClass("bi-message-enter");
autoClose && BI.delay(function () {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
BI.delay(function () {
toast.destroy();
}, 1000);
toast.destroy();
}, 5000);
},
_show: function (hasCancel, title, message, callback) {
@ -47234,9 +47250,13 @@ BI.Toast = BI.inherit(BI.Tip, {
setText: function (text) {
this.text.setText(text);
},
beforeDestroy: function () {
this.fireEvent(BI.Toast.EVENT_DESTORY);
}
});
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/**
* toast提示
*
@ -52449,6 +52469,8 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
value: o.value,
width: o.width,
height: o.height,
popup: {
type: "bi.simple_color_chooser_popup"
}
@ -53230,7 +53252,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
}));
}
});
BI.SimpleColorPickerEditor.EVENT_CHANGE = "SimpleColorPickerEditor.EVENT_CHANGE";
BI.SimpleColorPickerEditor.EVENT_CHANGE = "ColorPickerEditor.EVENT_CHANGE";
BI.shortcut("bi.simple_color_picker_editor", BI.SimpleColorPickerEditor);/**
* 选色控件
*

32
dist/fineui_without_jquery_polyfill.js vendored

@ -28517,6 +28517,8 @@ BI.Msg = function () {
var messageShow, $mask, $pop;
var toastStack = [];
return {
alert: function (title, message, callback) {
this._show(false, title, message, callback);
@ -28537,7 +28539,22 @@ BI.Msg = function () {
cls: "bi-message-animate bi-message-leave",
level: level,
autoClose: autoClose,
text: message
text: message,
listeners: [{
eventName: BI.Toast.EVENT_DESTORY,
action: function () {
BI.remove(toastStack, toast.element);
var _height = 10;
BI.each(toastStack, function (i, element) {
element.css({"top": _height});
_height += element.outerHeight() + 10;
});
}
}]
});
var height = 10;
BI.each(toastStack, function (i, element) {
height += element.outerHeight() + 10;
});
BI.createWidget({
type: "bi.absolute",
@ -28545,17 +28562,16 @@ BI.Msg = function () {
items: [{
el: toast,
left: "50%",
top: 10
top: height
}]
});
toastStack.push(toast.element);
toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2});
toast.element.removeClass("bi-message-leave").addClass("bi-message-enter");
autoClose && BI.delay(function () {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
BI.delay(function () {
toast.destroy();
}, 1000);
toast.destroy();
}, 5000);
},
_show: function (hasCancel, title, message, callback) {
@ -34222,9 +34238,13 @@ BI.Toast = BI.inherit(BI.Tip, {
setText: function (text) {
this.text.setText(text);
},
beforeDestroy: function () {
this.fireEvent(BI.Toast.EVENT_DESTORY);
}
});
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/**
* toast提示
*

26
src/base/foundation/message.js

@ -7,6 +7,8 @@ BI.Msg = function () {
var messageShow, $mask, $pop;
var toastStack = [];
return {
alert: function (title, message, callback) {
this._show(false, title, message, callback);
@ -27,7 +29,22 @@ BI.Msg = function () {
cls: "bi-message-animate bi-message-leave",
level: level,
autoClose: autoClose,
text: message
text: message,
listeners: [{
eventName: BI.Toast.EVENT_DESTORY,
action: function () {
BI.remove(toastStack, toast.element);
var _height = 10;
BI.each(toastStack, function (i, element) {
element.css({"top": _height});
_height += element.outerHeight() + 10;
});
}
}]
});
var height = 10;
BI.each(toastStack, function (i, element) {
height += element.outerHeight() + 10;
});
BI.createWidget({
type: "bi.absolute",
@ -35,17 +52,16 @@ BI.Msg = function () {
items: [{
el: toast,
left: "50%",
top: 10
top: height
}]
});
toastStack.push(toast.element);
toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2});
toast.element.removeClass("bi-message-leave").addClass("bi-message-enter");
autoClose && BI.delay(function () {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
BI.delay(function () {
toast.destroy();
}, 1000);
toast.destroy();
}, 5000);
},
_show: function (hasCancel, title, message, callback) {

6
src/base/single/tip/tip.toast.js

@ -88,7 +88,11 @@ BI.Toast = BI.inherit(BI.Tip, {
setText: function (text) {
this.text.setText(text);
},
beforeDestroy: function () {
this.fireEvent(BI.Toast.EVENT_DESTORY);
}
});
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);

2
src/case/colorchooser/colorchooser.simple.js

@ -23,6 +23,8 @@ BI.SimpleColorChooser = BI.inherit(BI.Widget, {
element: this,
container: o.container,
value: o.value,
width: o.width,
height: o.height,
popup: {
type: "bi.simple_color_chooser_popup"
}

2
src/case/colorchooser/colorpicker/editor.colorpicker.simple.js

@ -102,5 +102,5 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {
}));
}
});
BI.SimpleColorPickerEditor.EVENT_CHANGE = "SimpleColorPickerEditor.EVENT_CHANGE";
BI.SimpleColorPickerEditor.EVENT_CHANGE = "ColorPickerEditor.EVENT_CHANGE";
BI.shortcut("bi.simple_color_picker_editor", BI.SimpleColorPickerEditor);

8
src/css/base/foundation/bi.css

@ -18,10 +18,10 @@
font-size: 16px;
}
.bi-message-animate {
-webkit-transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
-moz-transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
-o-transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
transition: opacity 0.3s, transform 0.4s, -webkit-transform 0.4s;
-webkit-transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
-moz-transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
-o-transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
transition: opacity 0.3s, transform 0.3s, left 0.3s, right 0.3s, top 0.4s, bottom 0.3s;
}
.bi-message-enter {
opacity: 1;

2
src/less/base/foundation/bi.message.less

@ -19,7 +19,7 @@
}
.bi-message-animate {
@val: opacity .3s, transform .4s, -webkit-transform .4s;
@val: opacity .3s,transform .3s,left .3s,right .3s,top .4s,bottom .3s;;
.transition(@val);
}

Loading…
Cancel
Save