socialforge/app/views/org_document_comments/new.html.erb

56 lines
1.9 KiB
Plaintext
Raw Normal View History

2015-12-06 15:03:36 +08:00
<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
<% end %>
2015-11-12 09:32:00 +08:00
<script>
2015-12-09 09:23:22 +08:00
function check_org_title()
{
if($("#document_title").val().trim() == "")
{
$("#doc_title_hint").html("<span class='c_red'>标题不能为空</span>").show();
return false;
}
else
{
$("#doc_title_hint").hide();
return true;
}
}
function create_org_document()
{
if(check_org_title() == true)
{
org_document_description_editor.sync();
$('#new_org_document_form').submit();
}
}
function cancel_create_org_document(){
location.href = document.referrer;
2015-12-09 09:23:22 +08:00
}
2015-11-12 09:32:00 +08:00
</script>
2015-12-09 09:23:22 +08:00
<%= form_tag organization_org_document_comments_path(:organization_id => @organization.id, :field_id => params[:field_id]), :id => 'new_org_document_form' do |f| %>
2015-11-12 09:32:00 +08:00
<div class="resources">
<div>
<textarea class="postDetailInput fl mr15" style="margin-bottom:15px;" name="org_document_comment[title]" id="document_title" style="resize:none;" onfocus = "$('#org_document_editor').show();" placeholder="请输入文章标题"></textarea>
2015-11-12 09:32:00 +08:00
</div>
<div id="doc_title_hint"></div>
2015-12-09 09:23:22 +08:00
<div id="org_document_editor" class="mt15" >
2015-11-12 09:32:00 +08:00
<div class="mt10">
<%= 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="mt5">
2015-12-09 09:23:22 +08:00
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick="create_org_document();">确定</a>
2015-11-12 09:32:00 +08:00
<span class="fr mr10 mt3">或</span>
<a href="javascript:void(0);" onclick="cancel_create_org_document();" class="fr mr10 mt3">取消</a>
2015-11-12 09:32:00 +08:00
<div class="cl"></div>
</div>
</div>
</div>
<% end %>