check click event for logout
This commit is contained in:
@@ -20,33 +20,33 @@ $(document).ready(function() {
|
||||
borderRadius: '0',
|
||||
railBorderRadius: '0'
|
||||
});
|
||||
|
||||
$('.delete').click(function(){
|
||||
var method = $(this).attr('data-method');
|
||||
var url = $(this).attr('data-ref');
|
||||
var html_text = $(this).siblings( "#delete_text" ).html();
|
||||
//var page = url.substring(url.lastIndexOf('/') + 1);
|
||||
swal({
|
||||
title: "Confirmation",
|
||||
text: html_text,
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
html: true
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
$.ajax({
|
||||
type: method,
|
||||
url: url ,
|
||||
success: function(data) {
|
||||
location.href = data.url;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
swal("Cancelled", "Your imaginary file is safe :)", "error");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// $('.delete').click(function(){
|
||||
// var method = $(this).attr('data-method');
|
||||
// var url = $(this).attr('data-ref');
|
||||
// var html_text = $(this).siblings( "#delete_text" ).html();
|
||||
// //var page = url.substring(url.lastIndexOf('/') + 1);
|
||||
// swal({
|
||||
// title: "Confirmation",
|
||||
// text: html_text,
|
||||
// type: "warning",
|
||||
// showCancelButton: true,
|
||||
// confirmButtonColor: "#DD6B55",
|
||||
// html: true
|
||||
// }, function (isConfirm) {
|
||||
// if (isConfirm) {
|
||||
// $.ajax({
|
||||
// type: method,
|
||||
// url: url ,
|
||||
// success: function(data) {
|
||||
// location.href = data.url;
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// swal("Cancelled", "Your imaginary file is safe :)", "error");
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
// for Notificaiotn message
|
||||
var placementFrom = $("#notify_message").attr('data-placement-from');
|
||||
|
||||
Reference in New Issue
Block a user