Merge branch 'sqa-1804-001' of bitbucket.org:code2lab/sxrestaurant into sqa-1804-001

This commit is contained in:
Aung Myo
2018-05-14 17:27:52 +06:30
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); $("#notify_new_order_lists").text(order_lists);
// if($("#notify_new_order").hasClass("hidden")){ // if($("#"+shop_code+"_notify_new_order").hasClass("hidden")){
$("#notify_new_order").removeClass("hidden"); $("#"+shop_code+"_notify_new_order").removeClass("hidden");
// } // }
$("#notify_new_order").on('shown.bs.modal', function(e){ $("#"+shop_code+"_notify_new_order").on('shown.bs.modal', function(e){
$(document).off('focusin.modal'); // $(document).off('focusin.modal');
$("#notify_new_order").focus(); $("#"+shop_code+"_notify_new_order").focus();
$("#"+shop_code+"_doemal_new_order").addClass("hidden"); $("#"+shop_code+"_doemal_new_order").addClass("hidden");
$("#notify_order_send_to_kitchen").addClass("hidden"); $("#"+shop_code+"_notify_order_send_to_kitchen").addClass("hidden");
$("#notify_order_ready_to_delivery").addClass("hidden"); $("#"+shop_code+"_notify_order_ready_to_delivery").addClass("hidden");
}).on('hide.bs.modal', function (e) { }).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}); }).modal({show: true, keyboard: false, backdrop: false});
} }
} }

View File

@@ -36,16 +36,16 @@ App.check_order_ready_to_delivery = App.cable.subscriptions.create('CheckOrderRe
// }); // });
$("#notify_order_ready_to_delivery_lists").text(order_lists); $("#notify_order_ready_to_delivery_lists").text(order_lists);
// if($("#notify_order_ready_to_delivery").hasClass("hidden")){ // 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'); // $(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"); $("#"+shop_code+"_doemal_new_order").addClass("hidden");
$("#notify_new_order").addClass("hidden"); $("#"+shop_code+"_notify_new_order").addClass("hidden");
$("#notify_order_send_to_kitchen").addClass("hidden"); $("#"+shop_code+"_notify_order_send_to_kitchen").addClass("hidden");
}).on('hide.bs.modal', function (e) { }).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}); }).modal({show: true, keyboard: false, backdrop: false});
} }
} }

View File

@@ -36,16 +36,16 @@ App.check_order_send_to_kitchen = App.cable.subscriptions.create('CheckOrderSend
// }); // });
$("#notify_order_send_to_kitchen_lists").text(order_lists); $("#notify_order_send_to_kitchen_lists").text(order_lists);
// if($("#notify_order_send_to_kitchen").hasClass("hidden")){ // 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'); // $(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"); $("#"+shop_code+"_doemal_new_order").addClass("hidden");
$("#notify_new_order").addClass("hidden"); $("#"+shop_code+"_notify_new_order").addClass("hidden");
$("#notify_order_ready_to_delivery").addClass("hidden"); $("#"+shop_code+"_notify_order_ready_to_delivery").addClass("hidden");
}).on('hide.bs.modal', function (e) { }).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}); }).modal({show: true, keyboard: false, backdrop: false});
} }
} }

View File

@@ -160,10 +160,25 @@ $(function() {
// $('button[data-dismiss="modal"]').on('click', function(){ $(this).parent().parent().parent().parent().modal('hide'); }); // $('button[data-dismiss="modal"]').on('click', function(){ $(this).parent().parent().parent().parent().modal('hide'); });
// $(".new_order_close").on("click",function(){ $(".new_order_close").on("click",function(){
// var code = $(this).attr("data-value"); var code = $(this).attr("data-value");
// $("#"+code+"_doemal_new_order").modal("hide"); $("#"+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() { // $("[data-dismiss='modal']").on('click', function() {
// $('body').addClass('modal-open-fix'); // $('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){ $("#"+shop_code+"_doemal_new_order").on('shown.bs.modal', function(e){
// $(document).off('focusin.modal'); // $(document).off('focusin.modal');
$("#"+shop_code+"_doemal_new_order").focus(); $("#"+shop_code+"_doemal_new_order").focus();
$("#notify_new_order").addClass("hidden"); $("#"+shop_code+"_notify_new_order").addClass("hidden");
$("#notify_order_send_to_kitchen").addClass("hidden"); $("#"+shop_code+"_notify_order_send_to_kitchen").addClass("hidden");
$("#notify_order_ready_to_delivery").addClass("hidden"); $("#"+shop_code+"_notify_order_ready_to_delivery").addClass("hidden");
}).on('hide.bs.modal', function (e) { }).on('hide.bs.modal', function (e) {
$("#"+shop_code+"_doemal_new_order").addClass("hidden"); $("#"+shop_code+"_doemal_new_order").addClass("hidden");
}).modal({show: true, keyboard: false, backdrop: false}); }).modal({show: true, keyboard: false, backdrop: false});

