change popup ui
This commit is contained in:
@@ -19,33 +19,34 @@ App.check_new_order = App.cable.subscriptions.create('CheckNewOrderChannel', {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// alert(order_lists);
|
// alert(order_lists);
|
||||||
swal({
|
// swal({
|
||||||
title: 'Information',
|
// title: 'Information',
|
||||||
target: document.getElementById(shop_code+"_notify_new_order"),
|
// target: document.getElementById(shop_code+"_notify_new_order"),
|
||||||
text: "You have new orders <br/>"+
|
// text: "You have new orders <br/>"+
|
||||||
"Are you accept or reject for these orders <b>"+order_lists+"</b>?",
|
// "Are you accept or reject for these orders <b>"+order_lists+"</b>?",
|
||||||
type: 'success',
|
// type: 'success',
|
||||||
html: true,
|
// html: true,
|
||||||
closeOnConfirm: false,
|
// closeOnConfirm: false,
|
||||||
closeOnCancel: false,
|
// closeOnCancel: false,
|
||||||
allowOutsideClick: false
|
// allowOutsideClick: false
|
||||||
}, function (isConfirm) {
|
// }, function (isConfirm) {
|
||||||
if(isConfirm){
|
// if(isConfirm){
|
||||||
swal.close();
|
// swal.close();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
// $("#notify_new_order_lists").text(order_lists);
|
$("#notify_new_order_lists").text(order_lists);
|
||||||
// if($("#notify_new_order").hasClass("hidden")){
|
// if($("#notify_new_order").hasClass("hidden")){
|
||||||
// $("#notify_new_order").removeClass("hidden");
|
$("#notify_new_order").removeClass("hidden");
|
||||||
// }
|
// }
|
||||||
// $("#notify_new_order").on('show.bs.modal', function(e){
|
$("#notify_new_order").on('shown.bs.modal', function(e){
|
||||||
// $("#notify_order_send_to_kitchen").addClass("hidden");
|
$(document).off('focusin.modal');
|
||||||
// $("#notify_order_ready_to_delivery").addClass("hidden");
|
$("#notify_new_order").focus();
|
||||||
// }).on('shown.bs.modal', function(e){
|
$("#"+shop_code+"_doemal_new_order").addClass("hidden");
|
||||||
// $("#notify_new_order").focus();
|
$("#notify_order_send_to_kitchen").addClass("hidden");
|
||||||
// }).on('hide.bs.modal', function (e) {
|
$("#notify_order_ready_to_delivery").addClass("hidden");
|
||||||
// $("#notify_new_order").addClass("hidden");
|
}).on('hide.bs.modal', function (e) {
|
||||||
// }).modal({show: true, keyboard: false, backdrop: false});
|
$("#notify_new_order").addClass("hidden");
|
||||||
|
}).modal({show: true, keyboard: false, backdrop: false});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,33 +19,34 @@ App.check_order_ready_to_delivery = App.cable.subscriptions.create('CheckOrderRe
|
|||||||
});
|
});
|
||||||
|
|
||||||
// alert(order_lists);
|
// alert(order_lists);
|
||||||
swal({
|
// swal({
|
||||||
title: 'Information',
|
// title: 'Information',
|
||||||
target: document.getElementById(shop_code+"_notify_order_ready_to_delivery"),
|
// target: document.getElementById(shop_code+"_notify_order_ready_to_delivery"),
|
||||||
text: "You have orders that are ready to deliver <br/>"+
|
// text: "You have orders that are ready to deliver <br/>"+
|
||||||
"Could you ready these orders <b>"+order_lists+"</b> to deliver?",
|
// "Could you ready these orders <b>"+order_lists+"</b> to deliver?",
|
||||||
type: 'success',
|
// type: 'success',
|
||||||
html: true,
|
// html: true,
|
||||||
closeOnConfirm: false,
|
// closeOnConfirm: false,
|
||||||
closeOnCancel: false,
|
// closeOnCancel: false,
|
||||||
allowOutsideClick: false
|
// allowOutsideClick: false
|
||||||
}, function (isConfirm) {
|
// }, function (isConfirm) {
|
||||||
if(isConfirm){
|
// if(isConfirm){
|
||||||
swal.close();
|
// swal.close();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
// $("#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");
|
$("#notify_order_ready_to_delivery").removeClass("hidden");
|
||||||
// }
|
// }
|
||||||
// $("#notify_order_ready_to_delivery").on('shown.bs.modal', function(e){
|
$("#notify_order_ready_to_delivery").on('shown.bs.modal', function(e){
|
||||||
// $("#notify_new_order").addClass("hidden");
|
// $(document).off('focusin.modal');
|
||||||
// $("#notify_order_send_to_kitchen").addClass("hidden");
|
$("#notify_order_ready_to_delivery").focus();
|
||||||
// }).on('shown.bs.modal', function(e){
|
$("#"+shop_code+"_doemal_new_order").addClass("hidden");
|
||||||
// $("#notify_order_ready_to_delivery").focus();
|
$("#notify_new_order").addClass("hidden");
|
||||||
// }).on('hide.bs.modal', function (e) {
|
$("#notify_order_send_to_kitchen").addClass("hidden");
|
||||||
// $("#notify_order_ready_to_delivery").addClass("hidden");
|
}).on('hide.bs.modal', function (e) {
|
||||||
// }).modal({show: true, keyboard: false, backdrop: false});
|
$("#notify_order_ready_to_delivery").addClass("hidden");
|
||||||
|
}).modal({show: true, keyboard: false, backdrop: false});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,33 +19,34 @@ App.check_order_send_to_kitchen = App.cable.subscriptions.create('CheckOrderSend
|
|||||||
});
|
});
|
||||||
|
|
||||||
// alert(order_lists);
|
// alert(order_lists);
|
||||||
swal({
|
// swal({
|
||||||
title: 'Information',
|
// title: 'Information',
|
||||||
target: document.getElementById(shop_code+"_notify_order_send_to_kitchen"),
|
// target: document.getElementById(shop_code+"_notify_order_send_to_kitchen"),
|
||||||
text: "You have to send order to kitchen <br/>"+
|
// text: "You have to send order to kitchen <br/>"+
|
||||||
"Could you send these orders <b>"+order_lists+"</b> to kitchen?",
|
// "Could you send these orders <b>"+order_lists+"</b> to kitchen?",
|
||||||
type: 'success',
|
// type: 'success',
|
||||||
html: true,
|
// html: true,
|
||||||
closeOnConfirm: false,
|
// closeOnConfirm: false,
|
||||||
closeOnCancel: false,
|
// closeOnCancel: false,
|
||||||
allowOutsideClick: false
|
// allowOutsideClick: false
|
||||||
}, function (isConfirm) {
|
// }, function (isConfirm) {
|
||||||
if(isConfirm){
|
// if(isConfirm){
|
||||||
swal.close();
|
// swal.close();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
// $("#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");
|
$("#notify_order_send_to_kitchen").removeClass("hidden");
|
||||||
// }
|
// }
|
||||||
// $("#notify_order_send_to_kitchen").on('show.bs.modal', function(e){
|
$("#notify_order_send_to_kitchen").on('shown.bs.modal', function(e){
|
||||||
// $("#notify_new_order").addClass("hidden");
|
// $(document).off('focusin.modal');
|
||||||
// $("#notify_order_ready_to_delivery").addClass("hidden");
|
$("#notify_order_send_to_kitchen").focus();
|
||||||
// }).on('shown.bs.modal', function(e){
|
$("#"+shop_code+"_doemal_new_order").addClass("hidden");
|
||||||
// $("#notify_order_send_to_kitchen").focus();
|
$("#notify_new_order").addClass("hidden");
|
||||||
// }).on('hide.bs.modal', function (e) {
|
$("#notify_order_ready_to_delivery").addClass("hidden");
|
||||||
// $("#notify_order_send_to_kitchen").addClass("hidden");
|
}).on('hide.bs.modal', function (e) {
|
||||||
// }).modal({show: true, keyboard: false, backdrop: false});
|
$("#notify_order_send_to_kitchen").addClass("hidden");
|
||||||
|
}).modal({show: true, keyboard: false, backdrop: false});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -157,24 +157,22 @@ $(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// $('button[data-dismiss="modal"]').on('click', function(){ $(this).parent().parent().parent().parent().modal('hide'); });
|
$('button[data-dismiss="modal"]').on('click', function(){
|
||||||
|
alert("hi");
|
||||||
// $(".new_order_close").on("click",function(){
|
// $(this).parent().parent().parent().parent().parent().parent().modal('hide');
|
||||||
// var code = $(this).attr("data-value");
|
});
|
||||||
// $("#"+code+"_doemal_new_order").modal("hide");
|
|
||||||
// });
|
|
||||||
|
|
||||||
// $("[data-dismiss='modal']").on('click', function() {
|
// $("[data-dismiss='modal']").on('click', function() {
|
||||||
// $('body').addClass('modal-open-fix');
|
// $('body').addClass('modal-open-fix');
|
||||||
// if($('body').css("padding-right") == '15px') {
|
// if($('body').css("padding-right") == '15px') {
|
||||||
// $('body').addClass('modal-open-fix-pad');
|
// $('body').addClass('modal-open-fix-pad');
|
||||||
// }
|
// }
|
||||||
// setTimeout(function() {
|
// setTimeout(function() {
|
||||||
// if($('body').hasClass('modal-open-fix-pad')) {
|
// if($('body').hasClass('modal-open-fix-pad')) {
|
||||||
// $('body').css('padding-right', '15px');
|
// $('body').css('padding-right', '15px');
|
||||||
// }
|
// }
|
||||||
// $('body').addClass('modal-open').removeClass('modal-open-fix, modal-open-fix-pad');
|
// $('body').addClass('modal-open').removeClass('modal-open-fix, modal-open-fix-pad');
|
||||||
// }, 1000);
|
// }, 1000);
|
||||||
// });
|
// });
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -473,36 +471,36 @@ function showNewOrder(order_reservation,shop_code){
|
|||||||
audio.play();
|
audio.play();
|
||||||
// },10000);
|
// },10000);
|
||||||
|
|
||||||
// $("#new_order").text(order_reservation.order_reservation_id);
|
$("#new_order").text(order_reservation.order_reservation_id);
|
||||||
// $("#new_order_date").text(requested_date);
|
$("#new_order_date").text(requested_date);
|
||||||
// if($("#"+shop_code+"_doemal_new_order").hasClass("hidden")){
|
// 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){
|
$("#"+shop_code+"_doemal_new_order").on('shown.bs.modal', function(e){
|
||||||
// $("#notify_new_order").addClass("hidden");
|
// $(document).off('focusin.modal');
|
||||||
// $("#notify_order_send_to_kitchen").addClass("hidden");
|
$("#"+shop_code+"_doemal_new_order").focus();
|
||||||
// $("#notify_order_ready_to_delivery").addClass("hidden");
|
$("#notify_new_order").addClass("hidden");
|
||||||
// }).on('shown.bs.modal', function(e){
|
$("#notify_order_send_to_kitchen").addClass("hidden");
|
||||||
// $("#"+shop_code+"_doemal_new_order").focus();
|
$("#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});
|
||||||
swal({
|
// swal({
|
||||||
title: 'Information',
|
// title: 'Information',
|
||||||
target: document.getElementById(shop_code+"_notify_new_order"),
|
// target: document.getElementById(shop_code+"_notify_new_order"),
|
||||||
text: "You have new order "+
|
// text: "You have new order "+
|
||||||
"<b>"+order_reservation.order_reservation_id+"</b> requested for "+requested_date+"?",
|
// "<b>"+order_reservation.order_reservation_id+"</b> requested for "+requested_date+"?",
|
||||||
type: 'success',
|
// type: 'success',
|
||||||
html: true,
|
// html: true,
|
||||||
closeOnConfirm: false,
|
// closeOnConfirm: false,
|
||||||
closeOnCancel: false,
|
// closeOnCancel: false,
|
||||||
allowOutsideClick: false
|
// allowOutsideClick: false
|
||||||
}, function (isConfirm) {
|
// }, function (isConfirm) {
|
||||||
if(isConfirm){
|
// if(isConfirm){
|
||||||
audio.pause();
|
// audio.pause();
|
||||||
swal.close();
|
// swal.close();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -464,10 +464,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_doemal_new_order"></div>
|
<!-- <div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_doemal_new_order"></div>
|
||||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_new_order"></div>
|
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_new_order"></div>
|
||||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_send_to_kitchen"></div>
|
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_send_to_kitchen"></div>
|
||||||
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_ready_to_delivery"></div>
|
<div id="<%= @shop.shop_code ? @shop.shop_code : '' %>_notify_order_ready_to_delivery"></div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p id="ref_no" class="hidden"></p>
|
<p id="ref_no" class="hidden"></p>
|
||||||
@@ -584,7 +584,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</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">
|
||||||
<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 +598,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 waves-effect 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>
|
||||||
@@ -620,7 +620,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 waves-effect" data-dismiss="modal">CLOSE</button>
|
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue" data-dismiss="modal">CLOSE</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -642,7 +642,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 waves-effect" data-dismiss="modal">CLOSE</button>
|
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue" data-dismiss="modal">CLOSE</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -664,11 +664,11 @@
|
|||||||
<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 waves-effect" data-dismiss="modal">CLOSE</button>
|
<button type="button" class="btn btn-link p-t-5 p-b-5 bg-blue" data-dismiss="modal">CLOSE</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user