|
|
@ -7,8 +7,11 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.Toast = BI.inherit(BI.Tip, { |
|
|
|
BI.Toast = BI.inherit(BI.Tip, { |
|
|
|
_const: { |
|
|
|
_const: { |
|
|
|
minWidth: 200, |
|
|
|
closableMinWidth: 146, |
|
|
|
hgap: 10 |
|
|
|
minWidth: 124, |
|
|
|
|
|
|
|
closableMaxWidth: 410, |
|
|
|
|
|
|
|
maxWidth: 400, |
|
|
|
|
|
|
|
hgap: 8 |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
@ -22,9 +25,10 @@ BI.Toast = BI.inherit(BI.Tip, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options, c = this._const; |
|
|
|
this.element.css({ |
|
|
|
this.element.css({ |
|
|
|
minWidth: this._const.minWidth / BI.pixRatio + BI.pixUnit |
|
|
|
minWidth: (o.closable ? c.closableMinWidth : c.minWidth) / BI.pixRatio + BI.pixUnit, |
|
|
|
|
|
|
|
maxWidth: (o.closable ? c.closableMaxWidth : c.maxWidth) / BI.pixRatio + BI.pixUnit |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.element.addClass("toast-" + o.level); |
|
|
|
this.element.addClass("toast-" + o.level); |
|
|
|
var fn = function (e) { |
|
|
|
var fn = function (e) { |
|
|
@ -93,10 +97,9 @@ BI.Toast = BI.inherit(BI.Tip, { |
|
|
|
this.text = BI.createWidget({ |
|
|
|
this.text = BI.createWidget({ |
|
|
|
type: "bi.horizontal", |
|
|
|
type: "bi.horizontal", |
|
|
|
horizontalAlign: BI.HorizontalAlign.Stretch, |
|
|
|
horizontalAlign: BI.HorizontalAlign.Stretch, |
|
|
|
verticalAlign: BI.VerticalAlign.Middle, |
|
|
|
|
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
items: items, |
|
|
|
items: items, |
|
|
|
vgap: 7, |
|
|
|
vgap: 12, |
|
|
|
columnSize: columnSize |
|
|
|
columnSize: columnSize |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|