check api issue

This commit is contained in:
phyusin
2018-05-12 15:20:57 +06:30
parent 8457ebc08e
commit 050d3379c0
8 changed files with 150 additions and 114 deletions

View File

@@ -164,18 +164,18 @@ $(function() {
// $("#"+code+"_doemal_new_order").modal("hide");
// });
$("[data-dismiss='modal']").on('click', function() {
$('body').addClass('modal-open-fix');
if($('body').css("padding-right") == '15px') {
$('body').addClass('modal-open-fix-pad');
}
setTimeout(function() {
if($('body').hasClass('modal-open-fix-pad')) {
$('body').css('padding-right', '15px');
}
$('body').addClass('modal-open').removeClass('modal-open-fix, modal-open-fix-pad');
}, 1000);
});
// $("[data-dismiss='modal']").on('click', function() {
// $('body').addClass('modal-open-fix');
// if($('body').css("padding-right") == '15px') {
// $('body').addClass('modal-open-fix-pad');
// }
// setTimeout(function() {
// if($('body').hasClass('modal-open-fix-pad')) {
// $('body').css('padding-right', '15px');
// }
// $('body').addClass('modal-open').removeClass('modal-open-fix, modal-open-fix-pad');
// }, 1000);
// });
});
function warnBeforeRedirect(linkURL) {
@@ -473,20 +473,36 @@ function showNewOrder(order_reservation,shop_code){
audio.play();
// },10000);
$("#new_order").text(order_reservation.order_reservation_id);
$("#new_order_date").text(requested_date);
if($("#"+shop_code+"_doemal_new_order").hasClass("hidden")){
$("#"+shop_code+"_doemal_new_order").removeClass("hidden");
}
$("#"+shop_code+"_doemal_new_order").on('show.bs.modal', function(e){
$("#notify_new_order").addClass("hidden");
$("#notify_order_send_to_kitchen").addClass("hidden");
$("#notify_order_ready_to_delivery").addClass("hidden");
}).on('shown.bs.modal', function(e){
$("#"+shop_code+"_doemal_new_order").focus();
}).on('hide.bs.modal', function (e) {
$("#"+shop_code+"_doemal_new_order").addClass("hidden");
}).modal({show: true, keyboard: false, backdrop: false});
// $("#new_order").text(order_reservation.order_reservation_id);
// $("#new_order_date").text(requested_date);
// if($("#"+shop_code+"_doemal_new_order").hasClass("hidden")){
// $("#"+shop_code+"_doemal_new_order").removeClass("hidden");
// }
// $("#"+shop_code+"_doemal_new_order").on('show.bs.modal', function(e){
// $("#notify_new_order").addClass("hidden");
// $("#notify_order_send_to_kitchen").addClass("hidden");
// $("#notify_order_ready_to_delivery").addClass("hidden");
// }).on('shown.bs.modal', function(e){
// $("#"+shop_code+"_doemal_new_order").focus();
// }).on('hide.bs.modal', function (e) {
// $("#"+shop_code+"_doemal_new_order").addClass("hidden");
// }).modal({show: true, keyboard: false, backdrop: false});
swal({
title: 'Information',
target: document.getElementById(shop_code+"_notify_new_order"),
text: "You have new order "+
"<b>"+order_reservation.order_reservation_id+"</b> requested for "+requested_date+"?",
type: 'success',
html: true,
closeOnConfirm: false,
closeOnCancel: false,
allowOutsideClick: false
}, function (isConfirm) {
if(isConfirm){
audio.pause();
swal.close();
}
});
}
}