留言提交之后清除编辑框内容

This commit is contained in:
yutao 2015-06-12 17:26:40 +08:00
parent 5ac4d2afe3
commit ab64b38cee
3 changed files with 8 additions and 0 deletions

View File

@ -213,9 +213,13 @@
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
params.cancel_btn = $("#new_message_cancel_btn");
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
init_form(params);
params.cancel_btn.click(function(){
nh_reset_form(params);
});
// $("a[nhname='cancel_btn']",params.div_form).click(function(){
// nh_reset_form(params);
// });

View File

@ -57,6 +57,7 @@
<p nhname="contentmsg"></p>
<div style="padding-top:5px;float:left;" nhname="toolbar_container"></div>
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-top: 5px;"%>
<a href="javascript:;" id="new_message_cancel_btn" style="display:none;"></a>
<%else %>
<div style="font-size: 14px;margin:10px;">
<%= l(:label_user_login_tips) %>

View File

@ -3,4 +3,7 @@ $('#history').html('<%= escape_javascript(render(:partial => 'users/history',:lo
$('#jour_count').html('<%= @obj_count%>')
$('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
$('#new_form_user_message').val("");
if($('#new_message_cancel_btn') != undefined && $('#new_message_cancel_btn').length!=0){
$('#new_message_cancel_btn').click();
}
$('#new_form_reference_user_id').val("");