change modal close function
This commit is contained in:
@@ -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});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,16 +36,16 @@ App.check_order_ready_to_delivery = App.cable.subscriptions.create('CheckOrderRe
|
||||
// });
|
||||
$("#notify_order_ready_to_delivery_lists").text(order_lists);
|
||||
// if($("#notify_order_ready_to_delivery").hasClass("hidden")){
|
||||
$("#notify_order_ready_to_delivery").removeClass("hidden");
|
||||
$("#"+shop_code+"_notify_order_ready_to_delivery").removeClass("hidden");
|
||||
// }
|
||||
$("#notify_order_ready_to_delivery").on('shown.bs.modal', function(e){
|
||||
$("#"+shop_code+"_notify_order_ready_to_delivery").on('shown.bs.modal', function(e){
|
||||
// $(document).off('focusin.modal');
|
||||
$("#notify_order_ready_to_delivery").focus();
|
||||
$("#"+shop_code+"_notify_order_ready_to_delivery").focus();
|
||||
$("#"+shop_code+"_doemal_new_order").addClass("hidden");
|
||||
$("#notify_new_order").addClass("hidden");
|
||||
$("#notify_order_send_to_kitchen").addClass("hidden");
|
||||
$("#"+shop_code+"_notify_new_order").addClass("hidden");
|
||||
$("#"+shop_code+"_notify_order_send_to_kitchen").addClass("hidden");
|
||||
}).on('hide.bs.modal', function (e) {
|
||||
$("#notify_order_ready_to_delivery").addClass("hidden");
|
||||
$("#"+shop_code+"_notify_order_ready_to_delivery").addClass("hidden");
|
||||
}).modal({show: true, keyboard: false, backdrop: false});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,16 +36,16 @@ App.check_order_send_to_kitchen = App.cable.subscriptions.create('CheckOrderSend
|
||||
// });
|
||||
$("#notify_order_send_to_kitchen_lists").text(order_lists);
|
||||
// if($("#notify_order_send_to_kitchen").hasClass("hidden")){
|
||||
$("#notify_order_send_to_kitchen").removeClass("hidden");
|
||||
$("#"+shop_code+"_notify_order_send_to_kitchen").removeClass("hidden");
|
||||
// }
|
||||
$("#notify_order_send_to_kitchen").on('shown.bs.modal', function(e){
|
||||
$("#"+shop_code+"_notify_order_send_to_kitchen").on('shown.bs.modal', function(e){
|
||||
// $(document).off('focusin.modal');
|
||||
$("#notify_order_send_to_kitchen").focus();
|
||||
$("#"+shop_code+"_notify_order_send_to_kitchen").focus();
|
||||
$("#"+shop_code+"_doemal_new_order").addClass("hidden");
|
||||
$("#notify_new_order").addClass("hidden");
|
||||
$("#notify_order_ready_to_delivery").addClass("hidden");
|
||||
$("#"+shop_code+"_notify_new_order").addClass("hidden");
|
||||
$("#"+shop_code+"_notify_order_ready_to_delivery").addClass("hidden");
|
||||
}).on('hide.bs.modal', function (e) {
|
||||
$("#notify_order_send_to_kitchen").addClass("hidden");
|
||||
$("#"+shop_code+"_notify_order_send_to_kitchen").addClass("hidden");
|
||||
}).modal({show: true, keyboard: false, backdrop: false});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,10 +160,25 @@ $(function() {
|
||||
|
||||
// $('button[data-dismiss="modal"]').on('click', function(){ $(this).parent().parent().parent().parent().modal('hide'); });
|
||||
|
||||
// $(".new_order_close").on("click",function(){
|
||||
// var code = $(this).attr("data-value");
|
||||
// $("#"+code+"_doemal_new_order").modal("hide");
|
||||
// });
|
||||
$(".new_order_close").on("click",function(){
|
||||
var code = $(this).attr("data-value");
|
||||
$("#"+code+"_doemal_new_order").modal("hide");
|
||||
});
|
||||
|
||||
$(".notify_new_close").on("click",function(){
|
||||
var code = $(this).attr("data-value");
|
||||
$("#"+code+"_notify_new_order").modal("hide");
|
||||
});
|
||||
|
||||
$(".notify_order_send_close").on("click",function(){
|
||||
var code = $(this).attr("data-value");
|
||||
$("#"+code+"_notify_order_send_to_kitchen").modal("hide");
|
||||
});
|
||||
|
||||
$(".notify_order_ready_close").on("click",function(){
|
||||
var code = $(this).attr("data-value");
|
||||
$("#"+code+"_notify_order_ready_to_delivery").modal("hide");
|
||||
});
|
||||
|
||||
// $("[data-dismiss='modal']").on('click', function() {
|
||||
// $('body').addClass('modal-open-fix');
|
||||
@@ -482,9 +497,9 @@ function showNewOrder(order_reservation,shop_code){
|
||||
$("#"+shop_code+"_doemal_new_order").on('shown.bs.modal', function(e){
|
||||
// $(document).off('focusin.modal');
|
||||
$("#"+shop_code+"_doemal_new_order").focus();
|
||||
$("#notify_new_order").addClass("hidden");
|
||||
$("#notify_order_send_to_kitchen").addClass("hidden");
|
||||
$("#notify_order_ready_to_delivery").addClass("hidden");
|
||||
$("#"+shop_code+"_notify_new_order").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) {
|
||||
$("#"+shop_code+"_doemal_new_order").addClass("hidden");
|
||||
}).modal({show: true, keyboard: false, backdrop: false});
|
||||
|
||||
Reference in New Issue
Block a user