change popup ui

This commit is contained in:
phyusin
2018-05-14 15:42:11 +06:30
parent cc0178eb65
commit 1c8ea30efa
6 changed files with 128 additions and 127 deletions

View File

@@ -19,33 +19,34 @@ App.check_new_order = App.cable.subscriptions.create('CheckNewOrderChannel', {
});
// alert(order_lists);
swal({
title: 'Information',
target: document.getElementById(shop_code+"_notify_new_order"),
text: "You have new orders <br/>"+
"Are you accept or reject for these orders <b>"+order_lists+"</b>?",
type: 'success',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function (isConfirm) {
if(isConfirm){
swal.close();
}
});
// $("#notify_new_order_lists").text(order_lists);
// swal({
// title: 'Information',
// target: document.getElementById(shop_code+"_notify_new_order"),
// text: "You have new orders <br/>"+
// "Are you accept or reject for these orders <b>"+order_lists+"</b>?",
// type: 'success',
// html: true,
// closeOnConfirm: false,
// closeOnCancel: false,
// allowOutsideClick: false
// }, function (isConfirm) {
// if(isConfirm){
// swal.close();
// }
// });
$("#notify_new_order_lists").text(order_lists);
// if($("#notify_new_order").hasClass("hidden")){
// $("#notify_new_order").removeClass("hidden");
$("#notify_new_order").removeClass("hidden");
// }
// $("#notify_new_order").on('show.bs.modal', function(e){
// $("#notify_order_send_to_kitchen").addClass("hidden");
// $("#notify_order_ready_to_delivery").addClass("hidden");
// }).on('shown.bs.modal', function(e){
// $("#notify_new_order").focus();
// }).on('hide.bs.modal', function (e) {
// $("#notify_new_order").addClass("hidden");
// }).modal({show: true, keyboard: false, backdrop: false});
$("#notify_new_order").on('shown.bs.modal', function(e){
$(document).off('focusin.modal');
$("#notify_new_order").focus();
$("#"+shop_code+"_doemal_new_order").addClass("hidden");
$("#notify_order_send_to_kitchen").addClass("hidden");
$("#notify_order_ready_to_delivery").addClass("hidden");
}).on('hide.bs.modal', function (e) {
$("#notify_new_order").addClass("hidden");
}).modal({show: true, keyboard: false, backdrop: false});
}
}
});