Javascript/Sencha
Sencha 팝업 호출
바리새인
2024. 9. 1. 15:14
var popupWindow = Ext.create('Ext.window.Window', {
title: 'Setting Window',
height: 500,
width: 500,
modal: true,
layout: 'fit',
items: [
{
xtype: 'form',
bodyPadding: 10,
items: [
{
xtype: 'textfield',
fieldLabel: 'ID',
name: 'id',
allowBlank: false,
readOnly: true
}
]
}
],
buttons: [
{
text: 'Submit',
handler: function() {
var form = popupWindow.down('form').getForm();
if(form.isValid()) {
Ext.Msg.alert('Submitted', 'Form has been submitted!')
};
}
},
{
text: 'Close',
handler: function() {
popupWindow.close();
}
}
]
});
popupWindow.show();