From 8323422f099d4a8184da312d30219a3d3b144108 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 6 May 2016 21:19:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E7=95=99=E8=A8=80=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E5=88=99=E4=B8=8D=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_show_newstyle.html.erb | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/app/views/sub_document_comments/_show_newstyle.html.erb b/app/views/sub_document_comments/_show_newstyle.html.erb index e71cf35cc..8b0f8c533 100644 --- a/app/views/sub_document_comments/_show_newstyle.html.erb +++ b/app/views/sub_document_comments/_show_newstyle.html.erb @@ -19,11 +19,12 @@

留言板<%= count %>条留言

<%= form_for :org_comment, :url => {:action => 'add_reply_in_doc',:controller => 'sub_document_comments', :id => @document.id, :flag => true}, :html => {:multipart => true, :id => 'message_form', :class => "sn-reply-form", } do |f| %> - + <%#= f.kindeditor :sub_content,:width=>'99%',:height => '100px;',:editor_id=>'message_content_editor', :class => "sn-reply-text" %>
- <%= link_to l(:button_reply), "javascript:void(0)", :onclick => "$('#message_form').submit();", :class => "submit-btn" %> + 发表
+ <%#= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'message_content_editor.html("");', :class => " grey_btn fr c_white mt10 mr5" %> <% end %> @@ -81,4 +82,30 @@ target.eq(2).show(); } } + + //验证搜索时输入字 + function regexName_submain(content) { + var name = $.trim($("#name").val()); + if (name.length == 0) { + $("#project_name_span").text(content); + $("#project_name_span").css('color', '#ff0000'); + $("#project_name_span").focus(); + return false; + } + else { + $("#project_name_span").text(""); + return true; + } + } + + function org_new_files_upload(){ + var name = $.trim($("#text_submain").val()); +// content = $("#text_submain").val(); + if (name.length == 0) { + $("#sub_domain_reply").show(); + } + else { + $("#message_form").submit(); + } + } \ No newline at end of file