Greetings,
I'm noob in JS and Ext. My first js 'hello world' was yesterday...
Well. The idea was to ask user if he really want to close window. The result is:
Code:
function confirm_close()
{Ext.Msg.confirm('Ужас','Ты действительно меня бросаешь?',
function(answer){
if (answer == 'yes'){
ras4window.destroy();
}
}
);
} function window_on_create(){
ras4window=Ext.create('Ext.window.Window', {title: 'Привет',
height: 200,
width: 400,
layout: 'fit',
listeners:{
beforeclose: function() {
confirm_close();
return false;
}
},
items: {
}
}).show();
Is there any better ways of doing this?
P.s. my english is bad. sorry.