班级作业和讨论区点击回复时回复框获取焦点
This commit is contained in:
parent
b8f9cf6ce2
commit
780f0d22e1
|
|
@ -5,7 +5,7 @@
|
|||
<span id="praise_count_<%=activity.id %>">
|
||||
<%= render :partial => 'praise_tread/edu_praise', :locals => {:activity=>activity, :user_activity_id=>activity.id,:type=>"activity"} %>
|
||||
</span>
|
||||
<a href="javascript:void(0);"><i class="fa fa-comments-o mr5"></i>回复<span class="ml5"><%= count %></span></a>
|
||||
<a href="javascript:void(0);" onclick="editor_focus(<%= activity.id %>);"><i class="fa fa-comments-o mr5"></i>回复<span class="ml5"><%= count %></span></a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="panel-comment_item">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<span id="praise_count_<%=activity.id %>">
|
||||
<%= render :partial => 'praise_tread/edu_praise', :locals => {:activity=>activity, :user_activity_id=>activity.id,:type=>"activity"} %>
|
||||
</span>
|
||||
<a href="javascript:void(0);"><i class="fa fa-comments-o mr5"></i>回复<span class="ml5"><%= count %></span></a>
|
||||
<a href="javascript:void(0);" onclick="editor_focus(<%= activity.id %>);"><i class="fa fa-comments-o mr5"></i>回复<span class="ml5"><%= count %></span></a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="panel-comment_item">
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ function sd_create_editor(params){
|
|||
},
|
||||
afterBlur:function(){
|
||||
//params.toolbar_container.hide();
|
||||
params.textarea.blur();
|
||||
sd_check_editor_form_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
if(this.isEmpty()) {
|
||||
this.edit.html("<span id='hint' style='color:#999999;font-size:12px;'>我要回复</span>");
|
||||
|
|
@ -58,6 +59,7 @@ function sd_create_editor(params){
|
|||
// params.toolbar_container.show();
|
||||
$('#reply_image_' + id).removeClass('imageFuzzy');
|
||||
//edit.iframe.width(paramsWidth);
|
||||
this.resize("100%", null);
|
||||
this.resize(paramsWidth, null);
|
||||
//params.submit_btn.show();
|
||||
},
|
||||
|
|
@ -172,6 +174,9 @@ function sd_create_editor_from_data(id){
|
|||
params.submit_btn.click(function () {
|
||||
params.form.submit();
|
||||
});
|
||||
params.textarea.focus(function (){
|
||||
params.editor.focus();
|
||||
});
|
||||
params.textarea.data('init', 1);
|
||||
$(this).show();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1123,4 +1123,8 @@ function md_clear_data(k,mdu,id){
|
|||
}else{
|
||||
$(id1).html("");
|
||||
}
|
||||
}
|
||||
function editor_focus(id){
|
||||
window.scrollTo(0,document.body.scrollHeight);
|
||||
$("textarea[nhname='new_message_textarea_"+id+"']").focus();
|
||||
}
|
||||
Loading…
Reference in New Issue