diff --git a/app/views/origami/split_bill/index.html.erb b/app/views/origami/split_bill/index.html.erb index 8e4083d7..2d389413 100644 --- a/app/views/origami/split_bill/index.html.erb +++ b/app/views/origami/split_bill/index.html.erb @@ -392,7 +392,8 @@ }); //order_item_split - $('#order_item_split').on('click',function () { + $('#order_item_split').on('click',function (e) { + e.preventDefault(); var cnt_order_item = "<%= order_item_count %>"; var order_items = get_selected_order_items();// Selected Order Items var cnt_items = parseInt(cnt_order_item) - parseInt(order_items.length); @@ -405,12 +406,16 @@ showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Yes, split it!", - closeOnConfirm: false - }, function (isConfirm) { + closeOnConfirm: false, + allowOutsideClick: false, + html: false + },function(isConfirm){ if(isConfirm){ + swal.close(); orderItemSplitBillProcess(cnt_items); } }); + // } // else{ // orderItemSplitBillProcess(cnt_items); @@ -470,9 +475,12 @@ showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Yes, split it!", - closeOnConfirm: false + closeOnConfirm: false, + allowOutsideClick: false, + html: false }, function (isConfirm) { if(isConfirm){ + swal.close(); orderSplitBillProcess(cnt_odrs); } });