Merge branch 'master' of bitbucket.org:code2lab/sxrestaurant into adminbsb_ui_changes

This commit is contained in:
phyusin
2018-05-10 15:51:00 +06:30
6 changed files with 35 additions and 33 deletions

View File

@@ -63,6 +63,7 @@ $(document).ready(function() {
touchScrollStep : 45 touchScrollStep : 45
}); });
// $('.delete').click(function(){ // $('.delete').click(function(){
// var method = $(this).attr('data-method'); // var method = $(this).attr('data-method');
// var url = $(this).attr('data-ref'); // var url = $(this).attr('data-ref');

View File

@@ -452,6 +452,10 @@ iframe {
width: 150%; width: 150%;
height: 100%; height: 100%;
} }
#receipt_pdf {
height: 400px;
}
/* End iframe */ /* End iframe */
/* section class for webview */ /* section class for webview */

View File

@@ -548,19 +548,18 @@
jQuery(function(){ jQuery(function(){
var menus = JSON.parse(localStorage.getItem("menus")); var menus = JSON.parse(localStorage.getItem("menus"));
if (menus != null) { if (menus != null) {
console.log("menu") var id = menus[0]["categories"][0]["id"];
id = menus[0]["id"]; console.log(id);
}else{ }else{
id = 1; var id = 1;
} }
jQuery('.first_'+id).click(); jQuery('.first_'+id).click();
}); });
$(document).ready(function () { $(document).ready(function () {
var menus = JSON.parse(localStorage.getItem("menus")); var menus = JSON.parse(localStorage.getItem("menus"));
if (menus != null) { if (menus != null) {
console.log("menu") console.log("menu");
menu_cache_append(menus); menu_cache_append(menus);
}else{ }else{
$("#menu_data").removeClass("hidden"); $("#menu_data").removeClass("hidden");
@@ -599,9 +598,7 @@
var category = menus[0]["categories"]; var category = menus[0]["categories"];
for(var ii in category) { for(var ii in category) {
// <li class="nav-item product" data-ref="<%= origami_get_all_product_path %>"> if (category[ii]["is_available"]== true){
// <a class="nav-link" data-toggle="tab" href="" role="tab">Products</a>
// </li>
if (category[ii]["valid_time"]== true){ if (category[ii]["valid_time"]== true){
if (category[ii]["parent_id"] == null ){ if (category[ii]["parent_id"] == null ){
if(type){ if(type){
@@ -621,6 +618,7 @@
} }
} }
} }
}
$(".tables").on('click', function () { $(".tables").on('click', function () {
$('.tables').css('background-color',''); $('.tables').css('background-color','');

View File

@@ -208,7 +208,6 @@
<input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode"> <input type="hidden" name="server_mode" value="<%=ENV["SERVER_MODE"]%>" id="server_mode">
<script> <script>
$(function() { $(function() {
console.log(localStorage.getItem("menus"))
$.ajax({ $.ajax({
type: "GET", type: "GET",
url: 'get_all_menu', url: 'get_all_menu',

View File

@@ -429,16 +429,16 @@
</div> </div>
<!-- pdf light box --> <!-- pdf light box -->
<div class="modal fade" id="pdfModal" tabindex="-1" role="dialog"> <div class="modal fade" id="pdfModal" tabindex="-1" role="dialog" >
<div class="modal-dialog modal-md" role="document"> <div class="modal-dialog modal-md " role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title"> <h6 class="modal-title">
<span id="pdfModalLabel"></span> <span id="pdfModalLabel"></span>
<span id="changed_amount" class="p-l-120"></span> <span id="changed_amount" class="p-l-120"></span>
</h4> </h6>
</div> </div>
<div class="modal-body"> <div class="modal-body" style="height: 400px;">
<input type="hidden" name="sale_receipt_no" id="sale_receipt_no"> <input type="hidden" name="sale_receipt_no" id="sale_receipt_no">
<input type="hidden" name="filename" id="filename"> <input type="hidden" name="filename" id="filename">
<input type="hidden" name="printer_name" id="printer_name"> <input type="hidden" name="printer_name" id="printer_name">
@@ -681,8 +681,8 @@ var customer_name = "<%= @customer.name %>";
calculate_member_discount(sale_id); calculate_member_discount(sale_id);
} }
$("#pdfModal").modal({show : true, backdrop : false, keyboard : false}); $("#pdfModal").on('shown.bs.modal', function () {
$('#pdfModal').focus() }).modal({show : true, backdrop : false, keyboard : false});
$.ajax({type: "POST", $.ajax({type: "POST",
url: "<%= origami_payment_cash_path %>", url: "<%= origami_payment_cash_path %>",
data: "cash="+ cash + "&sale_id=" + sale_id + "&type=" + cashier_type, data: "cash="+ cash + "&sale_id=" + sale_id + "&type=" + cashier_type,

View File

@@ -20,11 +20,11 @@ class ActionController::Base
end end
else else
#check for license file #check for license file
# if check_license if check_license
# current_license(ENV["SX_PROVISION_URL"]) current_license(ENV["SX_PROVISION_URL"])
# else else
# redirect_to activate_path redirect_to activate_path
# end end
end end
end end