描述框的自动增高
This commit is contained in:
parent
d42f144f23
commit
e6d4d7d0cb
|
@ -1,8 +1,12 @@
|
|||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<%= javascript_include_tag "des_KindEditor" %>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
init_des_data(150);
|
||||
});
|
||||
function check_org_title()
|
||||
{
|
||||
if($("#document_title").val().trim() == "")
|
||||
|
@ -26,14 +30,14 @@
|
|||
}
|
||||
function cancel_create_org_document(){
|
||||
$("#document_title").val("");
|
||||
org_document_description_editor.html("");
|
||||
org_document_description_editor.sync();
|
||||
//org_document_description_editor.html("");
|
||||
//org_document_description_editor.sync();
|
||||
$('#org_document_editor').hide();
|
||||
$('#doc_title_hint').hide();
|
||||
}
|
||||
</script>
|
||||
<%= form_tag organization_org_document_comments_path(:organization_id => @organization.id), :id => 'new_org_document_form' do |f| %>
|
||||
<div class="resources">
|
||||
<div class="resources" nhname="new_topic_form">
|
||||
<%= form_tag organization_org_document_comments_path(:organization_id => @organization.id), :id => 'new_org_document_form' do |f| %>
|
||||
<div>
|
||||
<input class="postDetailInput fl" maxlength="250" name="org_document_comment[title]" id="document_title" style="resize:none;" onfocus = "$('#org_document_editor').show();" placeholder="请输入文章标题" />
|
||||
</div>
|
||||
|
@ -41,10 +45,10 @@
|
|||
<div class="cl"></div>
|
||||
<div id="org_document_editor" class="mt10" style="display: none">
|
||||
<div>
|
||||
<%= kindeditor_tag 'org_document_comment[content]','', :editor_id => 'org_document_description_editor', :height => "150px" %>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='description_textarea' name="org_document_comment[content]"></textarea>
|
||||
<%#= kindeditor_tag 'org_document_comment[content]','', :editor_id => 'org_document_description_editor', :height => "150px" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<p id="homework_course_id_span" class="c_red mt5"></p>
|
||||
<div class="cl"></div>
|
||||
<div class="mt10">
|
||||
|
@ -54,12 +58,11 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt5">
|
||||
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="create_org_document();">确定</a>
|
||||
<a href="javascript:void(0);" class="BlueCirBtnMini fr" id="new_topic_submit_btn">确定</a>
|
||||
<span class="fr mr10 mt3">或</span>
|
||||
<a href="javascript:void(0);" onclick="cancel_create_org_document();" class="fr mr10 mt3">取消</a>
|
||||
<a href="javascript:void(0);" id="new_topic_cancel_btn" class="fr mr10 mt3">取消</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -31,7 +31,7 @@
|
|||
</div>
|
||||
<div id="doc_title_hint"></div>
|
||||
<div class="cl"></div>
|
||||
<div id="org_document_editor" >
|
||||
<div>
|
||||
<div class="mt10">
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='description_textarea' name="org_document_comment[content]"><%=@org_document.content.html_safe %></textarea>
|
||||
<%#= kindeditor_tag 'org_document_comment[content]','', :editor_id => 'org_document_description_editor', :height => "150px" %>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</div>
|
||||
<div id="doc_title_hint">
|
||||
</div>
|
||||
<div id="org_document_editor" class="mt15" >
|
||||
<div class="mt15" >
|
||||
<div class="mt10">
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='description_textarea' name="org_document_comment[content]"></textarea>
|
||||
<%#= kindeditor_tag 'org_document_comment[content]','', :editor_id => 'org_document_description_editor', :height => "150px" %>
|
||||
|
|
|
@ -90,7 +90,9 @@ function init_form(params){
|
|||
}
|
||||
function nh_reset_form(params){
|
||||
params.form[0].reset();
|
||||
params.texttitle.empty();
|
||||
$("#document_title").val("");
|
||||
$('#org_document_editor').hide();
|
||||
$('#doc_title_hint').hide();
|
||||
params.textarea.empty();
|
||||
if(params.editor != undefined){
|
||||
params.editor.html(params.textarea.html());
|
||||
|
@ -133,4 +135,8 @@ function init_des_data(){
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
div_form = $("div[nhname='new_topic_form']");
|
||||
$(".ke-edit", div_form).css("height","150px");
|
||||
$(".ke-edit-iframe",div_form).css("height","150px");
|
||||
}
|
Loading…
Reference in New Issue