check user agent and token when webview is loaded

This commit is contained in:
phyusin
2018-04-06 15:36:08 +06:30
parent dac1a58b64
commit a2e4863c9d
22 changed files with 119 additions and 45 deletions

View File

@@ -1,7 +1,7 @@
<div class="container-fluid">
<div class="row">
<!-- Column One -->
<div class="col-lg-10 col-md-10 col-sm-10">
<div class="<%= @webview==true ? 'col-lg-12 col-md-12 col-sm-12' : 'col-lg-10 col-md-10 col-sm-10' %>">
<!-- Nav tabs -->
<ul class="nav nav-tabs tab-col-teal" role="tablist">
@@ -116,7 +116,7 @@
</div>
<!-- tabs - End -->
</div>
<div class="col-lg-2 col-md-2 col-sm-2">
<div class="<%= @webview==true ? 'hidden' : 'col-lg-2 col-md-2 col-sm-2' %>">
<!-- <button id="refreshbutton" type="button" class="btn btn-block radius-btn"> Refresh off </button> -->
<button type="button" class="btn btn-block btn-default waves-effect" id='back'>
<i class="material-icons">reply</i>
@@ -141,7 +141,6 @@
$(document).ready(function(){
var webview = <%= @webview %>;
showHideNavbar(webview,"index");
$(".tables").on('click', function(){
var dining_id = $(this).attr("data-id");
window.location.href = '/origami/table/' + dining_id;

View File

@@ -604,6 +604,9 @@
<script>
var cashier_type = "cashier";
$(document).ready(function () {
/* check webview loaded*/
var webview = <%= @webview %>;
showHideNavbar(webview);
/* start check first bill or not*/
var receipt_no = "";
if(($("#receipt_no").html()!=undefined) && ($("#receipt_no").html()!="")){