From 719d5637c2d1ea819bcd1e10a17169b7f466378c Mon Sep 17 00:00:00 2001 From: Myat Zin Wai Maw Date: Thu, 12 Sep 2019 11:03:25 +0630 Subject: [PATCH] button disabled --- Gemfile.lock | 8 +++----- app/views/origami/home/show.html.erb | 1 + app/views/origami/payments/show.html.erb | 3 +++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4c36f330..f8bb0d6c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -114,10 +114,10 @@ GEM concurrent-ruby (~> 1.0) jbuilder (2.9.1) activesupport (>= 4.2.0) - jquery-fileupload-rails (1.0.0) + jquery-fileupload-rails (0.4.7) actionpack (>= 3.1) railties (>= 3.1) - sassc + sass (>= 3.2) jquery-rails (4.3.5) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) @@ -251,8 +251,6 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sassc (2.2.0) - ffi (~> 1.9) schema_to_scaffold (0.8.0) activesupport (>= 3.2.1) shoulda-matchers (3.1.3) @@ -332,7 +330,7 @@ DEPENDENCIES font-awesome-rails (~> 4.7, >= 4.7.0.2) httparty (~> 0.15.5) jbuilder (~> 2.5) - jquery-fileupload-rails + jquery-fileupload-rails (~> 0.4.7) jquery-rails jquery-ui-rails kaminari (~> 1.0.1) diff --git a/app/views/origami/home/show.html.erb b/app/views/origami/home/show.html.erb index ffcf0efb..e8074fe2 100755 --- a/app/views/origami/home/show.html.erb +++ b/app/views/origami/home/show.html.erb @@ -1265,6 +1265,7 @@ closeOnConfirm: false }, function (isConfirm) { if (isConfirm) { + $('.confirm').prop("disabled",true); var sale_id = $("#sale_id").val();//"<%= @obj_sale.sale_id rescue "" %>" var ajax_url = "/origami/sale/" + sale_id + '/cashier/void'; var remark = $("#remark").val(); diff --git a/app/views/origami/payments/show.html.erb b/app/views/origami/payments/show.html.erb index ab62eb7e..a40f7f58 100755 --- a/app/views/origami/payments/show.html.erb +++ b/app/views/origami/payments/show.html.erb @@ -1511,6 +1511,7 @@ $(document).ready(function(){ closeOnConfirm: false }, function (isConfirm) { if (isConfirm) { + $('.confirm').prop("disabled",true); $.ajax({ type: "POST", url: "/origami/payment/"+cashier_type+"/foc", @@ -1558,6 +1559,7 @@ $(document).ready(function(){ closeOnConfirm: false }, function (isConfirm) { if (isConfirm) { + $('.confirm').prop("disabled",true); var sale_id = $('#sale_id').text(); var remark = $("#remark").val(); var ajax_url = "/origami/sale/" + sale_id +'/'+cashier_type+ '/void'; @@ -1602,6 +1604,7 @@ $(document).ready(function(){ closeOnConfirm: false }, function (isConfirm) { if (isConfirm) { + $('.confirm').prop("disabled",true); var url = "/origami/sale/" + sale_id +'/'+cashier_type+'/waste_and_spoilage'; $.ajax({ type: 'POST',