siddharth_application/assets/js/common.js
venbatechnologies@gmail.com 3650012dcb capital po updates done
2017-06-30 20:49:26 +05:30

38 lines
784 B
JavaScript
Executable File

/**
* @author Kishor Mali
*/
jQuery(document).ready(function(){
jQuery(document).on("click", ".deleteUser", function(){
var userId = $(this).data("userid"),
hitURL = baseURL + "deleteUser",
currentRow = $(this);
var confirmation = confirm("Are you sure to delete this user ?");
if(confirmation)
{
jQuery.ajax({
type : "POST",
dataType : "json",
url : hitURL,
data : { userId : userId }
}).done(function(data){
console.log(data);
currentRow.parents('tr').remove();
if(data.status = true) { alert("User successfully deleted"); }
else if(data.status = false) { alert("User deletion failed"); }
else { alert("Access denied..!"); }
});
}
});
jQuery(document).on("click", ".searchList", function(){
});
});