Merge remote-tracking branch 'origin/szzh' into szzh

This commit is contained in:
lizanle 2015-04-24 09:07:36 +08:00
commit 3e27acf03c
4 changed files with 26 additions and 19 deletions

View File

@ -88,9 +88,9 @@ $(function(){
function f_submit() function f_submit()
{ {
var subject = $("#memo_subject").val(); // var subject = $("#memo_subject").val();
var content = $("#memo_content_1").val(); // var content = $("#memo_content_1").val();
$("#memo_subject").val(subject+""+ content.substr(0,18)); // $("#memo_subject").val(subject+""+ content.substr(0,18)+"...");
$("#new_memo").submit(); $("#new_memo").submit();
} }
@ -137,6 +137,19 @@ function cookieget(n)
durationTime : 600 durationTime : 600
}); });
}); });
$(document).ready(function(){
$("#subject").keydown(function(){
var curLength=$("#subject").val().length;
if(curLength>=50){
var num=$("#subject").val().substr(0,49);
$("#subject").val(num);
}
else{
$("#textCount").text(49-$("#subject").val().length)
}
})
})
</script> </script>
<div class="scrollsidebar" id="scrollsidebar" style="float: right"> <div class="scrollsidebar" id="scrollsidebar" style="float: right">
<div class="side_content"> <div class="side_content">
@ -146,10 +159,11 @@ function cookieget(n)
<div class="custom_service"> <div class="custom_service">
<% get_memo %> <% get_memo %>
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
<%= f.hidden_field :subject,:required => true , :value => l(:label_feedback_value) %> <%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
<%= f.text_area :content,:class => "opnionText",:id=>"memo_content_1" ,:placeholder => l(:label_feedback_tips) %> <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %> <%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a> <label class="c_grey">您还能输入<span id="textCount" class="c_orange">50</span>个字符</label>
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a>
<% end %> <% end %>
</div> </div>
<div class="msgserver"> <div class="msgserver">

View File

@ -13,8 +13,8 @@
<div class="custom_service"> <div class="custom_service">
<% get_memo %> <% get_memo %>
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
<%= f.hidden_field :subject,:required => true , :value => l(:label_feedback_value) %> <%= f.text_area :subject, :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
<%= f.text_area :content,:class => "opnionText" , :placeholder => l(:label_feedback_tips) %> <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"> <a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();">
<%= l(:label_submit)%> <%= l(:label_submit)%>
</a> </a>

View File

@ -354,7 +354,7 @@ zh:
label_feedback_tips: "有什么想说的,尽管来咆哮吧~~" label_feedback_tips: "有什么想说的,尽管来咆哮吧~~"
label_technical_support: "技术支持:" label_technical_support: "技术支持:"
label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!" label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!"
label_feedback_value: "用户反馈" label_feedback_value: "该帖来自用户反馈:)"

View File

@ -54,9 +54,9 @@ $(function(){
function f_submit() function f_submit()
{ {
var subject = $("#memo_subject").val(); // var subject = $("#memo_subject").val();
var content = $("#memo_content_1").val(); // var content = $("#memo_content").val();
$("#memo_subject").val(subject+""+ content.substr(0,18)); // $("#memo_subject").val(subject+""+ content.substr(0,18)+"...");
$("#new_memo").submit(); $("#new_memo").submit();
} }
@ -99,13 +99,6 @@ $(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();
}
$(document).ready(function () { $(document).ready(function () {