update confirm box

This commit is contained in:
Aung Myo
2017-10-19 18:17:56 +06:30
parent 034685e1e9
commit 78c6304748
21 changed files with 364 additions and 556 deletions

View File

@@ -131,7 +131,6 @@ $(function() {
var code = "";
setTimeout(function(){
var hi=getQRCode();
alert(hi);
},100);
});
@@ -231,39 +230,31 @@ $(document).on('click',".customer_tr",function(){
})
function update_sale(customer_id,sale_id) {
$.confirm({
title: 'Confirm!',
content: 'Are You Sure to assign this customer!',
buttons: {
swal({
title: "Confirmation",
text: "Are You Sure to assign this customer!",
type: "success",
showCancelButton: true,
confirmButtonColor: "green",
confirmButtonText: "Yes, delete it!",
closeOnConfirm: false
}, function () {
$.ajax({
type: "POST",
url: "update_sale/" ,
data: {customer_id:customer_id,sale_id:sale_id},
dataType: "json",
success: function(data) {
if(data.status == true)
{
window.location.href = '/origami'
}else{
swal("Alert!", "Record not found!", "error");
location.reload();
}
cancel: function () {
},
confirm: {
text: 'Confirm',
btnClass: 'btn-green',
keys: ['enter', 'shift'],
action: function(){
$.ajax({
type: "POST",
url: "update_sale/" ,
data: {customer_id:customer_id,sale_id:sale_id},
dataType: "json",
success: function(data) {
if(data.status == true)
{
window.location.href = '/origami'
}else{
alert('Record not found!');
location.reload();
}
}
});
}
}
}
}
});
});
}