update js for precompile
This commit is contained in:
@@ -119,7 +119,6 @@ $(function() {
|
|||||||
// $(".menu_sub_category").on("click", function(){
|
// $(".menu_sub_category").on("click", function(){
|
||||||
$('.sub_category_list').addClass("hidden");
|
$('.sub_category_list').addClass("hidden");
|
||||||
var menu_id = $(this).attr("data-id");
|
var menu_id = $(this).attr("data-id");
|
||||||
console.log(menu_id);
|
|
||||||
var url = "get_menu_category/"+menu_id;
|
var url = "get_menu_category/"+menu_id;
|
||||||
show_menu_item_list(url,menu_id);
|
show_menu_item_list(url,menu_id);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,14 +7,13 @@ App.checkin = App.cable.subscriptions.create('CheckInBookingChannel', {
|
|||||||
|
|
||||||
received: function(data) {
|
received: function(data) {
|
||||||
var hostname = location.hostname.trim();
|
var hostname = location.hostname.trim();
|
||||||
if(data.from == "" || hostname == data.from)
|
if(data.from == "" || hostname == data.from){
|
||||||
{
|
if($('.table_'+data.table.id).hasClass('green')){
|
||||||
if($('.table_'+data.table.id).hasClass('green')){
|
$('.table_'+data.table.id).removeClass('green');
|
||||||
$('.table_'+data.table.id).removeClass('green');
|
$('.table_'+data.table.id).addClass('blue');
|
||||||
$('.table_'+data.table.id).addClass('blue');
|
}
|
||||||
}
|
$('.new_text_'+data.table.id).removeClass('hide');
|
||||||
$('.new_text_'+data.table.id).removeClass('hide');
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ App.check_new_order = App.cable.subscriptions.create('CheckNewOrderChannel', {
|
|||||||
|
|
||||||
received: function(data) {
|
received: function(data) {
|
||||||
var hostname = location.hostname.trim();
|
var hostname = location.hostname.trim();
|
||||||
if(data.from == "" || hostname == data.from)
|
if(data.from == "" || hostname == data.from){
|
||||||
{
|
|
||||||
var order = data.data;
|
var order = data.data;
|
||||||
var shop_code = data.shop_code;
|
var shop_code = data.shop_code;
|
||||||
if(order.length > 0){
|
if(order.length > 0){
|
||||||
@@ -20,23 +19,24 @@ App.check_new_order = App.cable.subscriptions.create('CheckNewOrderChannel', {
|
|||||||
order_lists += ', ' + value.order_reservation_id;
|
order_lists += ', ' + value.order_reservation_id;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// alert(order_lists);
|
// alert(order_lists);
|
||||||
if (typeof checkNewOrderAlert !== 'undefined' && $.isFunction(checkNewOrderAlert)) {
|
if (typeof checkNewOrderAlert !== 'undefined' && $.isFunction(checkNewOrderAlert)) {
|
||||||
checkNewOrderAlert(shop_code, order_lists);
|
checkNewOrderAlert(shop_code, order_lists);
|
||||||
|
}
|
||||||
|
// $("#notify_new_order_lists").text(order_lists);
|
||||||
|
// if($("#"+shop_code+"_notify_new_order").hasClass("hidden")){
|
||||||
|
// $("#"+shop_code+"_notify_new_order").removeClass("hidden");
|
||||||
|
// }
|
||||||
|
// $("#"+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");
|
||||||
|
// $("#"+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+"_notify_new_order").addClass("hidden");
|
||||||
|
// }).modal({show: true, keyboard: false, backdrop: false});
|
||||||
}
|
}
|
||||||
// $("#notify_new_order_lists").text(order_lists);
|
|
||||||
// if($("#"+shop_code+"_notify_new_order").hasClass("hidden")){
|
|
||||||
// $("#"+shop_code+"_notify_new_order").removeClass("hidden");
|
|
||||||
// }
|
|
||||||
// $("#"+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");
|
|
||||||
// $("#"+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+"_notify_new_order").addClass("hidden");
|
|
||||||
// }).modal({show: true, keyboard: false, backdrop: false});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -40,5 +40,6 @@ App.check_order_ready_to_delivery = App.cable.subscriptions.create('CheckOrderRe
|
|||||||
// }).modal({show: true, keyboard: false, backdrop: false});
|
// }).modal({show: true, keyboard: false, backdrop: false});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -40,5 +40,6 @@ App.check_order_send_to_kitchen = App.cable.subscriptions.create('CheckOrderSend
|
|||||||
// }).modal({show: true, keyboard: false, backdrop: false});
|
// }).modal({show: true, keyboard: false, backdrop: false});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user