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

@@ -157,24 +157,22 @@ $(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");
// });
$('button[data-dismiss="modal"]').on('click', function(){
alert("hi");
// $(this).parent().parent().parent().parent().parent().parent().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);
// $('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);
// });
});
@@ -473,36 +471,36 @@ function showNewOrder(order_reservation,shop_code){
audio.play();
// },10000);
// $("#new_order").text(order_reservation.order_reservation_id);
// $("#new_order_date").text(requested_date);
$("#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").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();
}
});
$("#"+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");
}).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();
// }
// });
}
}