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

@@ -494,22 +494,7 @@
// data: 'order_id='+ order_id,
success: function (result) {
if (!result.status) {
/*$.confirm({
title: 'Infomation!',
content: result.error_message,
buttons: {
confirm: {
text: 'Ok',
btnClass: 'btn-green',
action: function () {
window.location.href = '/origami';
}
}
}
});*/
swal("Good job!", "You clicked the button!", "success");
swal("Infomation!", result.error_message);
}
else {
location.reload();
@@ -594,20 +579,17 @@
});
$('#void').on('click', function () {
var sure = confirm("Are you sure want to Void");
if (sure == true) {
var sale_id = $('#sale_id').val();
var ajax_url = "/origami/sale/" + sale_id + '/void';
$.ajax({
type: 'POST',
url: ajax_url,
success: function () {
window.location.href = '/origami/';
}
})
} else {
}
swal({
title: "Alert",
text: "Are you sure want to Void?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, void it!",
closeOnConfirm: false
}, function () {
window.location.href = '/origami/';
});
});
$('#add_order').on('click', function () {