let progressBtn: ProgressButton = new ProgressButton({
content: "Progress",
enableProgress: true,
duration: 5000,
begin: (args: ProgressEventArgs) => {
progressBtn.content = "Progress " + args.currentDuration + " ms";
progressBtn.dataBind();
},
progress: (args: ProgressEventArgs) => {
progressBtn.content = "Progress " + args.currentDuration + " ms";
progressBtn.dataBind();
},
end: (args: ProgressEventArgs) => {
progressBtn.content = "Progress " + args.currentDuration + " ms";
progressBtn.dataBind();
},
cssClass: "e-hide-spinner"
});
progressBtn.appendTo("#progressbtn");
<button id='progressbtn'></button>
|
let isSuccess: boolean = false;
let progressBtn: ProgressButton = new ProgressButton({
content: "Progress",
enableProgress: true,
duration: 30000,
begin: (args: ProgressEventArgs) => {
progressBtn.content = "Progress " + args.percent + " %";
progressBtn.dataBind();
},
progress: (args: ProgressEventArgs) => {
progressBtn.content = "Progress " + args.percent + " %";
progressBtn.dataBind();
setTimeout(function() {
isSuccess = true; //Post action success
}, 20000);
if (isSuccess) {
args.percent = 99;
progressBtn.content = "Progress " + args.percent + " %";
progressBtn.dataBind();
// progressBtn.progressComplete();
}
},
end: (args: ProgressEventArgs) => {
progressBtn.content = "Progress " + args.percent + " %";
progressBtn.dataBind();
},
cssClass: "e-hide-spinner"
});
progressBtn.appendTo("#progressbtn");
|