From 0121871183dded1fbb4b7a254b3c56eb16324459 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 13 Oct 2014 16:41:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E9=A1=B5=E9=9D=A2=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/messages/_course_show.html.erb | 39 +++++++++++++----------- app/views/messages/_form.html.erb | 18 ++++++++--- 2 files changed, 36 insertions(+), 21 deletions(-) diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index 43a467154..41f2e4736 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -58,7 +58,6 @@ /*border-radius: 10px;*/ } -
<%= render :partial => "/praise_tread/praise_tread",:locals => {:obj => @topic,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%> @@ -132,24 +131,24 @@
<%= link_to( - "引用", - {:action => 'quote', :id => message}, - :remote => true, - :method => 'get', - :title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %> + l(:button_quote), + {:action => 'quote', :id => message}, + :remote => true, + :method => 'get', + :title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %> <%= link_to( - #image_tag('edit.png'), - "编辑", - {:action => 'edit', :id => message}, - :title => l(:button_edit) + #image_tag('edit.png'), + l(:button_edit), + {:action => 'edit', :id => message}, + :title => l(:button_edit) ) if message.course_editable_by?(User.current) %> <%= link_to( - #image_tag('delete.png'), - "删除", - {:action => 'destroy', :id => message}, - :method => :post, - :data => {:confirm => l(:text_are_you_sure)}, - :title => l(:button_delete) + #image_tag('delete.png'), + l(:button_delete), + {:action => 'destroy', :id => message}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete) ) if message.course_destroyable_by?(User.current) %>
@@ -175,10 +174,11 @@ <% end %> <% if !@topic.locked? && authorize_for_course('messages', 'reply') %> @@ -190,4 +190,9 @@ jQuery(document).ready(function($) { transpotUrl('#content'); }); +// function regexContent() +// { +// var content = trim($("#message_content").val()); +// alert(content); +// } \ No newline at end of file diff --git a/app/views/messages/_form.html.erb b/app/views/messages/_form.html.erb index 4eab5658c..d906efea9 100644 --- a/app/views/messages/_form.html.erb +++ b/app/views/messages/_form.html.erb @@ -5,12 +5,22 @@
<% unless replying %> -


+

+ +
<%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :maxlength => 254 %>

<% else %> -


- <%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :readonly => true %> +

+ +
+ <%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :readonly => true %>

<% end %>

@@ -31,7 +41,7 @@

<%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %> - <%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content' %> + <%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content', :onblur => "regexContent();" %>