@ -10,12 +10,16 @@ BI.Msg = ((function () {
var toastStack = [ ] ;
var defaultConfig = {
buttonHeight : 24 ,
} ;
return {
alert : function ( title , message , callback ) {
this . _show ( false , title , message , callback ) ;
alert : function ( title , message , callback , config = defaultConfig ) {
this . _show ( false , title , message , callback , config ) ;
} ,
confirm : function ( title , message , callback ) {
this . _show ( true , title , message , callback ) ;
confirm : function ( title , message , callback , config = defaultConfig ) {
this . _show ( true , title , message , callback , config ) ;
} ,
prompt : function ( title , message , value , callback , min _width ) {
// BI.Msg.prompt(title, message, value, callback, min_width);
@ -74,7 +78,7 @@ BI.Msg = ((function () {
toast . destroy ? . ( ) ;
} ;
} ,
_show : function ( hasCancel , title , message , callback ) {
_show : function ( hasCancel , title , message , callback , config ) {
BI . isNull ( $mask ) && ( $mask = BI . Widget . _renderEngine . createElement ( "<div class=\"bi-z-index-mask\">" ) . css ( {
position : "absolute" ,
zIndex : BI . zIndex _tip - 2 ,
@ -105,8 +109,9 @@ BI.Msg = ((function () {
controlItems . push ( {
el : {
type : "bi.button" ,
height : config . buttonHeight ,
text : BI . i18nText ( "BI-Basic_Cancel" ) ,
level : "ignore" ,
light : true ,
handler : function ( ) {
close ( ) ;
if ( BI . isFunction ( callback ) ) {
@ -119,6 +124,7 @@ BI.Msg = ((function () {
controlItems . push ( {
el : {
type : "bi.button" ,
height : config . buttonHeight ,
text : BI . i18nText ( "BI-Basic_OK" ) ,
handler : function ( ) {
close ( ) ;