From f239a3f87c8ba2d053e099e39ecb7440a0d7a4ea Mon Sep 17 00:00:00 2001 From: Aung Myo Date: Thu, 10 May 2018 15:40:56 +0630 Subject: [PATCH] update pdf view height --- app/assets/javascripts/custom.js | 1 + app/assets/stylesheets/origami.scss | 4 +++ app/views/origami/addorders/detail.html.erb | 36 ++++++++++----------- app/views/origami/dashboard/index.html.erb | 1 - app/views/origami/payments/show.html.erb | 16 ++++----- 5 files changed, 30 insertions(+), 28 deletions(-) diff --git a/app/assets/javascripts/custom.js b/app/assets/javascripts/custom.js index ca1bd0b9..94f05663 100644 --- a/app/assets/javascripts/custom.js +++ b/app/assets/javascripts/custom.js @@ -62,6 +62,7 @@ $(document).ready(function() { railBorderRadius: '0', touchScrollStep : 45 }); + // $('.delete').click(function(){ // var method = $(this).attr('data-method'); diff --git a/app/assets/stylesheets/origami.scss b/app/assets/stylesheets/origami.scss index 212c5288..3aadc6a9 100755 --- a/app/assets/stylesheets/origami.scss +++ b/app/assets/stylesheets/origami.scss @@ -452,6 +452,10 @@ iframe { width: 150%; height: 100%; } + +#receipt_pdf { + height: 400px; +} /* End iframe */ /* section class for webview */ diff --git a/app/views/origami/addorders/detail.html.erb b/app/views/origami/addorders/detail.html.erb index 5a9ff8ec..93f7f2a2 100644 --- a/app/views/origami/addorders/detail.html.erb +++ b/app/views/origami/addorders/detail.html.erb @@ -548,19 +548,18 @@ jQuery(function(){ var menus = JSON.parse(localStorage.getItem("menus")); if (menus != null) { - console.log("menu") - id = menus[0]["id"]; + var id = menus[0]["categories"][0]["id"]; + console.log(id); }else{ - id = 1; + var id = 1; } - jQuery('.first_'+id).click(); }); $(document).ready(function () { var menus = JSON.parse(localStorage.getItem("menus")); if (menus != null) { - console.log("menu") + console.log("menu"); menu_cache_append(menus); }else{ $("#menu_data").removeClass("hidden"); @@ -599,27 +598,26 @@ var category = menus[0]["categories"]; for(var ii in category) { - // - if (category[ii]["valid_time"]== true){ - if (category[ii]["parent_id"] == null ){ - if(type){ + if (category[ii]["is_available"]== true){ + if (category[ii]["valid_time"]== true){ + if (category[ii]["parent_id"] == null ){ + if(type){ + if (category[ii]["code"].includes("SPL") != true) { + category_list_template(category[ii]); + } + }else{ + if ($("#table_get_current").text()) { if (category[ii]["code"].includes("SPL") != true) { category_list_template(category[ii]); - } - }else{ - if ($("#table_get_current").text()) { - if (category[ii]["code"].includes("SPL") != true) { - category_list_template(category[ii]); - }else { - category_list_template(category[ii]); - } + }else { + category_list_template(category[ii]); } } } } + } } + } } $(".tables").on('click', function () { diff --git a/app/views/origami/dashboard/index.html.erb b/app/views/origami/dashboard/index.html.erb index 2b5cca1e..4712a481 100644 --- a/app/views/origami/dashboard/index.html.erb +++ b/app/views/origami/dashboard/index.html.erb @@ -208,7 +208,6 @@ " id="server_mode"> \ No newline at end of file +