View File

@@ -584,7 +584,6 @@
</div> </div>
<div class="modal fade text-center" id="<%= @shop.shop_code ? @shop.shop_code : '' %>_doemal_new_order" tabindex="-1" role="dialog"> <div class="modal fade text-center" id="<%= @shop.shop_code ? @shop.shop_code : '' %>_doemal_new_order" tabindex="-1" role="dialog">
>>>>>>> 8fda04372d3c2d7255bbd4c14ed3b3c8d9f5937e
<div class="modal-dialog modal-md" role="document"> <div class="modal-dialog modal-md" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@@ -598,7 +597,7 @@
<div class="modal-footer "> <div class="modal-footer ">
<div class="row p-r-20"> <div class="row p-r-20">
<div class="col-md-5"> <div class="col-md-5">
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue new_order_close" data-value="<%= @shop.shop_code ? @shop.shop_code : '' %>"data-dismiss="modal">CLOSE</button> <button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue new_order_close" data-value="<%= @shop.shop_code ? @shop.shop_code : '' %>" data-dismiss="modal">CLOSE</button>
</div> </div>
</div> </div>
</div> </div>
@@ -606,7 +605,7 @@
</div> </div>
</div> </div>
<div class="modal fade text-center" id="notify_new_order" tabindex="-1" role="dialog"> <div class="modal fade text-center" id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_new_order" tabindex="-1" role="dialog">
<div class="modal-dialog modal-md" role="document"> <div class="modal-dialog modal-md" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@@ -620,7 +619,7 @@
<div class="modal-footer "> <div class="modal-footer ">
<div class="row p-r-20"> <div class="row p-r-20">
<div class="col-md-5"> <div class="col-md-5">
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue" data-dismiss="modal">CLOSE</button> <button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue notify_new_close" data-value="<%= @shop.shop_code ? @shop.shop_code : '' %>" data-dismiss="modal">CLOSE</button>
</div> </div>
</div> </div>
</div> </div>
@@ -628,7 +627,7 @@
</div> </div>
</div> </div>
<div class="modal fade text-center" id="notify_order_send_to_kitchen" tabindex="-1" role="dialog"> <div class="modal fade text-center" id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_send_to_kitchen" tabindex="-1" role="dialog">
<div class="modal-dialog modal-md" role="document"> <div class="modal-dialog modal-md" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@@ -642,7 +641,7 @@
<div class="modal-footer "> <div class="modal-footer ">
<div class="row p-r-20"> <div class="row p-r-20">
<div class="col-md-5"> <div class="col-md-5">
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue" data-dismiss="modal">CLOSE</button> <button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue notify_order_send_close" data-value="<%= @shop.shop_code ? @shop.shop_code : '' %>" data-dismiss="modal">CLOSE</button>
</div> </div>
</div> </div>
</div> </div>
@@ -650,7 +649,7 @@
</div> </div>
</div> </div>
<div class="modal fade text-center" id="notify_order_ready_to_delivery" tabindex="-1" role="dialog"> <div class="modal fade text-center" id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_ready_to_delivery" tabindex="-1" role="dialog">
<div class="modal-dialog modal-md" role="document"> <div class="modal-dialog modal-md" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
@@ -664,7 +663,7 @@
<div class="modal-footer "> <div class="modal-footer ">
<div class="row p-r-20"> <div class="row p-r-20">
<div class="col-md-5"> <div class="col-md-5">
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue" data-dismiss="modal">CLOSE</button> <button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue notify_order_ready_close" data-value="<%= @shop.shop_code ? @shop.shop_code : '' %>" data-dismiss="modal">CLOSE</button>
</div> </div>
</div> </div>
</div> </div>