Documente Academic
Documente Profesional
Documente Cultură
$(function () {
swal({
title: "Are you sure?",
text: "Your will not be able to recover this user
anymore!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, Delete Account",
cancelButtonText: "No, Cancel",
closeOnConfirm: false,
closeOnCancel: false },
function (isConfirm) {
if (isConfirm) {
$.post("https://vertical.loannotify.com/vertical/dtresponse/deleteuser",
{userid: id},function(data,status){
if(status == "success") {
//alert("Data: " + data +
"\nStatus: " + status);
swal("Deleted", "User Successfully
deleted", "success");
oTable.row('.selected').remove().draw(false);
}else {
alert("Error : Something went wrong
please try again.\nStatus : "+status);
}
});
} else {
swal("Cancelled", "Action cancelled", "error");
}
});
/* if (confirm("Do you really want to delete User's record?"))
{
} */
e.preventDefault();
});
$.post( "https://vertical.loannotify.com/vertical/dtresponse/edit_user",{userid: $
(this).attr('dt')}, function(data,status) {
if(status == "success") {
var dls = '<div id="dldata">' + data + '</div>';
$(dls).appendTo('body');
// $("#dldata").html(data);
// alert( "Load was performed." );
}
});
});
$(document).on("click",'#refresh', function() {
oTable.draw();
});
});
</script>