diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index 6cd7f75c5..5c0120f11 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -72,7 +72,6 @@ $(function () { init_activity_KindEditor_data(<%= topic.id%>, null, "87%"); 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}); - - 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 8f6af1021..82f94ebfc 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -25,8 +25,7 @@ } $(function() { init_activity_KindEditor_data(<%= @topic.id%>,null,"85%"); - /*showNormalImage('activity_description_<%#= topic.id %>'); - showNormalImage('reply_content_<%#= topic.id %>');*/ + showNormalImage('message_description_<%= @topic.id %>'); });
@@ -99,7 +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) %> diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb index 93e7f0c29..dbf00ea19 100644 --- a/app/views/users/_course_journalsformessage.html.erb +++ b/app/views/users/_course_journalsformessage.html.erb @@ -48,6 +48,11 @@
    <% course.journals_for_messages.where('m_parent_id IS NULL').reorder("created_on desc").each do |comment| %> + <% replies_all_i = replies_all_i + 1 %>
  • @@ -62,9 +67,14 @@ <% end %> <%= format_time(comment.created_on) %>
    -
    +
    <%= comment.notes.html_safe %>
    <% fetch_user_leaveWord_reply(comment).each do |reply| unless fetch_user_leaveWord_reply(comment).nil? %> +
    <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.user_id), :alt => "用户头像" %> @@ -84,7 +94,7 @@ <% end %> <%= format_time reply.created_on %>
    -
    +
    <%= reply.notes.html_safe %>
    diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 7fe15bd1e..7e5882dcd 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -77,6 +77,11 @@
      <% activity.children.reorder("created_on desc").each do |reply|%> + <% replies_all_i=replies_all_i+1 %>
    • @@ -91,7 +96,7 @@ <% end %> <%= format_time(reply.created_on) %>
      -
      +
      <%= reply.content.html_safe %>
      @@ -102,6 +107,7 @@
    <% end %> + <% if !activity.locked? && authorize_for_course('messages', 'reply') %>
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    @@ -121,5 +127,6 @@
    + <% end %>
    diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index c74b43031..11f9f44ed 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -46,6 +46,11 @@
      <% activity.comments.reorder("created_on desc").each do |comment| %> + <% replies_all_i = replies_all_i + 1 %>
    • @@ -60,7 +65,7 @@ <% end %> <%= format_time(comment.created_on) %>
      -
      +
      <%= comment.comments.html_safe %>
      diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 34e840b50..8d0203563 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -83,6 +83,11 @@
        <% activity.journals.reorder("created_on desc").each do |reply| %> + <% replies_all_i=replies_all_i + 1 %>
      • @@ -97,7 +102,7 @@ <% end %> <%= format_time(reply.created_on) %>
        -
        +
        <% if reply.details.any? %> <% details_to_strings(reply.details).each do |string| %>

        <%= string %>

        diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 1d0a5ce8c..0e3c38368 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -60,6 +60,11 @@
          <% activity.children.reorder("created_on desc").each do |reply| %> + <% replies_all_i=replies_all_i+1 %>
        • @@ -74,7 +79,7 @@ <% end %> <%= format_time(reply.created_on) %>
          -
          +
          <%= reply.content.html_safe %>
          diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index dcb6cd9da..042a62ae2 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -37,27 +37,8 @@ } $(function() { - init_activity_KindEditor_data(<%= user_activity.id%>,null,"87%"); - var description_images=$("div#activity_description_<%= user_activity.id %>").find("img"); - if (description_images.length>0) { - for (var i=0; i").attr("href",image.attr('src')); - image.wrap(element); - } - } - $('#activity_description_<%= user_activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); - - var reply_images=$("div#reply_content_<%= user_activity.id %>").find("img"); - if (reply_images.length>0) { - for (var i=0; i").attr("href",image.attr('src')); - image.wrap(element); - } - } - $('#reply_content_<%= user_activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); - + init_activity_KindEditor_data(<%= user_activity.id%>, null, "87%"); + showNormalImage('activity_description_<%= user_activity.id %>'); }); <% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>