diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 2d7bf02b1..d39d8fe3b 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -173,6 +173,12 @@ class StudentWorkController < ApplicationController end if student_work.save + course_activity = CourseActivity.where("course_act_type='HomeworkCommon' and course_act_id =#{@homework.id}").first + course_activity.updated_at = Time.now + course_activity.save + user_activity = UserActivity.where("act_type='HomeworkCommon' and act_id =#{@homework.id}").first + user_activity.updated_at = Time.now + user_activity.save respond_to do |format| format.html { flash[:notice] = l(:notice_successful_create) diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index c725384fd..0c3dd6d8e 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -12,6 +12,12 @@ $("#RSide").removeAttr("id"); $("#Container").css("width","1000px"); }); + + <% if @is_new%> + $(function(){ + $("#homework_name").focus(); + }); + <%end%>
diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 57dab9933..4dd5b0b27 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -91,9 +91,9 @@ <%= link_to "(#{@course.course_activities.count})", course_path(@course), :class => "subnav_num c_orange"%>
-
<%= comment.notes.html_safe %>
+
+ <%= comment.notes.html_safe %>
<% fetch_user_leaveWord_reply(comment).each do |reply| unless fetch_user_leaveWord_reply(comment).nil? %>
@@ -83,7 +84,8 @@ <% end %> <%= format_time reply.created_on %>
-
<%= reply.notes.html_safe %>
+
+ <%= reply.notes.html_safe %>
diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 65bf644bc..8ec605567 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -87,7 +87,7 @@ <% end %> <%= format_time(reply.created_on) %> -
+
<%= reply.content.html_safe %>
diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index f5d570fe0..4b5b73ceb 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -60,7 +60,8 @@ <% end %> <%= format_time(comment.created_on) %> -
<%= comment.comments.html_safe %>
+
+ <%= comment.comments.html_safe %>
diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index bb3c4cb54..2c429a93f 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -97,7 +97,7 @@ <% end %> <%= format_time(reply.created_on) %> -
+
<% if reply.details.any? %> <% details_to_strings(reply.details).each do |string| %>

<%= string %>

@@ -133,17 +133,3 @@
- \ No newline at end of file diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 9be1145ff..ead43d7e4 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -74,7 +74,8 @@ <% end %> <%= format_time(reply.created_on) %> -
<%= reply.content.html_safe %>
+
+ <%= reply.content.html_safe %>
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index ea9c572d9..29752121f 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -37,6 +37,26 @@ $(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}); + }); <% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>