update confirm box
This commit is contained in:
@@ -91,35 +91,24 @@ $('#cancel').click(function() {
|
||||
|
||||
|
||||
function cancel_queue(id,url) {
|
||||
$.confirm({
|
||||
title: 'Confirm!',
|
||||
content: 'Are You Sure to cancel this Queue!',
|
||||
buttons: {
|
||||
cancel: function () {
|
||||
},
|
||||
confirm: {
|
||||
text: 'Confirm',
|
||||
btnClass: 'btn-green',
|
||||
keys: ['enter', 'shift'],
|
||||
action: function(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url ,
|
||||
data: {id:id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
location.reload();
|
||||
}
|
||||
swal({
|
||||
title: "Confirm!",
|
||||
text: "Are You Sure to cancel this Queue!",
|
||||
}, function () {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url ,
|
||||
data: {id:id},
|
||||
dataType: "json",
|
||||
success: function(data) {
|
||||
if(data.status == true)
|
||||
{
|
||||
location.reload();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user