我使用 Ext.window.MeassageBox 作为确认对话框窗口。
代码是这样的:
deleteSomething: function( grid, row, col ) {
var ids = [ grid.store.getAt( row ).get( 'id' ) ];
function deleteSomething ( btn, text ) {
if( btn === 'yes' ) {
Ext.Ajax.request( {
url: 'data/deleteSomething.php',
params: {
'ids': Ext.encode( ids )
},
success: function( response ) {
//perform some actions
}
} );
}
}
Ext.MessageBox.show( {
animEl: 'elId',
buttons: Ext.MessageBox.YESNO,
fn: deleteSomething,
msg: Locale.gettext( 'Are you sure you want to remove the selected thing?' ),
title: Locale.gettext( 'Delete?' )
} );
}
我想为消息字段和比例应用一些 css 规则:'medium',右侧对齐按钮。有没有办法在不扩展 MessageBox 的情况下实现它?