update cache menu

This commit is contained in:
Aung Myo
2018-05-08 15:47:11 +06:30
parent be9218dd79
commit 2d73e63e7b
12 changed files with 634 additions and 248 deletions

View File

@@ -207,6 +207,16 @@
<button type="button" data-href="<%=origami_second_display_index_path%>" target="_blank" id="second_view" class="btn action-btn bg-blue waves-effect second_view hidden" style="height: 45px">Customer View</button>
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
<script>
$(function() {
localStorage.removeItem("menus");
$.ajax({
type: "GET",
url: 'get_all_menu',
data: {},
success:function(result){
localStorage.setItem("menus", JSON.stringify(result));
}
});
$(".cashier_view").on('click', function() {
window.location.href = '/origami';
@@ -223,9 +233,9 @@
window.location.href = '/origami/order_reservation';
});
$("#second_view").on('click', function () {
$("#second_view").on('click', function () {
var url = $(this).attr("data-href");
window.open(url,'_blank');
});
});
</script>