Pull from master

This commit is contained in:
San Wai Lwin
2018-05-14 16:00:31 +06:30
parent 11bae95ac6
commit 916dbf2cd3
14 changed files with 173 additions and 139 deletions

View File

@@ -1,4 +1,7 @@
<div class="container-fluid">
<div id="loading_wrapper" style="display:none;">
<div id="loading"></div>
</div>
<div class="block-header">
<!-- <h2><%= t :dashboard %></h2> -->
<h2><%= t :date_time %> : <%= Time.zone.now.utc.getlocal.strftime("%Y-%m-%d %I:%M %p") %></h2>
@@ -208,23 +211,32 @@
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
<script>
$(function() {
$( "#loading_wrapper").show();
$.ajax({
type: "GET",
url: 'get_all_menu',
data: {},
success:function(result){
localStorage.setItem("menus", JSON.stringify(result));
var menu = localStorage.getItem("menus");
if (menu != null ) {
$( "#loading_wrapper").hide();
}
}
});
$(".cashier_view").on('click', function() {
window.location.href = '/origami';
});
$(".qs_view").on('click', function() {
if ($('#server_mode').val() != "cloud") {
if ($('#server_mode').val() != "cloud") {
document.getElementById('second_view').click();
}
}
window.location.href = '/origami/quick_service';
});