From 21f08830df33ddc6a6117765bcbf860e6f48d879 Mon Sep 17 00:00:00 2001 From: whimlex Date: Wed, 22 Apr 2015 14:35:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=84=8F=E8=A7=81=E5=8F=8D=E9=A6=88=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_feedback.html.erb | 7 +++++-- app/views/layouts/_new_feedback.html.erb | 4 ++-- config/locales/commons/en.yml | 2 +- config/locales/commons/zh.yml | 2 +- public/javascripts/feedback.js | 3 +++ 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index 19892e841..7105aff47 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -114,6 +114,9 @@ $(function(){ function f_submit() { + var subject = $("#memo_subject").val(); + var content = $("#memo_content_1").val(); + $("#memo_subject").val(subject+":"+ content.substr(0,18)); $("#new_memo").submit(); } @@ -166,8 +169,8 @@ function cookieget(n)
<% get_memo %> <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> - <%= f.text_area :subject, :class => "opnionText", :placeholder => l(:label_feedback_tips) %> - <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %> + <%= f.hidden_field :subject,:required => true , :value => l(:label_feedback_value) %> + <%= f.text_area :content,:class => "opnionText",:id=>"memo_content_1" ,:placeholder => l(:label_feedback_tips) %> <%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %> <%= l(:label_submit)%> <% end %> diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index 32afb4e5c..e30181612 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -13,8 +13,8 @@
<% get_memo %> <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> - <%= f.text_area :subject, :class => "opnionText", :placeholder => l(:label_feedback_tips) %> - <%= f.hidden_field :content, :required => true , :value => l(:label_feedback_value) %> + <%= f.hidden_field :subject,:required => true , :value => l(:label_feedback_value) %> + <%= f.text_area :content,:class => "opnionText" , :placeholder => l(:label_feedback_tips) %> <%= l(:label_submit)%> diff --git a/config/locales/commons/en.yml b/config/locales/commons/en.yml index 3c2c63654..5eb92f07e 100644 --- a/config/locales/commons/en.yml +++ b/config/locales/commons/en.yml @@ -347,7 +347,7 @@ en: label_feedback_tips: "Anything you want to say, roar it here ~~" label_technical_support: "Support: " label_feedback_success: "Your comments have been sent to the public bar in the home page, thanks for your support!" - label_feedback_value: "The post comes from user feedback box!" + label_feedback_value: "User feedback" # # diff --git a/config/locales/commons/zh.yml b/config/locales/commons/zh.yml index dae2a9741..c20e5799b 100644 --- a/config/locales/commons/zh.yml +++ b/config/locales/commons/zh.yml @@ -354,7 +354,7 @@ zh: label_feedback_tips: "有什么想说的,尽管来咆哮吧~~" label_technical_support: "技术支持:" label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!" - label_feedback_value: "该贴来自用户反馈!" + label_feedback_value: "用户意见反馈" diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js index 7ed063b75..a3707b312 100644 --- a/public/javascripts/feedback.js +++ b/public/javascripts/feedback.js @@ -82,5 +82,8 @@ $(function(){ function f_submit() { + var subject = $("#memo_subject").val(); + var content = $("#memo_content").val(); + $("#memo_subject").val(subject+":"+ content.substr(0,18)); $("#new_memo").submit(); } \ No newline at end of file