change modal close function

This commit is contained in:
phyusin
2018-05-14 16:38:40 +06:30
parent 6004b894ec
commit cef2249214
5 changed files with 49 additions and 35 deletions

View File

@@ -35,17 +35,17 @@ App.check_new_order = App.cable.subscriptions.create('CheckNewOrderChannel', {
// }
// });
$("#notify_new_order_lists").text(order_lists);
// if($("#notify_new_order").hasClass("hidden")){
$("#notify_new_order").removeClass("hidden");
// if($("#"+shop_code+"_notify_new_order").hasClass("hidden")){
$("#"+shop_code+"_notify_new_order").removeClass("hidden");
// }
$("#notify_new_order").on('shown.bs.modal', function(e){
$(document).off('focusin.modal');
$("#notify_new_order").focus();
$("#"+shop_code+"_notify_new_order").on('shown.bs.modal', function(e){
// $(document).off('focusin.modal');
$("#"+shop_code+"_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");
$("#"+shop_code+"_notify_order_send_to_kitchen").addClass("hidden");
$("#"+shop_code+"_notify_order_ready_to_delivery").addClass("hidden");
}).on('hide.bs.modal', function (e) {
$("#notify_new_order").addClass("hidden");
$("#"+shop_code+"_notify_new_order").addClass("hidden");
}).modal({show: true, keyboard: false, backdrop: false});
}
}