From a16dc09afa291bc51b7d8683f45a0ce6bc44bac4 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 16 Oct 2015 09:26:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E5=B8=96?= =?UTF-8?q?=E5=AD=90=E5=9B=BE=E7=89=87=E5=8F=AF=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_course_show.html.erb | 10 ++++++---- app/views/messages/_course_show.html.erb | 9 +++++++-- public/javascripts/application.js | 13 +++++++++++++ 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index ef16d0c23..6cd7f75c5 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -71,7 +71,9 @@ $(function () { init_activity_KindEditor_data(<%= topic.id%>, null, "87%"); - var description_images=$("div#activity_description_<%= topic.id %>").find("img"); + showNormalImage('activity_description_<%= topic.id %>'); + //showNormalImage('reply_content_<%#= topic.id %>'); + /*var description_images=$("div#activity_description_<%#= topic.id %>").find("img"); if (description_images.length>0) { for (var i=0; i a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); + $('#activity_description_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); - var reply_images=$("div#reply_content_<%= topic.id %>").find("img"); + var reply_images=$("div#reply_content_<%#= topic.id %>").find("img"); if (reply_images.length>0) { for (var i=0; i a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); + $('#reply_content_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});*/ }); <% if topic %> diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index 1611bc725..8f6af1021 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -25,6 +25,8 @@ } $(function() { init_activity_KindEditor_data(<%= @topic.id%>,null,"85%"); + /*showNormalImage('activity_description_<%#= topic.id %>'); + showNormalImage('reply_content_<%#= topic.id %>');*/ });
@@ -73,7 +75,7 @@
<%= format_time( @topic.created_on)%>
-
+
<%= @topic.content.html_safe%>
@@ -97,6 +99,7 @@
<% @replies.each_with_index do |reply,i| %> +
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %> @@ -109,7 +112,9 @@ <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <% end %>
-
<%= reply.content.html_safe%>
+
+ <%= reply.content.html_safe%> +
<%= format_time(reply.created_on) %>