From 22523d25b89c890ee14e03c76b23cb1c10b297eb Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 13 May 2016 14:52:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=B4=E5=90=A7=E5=8F=91=E5=B8=96=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E5=A4=9A=E6=AC=A1=E6=8F=90=E4=BA=A4=E8=A1=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/show.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 2b3772734..61ffb8b10 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -109,11 +109,13 @@ <% end %> }); + var first_click = true; function check_and_submit(){ if(!check_memo_name()){ return; } - if($("textarea[name='memo[subject]']").val().trim() != "" && !memo_content.isEmpty() ){ + if($("textarea[name='memo[subject]']").val().trim() != "" && !memo_content.isEmpty() && first_click){ + first_click = false; memo_content.sync(); $.ajax({ url:'/forums/'+'<%= @forum.id.to_s%>'+'/memos',