diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index ef16d0c23..5c0120f11 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -71,7 +71,8 @@ $(function () { init_activity_KindEditor_data(<%= topic.id%>, null, "87%"); - var description_images=$("div#activity_description_<%= topic.id %>").find("img"); + showNormalImage('activity_description_<%= 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}); - - var reply_images=$("div#reply_content_<%= topic.id %>").find("img"); - if (reply_images.length>0) { - for (var i=0; i").attr("href",image.attr('src')); - image.wrap(element); - } - } - $('#reply_content_<%= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); + $('#activity_description_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});*/ }); <% if topic %> diff --git a/app/views/courses/_course_activity.html.erb b/app/views/courses/_course_activity.html.erb index 74856197e..aa99236df 100644 --- a/app/views/courses/_course_activity.html.erb +++ b/app/views/courses/_course_activity.html.erb @@ -74,25 +74,7 @@ $(function () { init_activity_KindEditor_data(<%= activity.id%>, null, "87%"); - var description_images=$("div#activity_description_<%= activity.id %>").find("img"); - if (description_images.length>0) { - for (var i=0; i").attr("href",image.attr('src')); - image.wrap(element); - } - } - $('#activity_description_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); - - var reply_images=$("div#reply_content_<%= activity.id %>").find("img"); - if (reply_images.length>0) { - for (var i=0; i").attr("href",image.attr('src')); - image.wrap(element); - } - } - $('#reply_content_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); + showNormalImage('activity_description_<%= activity.id %>'); }); <% if activity && activity.course_act%> diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index 1611bc725..82f94ebfc 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -25,6 +25,7 @@ } $(function() { init_activity_KindEditor_data(<%= @topic.id%>,null,"85%"); + showNormalImage('message_description_<%= @topic.id %>'); });
@@ -73,7 +74,7 @@
<%= format_time( @topic.created_on)%>
-
+
<%= @topic.content.html_safe%>
@@ -97,6 +98,11 @@
<% @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 +115,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) %>