EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: arma on October 15, 2013, 07:10:36 PM



Title: Messager Progress with Cancel Button
Post by: arma on October 15, 2013, 07:10:36 PM
Hi,

Is it possible to add cancel button below messager progress with callback, so i can do cancel action if a process takes long to finish ?


Title: Re: Messager Progress with Cancel Button
Post by: stworthy on October 15, 2013, 08:04:08 PM
Re-create the progress window with additional properties, the code below shows how to add a stop button on title bar.
Code:
var win = $.messager.progress({
title:'Please waiting',
msg:'Loading data...'
});
win.window({
tools:[{
iconCls:'icon-cancel',
handler:function(){
$.messager.progress('close');
//other code here
}
}]
});


Title: Re: Messager Progress with Cancel Button
Post by: arma on October 15, 2013, 08:06:51 PM
That's nice. Thanks