|
|
|
|
@@ -81,7 +81,7 @@
|
|
|
|
|
|
|
|
|
|
<div class="col-lg-2 col-md-2 col-sm-2 hidden h-100 d-flex flex-column" id="menu_cache">
|
|
|
|
|
<li class="list-menu">
|
|
|
|
|
<a href="javascript:void(0);" class="menu-toggle dropdown-toggle toggled my-toggle " style="">
|
|
|
|
|
<a href="javascript:void(0);" id="menu_dropdown" class="menu-toggle dropdown-toggle toggled my-toggle " style="">
|
|
|
|
|
<span class="main_menu menu_cache_name" id="main_menu menu_cache_name"></span>
|
|
|
|
|
</a>
|
|
|
|
|
<ul class="ml-menu menu_list aria-hidden menu_cache_list" style="border-top: 1px solid #fff">
|
|
|
|
|
@@ -89,9 +89,11 @@
|
|
|
|
|
</li>
|
|
|
|
|
<div id="foodcourt-menu-slimscroll" class="flex-grow-1">
|
|
|
|
|
<ul class="nav nav-tabs flex-column category_list category_cache_list" role="tablist" id="ul-navbar">
|
|
|
|
|
<%if @product%>
|
|
|
|
|
<li class="nav-item product" data-ref="<%= foodcourt_get_all_product_path %>">
|
|
|
|
|
<a class="nav-link" data-toggle="tab" href="" role="tab">Products</a>
|
|
|
|
|
</li>
|
|
|
|
|
<%end%>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -419,10 +421,11 @@ $(document).ready(function () {
|
|
|
|
|
if (window.location.href.indexOf('#') != -1) {
|
|
|
|
|
getAllMenu();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var menus = JSON.parse(localStorage.getItem("menus"));
|
|
|
|
|
if (menus != null) {
|
|
|
|
|
menu_cache_append(menus);
|
|
|
|
|
else{
|
|
|
|
|
var menus = JSON.parse(localStorage.getItem("menus"));
|
|
|
|
|
if (menus != null) {
|
|
|
|
|
menu_cache_append(menus);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(".tables").on('click', function () {
|
|
|
|
|
@@ -483,9 +486,21 @@ function getAllMenu(){
|
|
|
|
|
|
|
|
|
|
function menu_cache_append(menus){
|
|
|
|
|
$("#menu_cache").removeClass("hidden");
|
|
|
|
|
$(".menu_cache_name").text(menus[0]["name"])
|
|
|
|
|
if(menus.length == 1){
|
|
|
|
|
$("#menu_dropdown").remove();
|
|
|
|
|
$(".list-menu").append("<span class='main_menu menu_cache_name' id='main_menu menu_cache_name' style='margin-left:10px;font-weight:bold'>"+menus[0]["name"]+"</span>")
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
$(".menu_cache_name").text(menus[0]["name"])
|
|
|
|
|
}
|
|
|
|
|
for(var i in menus) {
|
|
|
|
|
menu_list_template(menus[i]);
|
|
|
|
|
if (menus[i].categories.length)
|
|
|
|
|
menu_list_template(menus[i]);
|
|
|
|
|
}
|
|
|
|
|
if ( $('.menu_click').length < 2 ) {
|
|
|
|
|
var menu_name = $('.menu_click').data("name");
|
|
|
|
|
$("#menu_dropdown").remove();
|
|
|
|
|
$(".list-menu").append("<span class='main_menu menu_cache_name' id='main_menu menu_cache_name' style='margin-left:10px;font-weight:bold'>"+menu_name+"</span>")
|
|
|
|
|
}
|
|
|
|
|
var category = menus[0]["categories"];
|
|
|
|
|
|
|
|
|
|
@@ -517,7 +532,7 @@ function menu_click_cache_append(name,menus,menu_id) {
|
|
|
|
|
menu_list.empty();
|
|
|
|
|
|
|
|
|
|
var menu_cat = $('.category_list');
|
|
|
|
|
menu_cat.empty();
|
|
|
|
|
$('.category_list li:not(.product)').remove();
|
|
|
|
|
|
|
|
|
|
$(".main_menu").text(name);
|
|
|
|
|
|
|
|
|
|
|