课程和项目意见反馈

This commit is contained in:
whimlex 2015-04-24 14:47:50 +08:00
parent 138fff1bf5
commit 650ffd4397
2 changed files with 17 additions and 2 deletions

View File

@ -13,8 +13,9 @@
<div class="custom_service">
<% 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.text_area :subject, :id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
<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>

View File

@ -110,4 +110,18 @@ $(document).ready(function () {
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);
}
})
})