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