Merge branch 'settings_backend' of bitbucket.org:code2lab/sxrestaurant
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<div class="container-fluid" style="min-height:30px; padding-left:0px !important; padding-right:0px !important; background:#54A5AF; margin-bottom:5px">
|
<div class="container-fluid" style="min-height:30px; padding-left:0px !important; padding-right:0px !important; background:#54A5AF; margin-bottom:5px">
|
||||||
<div style="padding-top:5px;padding-bottom:5px;margin-left:15px; margin-right:15px;">
|
<div style="padding-top:5px;padding-bottom:5px;margin-left:15px; margin-right:15px;">
|
||||||
<div style="float:left;margin-top:3px;text-align:left;color:#ffffff">
|
<div style="float:left;margin-top:3px;text-align:left;color:#ffffff">
|
||||||
<strong>Cashier Station 1 - <%= Time.now.strftime('%a, %d %b %Y %H:%M:%S %p') %></strong>
|
<strong>Cashier Station 1 - <span id="clockbox"></span></strong>
|
||||||
</div>
|
</div>
|
||||||
<div style="float:right; margin-top:3px; text-align:right;width:200px;color:#ffffff">
|
<div style="float:right; margin-top:3px; text-align:right;width:200px;color:#ffffff">
|
||||||
<% if current_login_employee %>
|
<% if current_login_employee %>
|
||||||
@@ -10,3 +10,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
tday=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
|
||||||
|
tmonth=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
|
||||||
|
|
||||||
|
function GetClock(){
|
||||||
|
var d=new Date();
|
||||||
|
var nday=d.getDay(),nmonth=d.getMonth(),ndate=d.getDate(),nyear=d.getFullYear();
|
||||||
|
var nhour=d.getHours(),nmin=d.getMinutes(),nsec=d.getSeconds(),ap;
|
||||||
|
|
||||||
|
if(nhour==0){ap=" AM";nhour=12;}
|
||||||
|
else if(nhour<12){ap=" AM";}
|
||||||
|
else if(nhour==12){ap=" PM";}
|
||||||
|
else if(nhour>12){ap=" PM";nhour-=12;}
|
||||||
|
|
||||||
|
if(nmin<=9) nmin="0"+nmin;
|
||||||
|
if(nsec<=9) nsec="0"+nsec;
|
||||||
|
|
||||||
|
document.getElementById('clockbox').innerHTML=""+tday[nday]+", "+tmonth[nmonth]+" "+ndate+", "+nyear+" "+nhour+":"+nmin+":"+nsec+ap+"";
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onload=function(){
|
||||||
|
GetClock();
|
||||||
|
setInterval(GetClock,1000);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<div id="clockbox"></div>
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
<!-- tabs - End -->
|
<!-- tabs - End -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-1 col-md-1 col-sm-1">
|
<div class="col-lg-1 col-md-1 col-sm-1">
|
||||||
<button type="button" class="btn btn-primary btn-block"> Refresh </button>
|
<button id="refreshbutton" type="button" class="btn btn-block" style="border-radius:5px;color:#fff;background-color:red;"> Refresh off </button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Column One -->
|
<!-- Column One -->
|
||||||
@@ -117,4 +117,70 @@ $(document).ready(function(){
|
|||||||
window.location.href = '/origami/order/' + order_id;
|
window.location.href = '/origami/order/' + order_id;
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
$(function() {
|
||||||
|
var timer;
|
||||||
|
|
||||||
|
function start() {
|
||||||
|
timer = setTimeout(function() { console.log("refresh");window.location.reload()}, 30000); //10000
|
||||||
|
};
|
||||||
|
|
||||||
|
function stop() {
|
||||||
|
clearTimeout(timer);
|
||||||
|
};
|
||||||
|
|
||||||
|
if(localStorage.getItem("refreshflag") != null){
|
||||||
|
if (localStorage.getItem("refreshflag") == 0) {
|
||||||
|
$('#refreshbutton').html("Refresh off");
|
||||||
|
$('#refreshbutton').css("background-color","red");
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$('#refreshbutton').html("Refresh on");
|
||||||
|
$('#refreshbutton').css("background-color","green");
|
||||||
|
start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
localStorage.setItem("refreshflag", 0);
|
||||||
|
}
|
||||||
|
var url = location.href;
|
||||||
|
if (location.href.slice(-1) == "/"){
|
||||||
|
url = url.substring(0, url.length - 1);
|
||||||
|
}
|
||||||
|
var arr = url.split("/");
|
||||||
|
|
||||||
|
if(arr[arr.length-1] != "origami"){
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
$('#refreshbutton').bind("click", function(){
|
||||||
|
if(localStorage.getItem("refreshflag") == "0"){
|
||||||
|
localStorage.setItem("refreshflag", 1);
|
||||||
|
$(this).html("Refresh on");
|
||||||
|
$(this).css("background-color","green");
|
||||||
|
// $(this).html("Auto Refresh on<span class='glyphicon glyphicon-ok'></span>");
|
||||||
|
start();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
stop();
|
||||||
|
localStorage.setItem("refreshflag", 0);
|
||||||
|
$(this).html("Refresh off");
|
||||||
|
$(this).css("background-color","red");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function refreshing(){
|
||||||
|
if(localStorage.getItem("refreshflag") == "0"){
|
||||||
|
localStorage.setItem("refreshflag", 1);
|
||||||
|
$(this).html("Refresh on");
|
||||||
|
$(this).css("background-color","green");
|
||||||
|
// $(this).html("Auto Refresh on<span class='glyphicon glyphicon-ok'></span>");
|
||||||
|
start();
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
stop();
|
||||||
|
localStorage.setItem("refreshflag", 0);
|
||||||
|
$(this).html("Refresh off");
|
||||||
|
$(this).css("background-color","red");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ $(document).on('click', '.cashier_number', function(event){
|
|||||||
case 'del' :
|
case 'del' :
|
||||||
var cash=$('#amount').text();
|
var cash=$('#amount').text();
|
||||||
$('#amount').text(cash.substr(0,cash.length-1));
|
$('#amount').text(cash.substr(0,cash.length-1));
|
||||||
|
break;
|
||||||
case 'nett':
|
case 'nett':
|
||||||
var remain_amount = $('#validamount').val();
|
var remain_amount = $('#validamount').val();
|
||||||
$('#amount').text(remain_amount);
|
$('#amount').text(remain_amount);
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ $(document).on('click', '.cashier_number', function(event){
|
|||||||
case 'del' :
|
case 'del' :
|
||||||
var cash=$('#amount').text();
|
var cash=$('#amount').text();
|
||||||
$('#amount').text(cash.substr(0,cash.length-1));
|
$('#amount').text(cash.substr(0,cash.length-1));
|
||||||
|
break;
|
||||||
case 'nett':
|
case 'nett':
|
||||||
var remain_amount = $('#validamount').val();
|
var remain_amount = $('#validamount').val();
|
||||||
$('#amount').text(remain_amount);
|
$('#amount').text(remain_amount);
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ $(document).on('click', '.cashier_number', function(event){
|
|||||||
case 'del' :
|
case 'del' :
|
||||||
var cash=$('#amount').text();
|
var cash=$('#amount').text();
|
||||||
$('#amount').text(cash.substr(0,cash.length-1));
|
$('#amount').text(cash.substr(0,cash.length-1));
|
||||||
|
break;
|
||||||
case 'nett':
|
case 'nett':
|
||||||
var remain_amount = $('#validamount').val();
|
var remain_amount = $('#validamount').val();
|
||||||
$('#amount').text(remain_amount);
|
$('#amount').text(remain_amount);
|
||||||
|
|||||||
@@ -106,14 +106,14 @@
|
|||||||
<div class="col-md-4" id="others"><%= @other %></div>
|
<div class="col-md-4" id="others"><%= @other %></div>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="row payment other-payment-color" id="card_payment" >
|
<div class="row payment other-payment-color" id="card_payment" style="line-height:30px;height: 30px;margin-bottom: 0px;" >
|
||||||
<div class="col-md-12">Other Payments</div>
|
<div class="col-md-12">Other Payments</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!-- mpu -->
|
<!-- mpu -->
|
||||||
<% if @other != 0.0 %>
|
<% if @other != 0.0 %>
|
||||||
<div class="row payment other-payment-color" >
|
<div class="row payment other-payment-color" style="line-height:30px;height: 30px;margin-bottom: 0px;">
|
||||||
<div class="col-md-5"></div>
|
<div class="col-md-5"></div>
|
||||||
<div class="col-md-3">MPU</div>
|
<div class="col-md-3">MPU</div>
|
||||||
<div class="col-md-4" id="others"><%= @other %></div>
|
<div class="col-md-4" id="others"><%= @other %></div>
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<!-- paypar -->
|
<!-- paypar -->
|
||||||
<% if @ppamount != 0.0 %>
|
<% if @ppamount != 0.0 %>
|
||||||
<div class="row">
|
<div class="row payment other-payment-color" style="line-height:30px;height: 30px;margin-bottom: 0px;">
|
||||||
<div class="col-md-5"></div>
|
<div class="col-md-5"></div>
|
||||||
<div class="col-md-3">Paypar</div>
|
<div class="col-md-3">Paypar</div>
|
||||||
<div class="col-md-4" id="ppamount"><%= @ppamount %></div>
|
<div class="col-md-4" id="ppamount"><%= @ppamount %></div>
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<!-- Visa -->
|
<!-- Visa -->
|
||||||
<% if @visacount != 0.0 %>
|
<% if @visacount != 0.0 %>
|
||||||
<div class="row">
|
<div class="row payment other-payment-color" style="line-height:30px;height: 30px;margin-bottom: 0px;">
|
||||||
<div class="col-md-5"></div>
|
<div class="col-md-5"></div>
|
||||||
<div class="col-md-3">Visa</div>
|
<div class="col-md-3">Visa</div>
|
||||||
<div class="col-md-4" id="visacount"><%= @visacount %></div>
|
<div class="col-md-4" id="visacount"><%= @visacount %></div>
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<!-- JCB -->
|
<!-- JCB -->
|
||||||
<% if @jcbcount != 0.0 %>
|
<% if @jcbcount != 0.0 %>
|
||||||
<div class="row">
|
<div class="row payment other-payment-color" style="line-height:30px;height: 30px;margin-bottom: 0px;">
|
||||||
<div class="col-md-5"></div>
|
<div class="col-md-5"></div>
|
||||||
<div class="col-md-3">JCB</div>
|
<div class="col-md-3">JCB</div>
|
||||||
<div class="col-md-4" id="jcbcount"><%= @jcbcount %></div>
|
<div class="col-md-4" id="jcbcount"><%= @jcbcount %></div>
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<!-- Master -->
|
<!-- Master -->
|
||||||
<% if @mastercount != 0.0 %>
|
<% if @mastercount != 0.0 %>
|
||||||
<div class="row">
|
<div class="row payment other-payment-color" style="line-height:30px;height: 30px;margin-bottom: 0px;">
|
||||||
<div class="col-md-5"></div>
|
<div class="col-md-5"></div>
|
||||||
<div class="col-md-3">Master</div>
|
<div class="col-md-3">Master</div>
|
||||||
<div class="col-md-4" id="mastercount"><%= @mastercount %></div>
|
<div class="col-md-4" id="mastercount"><%= @mastercount %></div>
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ $(document).on('click', '.cashier_number', function(event){
|
|||||||
case 'del' :
|
case 'del' :
|
||||||
var cash=$('#used_amount').text();
|
var cash=$('#used_amount').text();
|
||||||
$('#used_amount').text(cash.substr(0,cash.length-1));
|
$('#used_amount').text(cash.substr(0,cash.length-1));
|
||||||
|
break;
|
||||||
case 'nett':
|
case 'nett':
|
||||||
alert($('#valid_amount').text())
|
alert($('#valid_amount').text())
|
||||||
$('#used_amount').text($('#valid_amount').text());
|
$('#used_amount').text($('#valid_amount').text());
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ $(document).on('click', '.cashier_number', function(event){
|
|||||||
case 'del' :
|
case 'del' :
|
||||||
var cash=$('#amount').text();
|
var cash=$('#amount').text();
|
||||||
$('#amount').text(cash.substr(0,cash.length-1));
|
$('#amount').text(cash.substr(0,cash.length-1));
|
||||||
|
break;
|
||||||
case 'nett':
|
case 'nett':
|
||||||
var remain_amount = $('#validamount').val();
|
var remain_amount = $('#validamount').val();
|
||||||
$('#amount').text(remain_amount);
|
$('#amount').text(remain_amount);
|
||||||
|
|||||||
Reference in New Issue
Block a user