Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
18d028bb7e
|
@ -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)
|
||||
|
|
|
@ -12,6 +12,12 @@
|
|||
$("#RSide").removeAttr("id");
|
||||
$("#Container").css("width","1000px");
|
||||
});
|
||||
|
||||
<% if @is_new%>
|
||||
$(function(){
|
||||
$("#homework_name").focus();
|
||||
});
|
||||
<%end%>
|
||||
</script>
|
||||
<style>
|
||||
/*日历选择图*/
|
||||
|
@ -22,7 +28,7 @@
|
|||
.is_public{display: none !important;}
|
||||
.link_file{ background:url(../images/pic_file.png) 0 5px no-repeat !important;}
|
||||
#attachments_fields input.filename{ background:url(../images/pic_file.png) 0 5px no-repeat !important;padding-left:20px !important; color:#64bdd9 !important;}
|
||||
.link_file_a{background:url(../images/pic_file.png) 0 3px no-repeat !important;padding-left:20px !important; color:#64bdd9 !important;}
|
||||
.link_file_a{background:url(../images/pic_file.png) 0 5px no-repeat !important;padding-left:20px !important; color:#64bdd9 !important;}
|
||||
</style>
|
||||
|
||||
<div class="homepageRight mt0 ml10">
|
||||
|
|
|
@ -91,9 +91,9 @@
|
|||
<%= link_to "(#{@course.course_activities.count})", course_path(@course), :class => "subnav_num c_orange"%>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_homework), homework_common_index_path(:course => @course.id,:is_new => 1), :class => "f14 c_blue02"%>
|
||||
<%= link_to l(:label_homework), homework_common_index_path(:course => @course.id), :class => "f14 c_blue02"%>
|
||||
<%= link_to "(#{@course.homework_commons.count})", homework_common_index_path(:course => @course.id), :class => "subnav_num c_orange"%>
|
||||
<%= link_to( "+#{l(:label_course_homework_new)}", "javascript:void(0)", :class => 'subnav_green c_white', :onclick => "new_homework_alert();") if is_teacher %>
|
||||
<%= link_to( "+#{l(:label_course_homework_new)}", homework_common_index_path(:course => @course.id,:is_new => 1), :class => 'subnav_green c_white') if is_teacher %>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_course_news), course_news_index_path(@course), :class => "f14 c_blue02" %>
|
||||
|
|
|
@ -62,7 +62,8 @@
|
|||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img"><%= comment.notes.html_safe %></div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
|
||||
<%= comment.notes.html_safe %></div>
|
||||
<% fetch_user_leaveWord_reply(comment).each do |reply| unless fetch_user_leaveWord_reply(comment).nil? %>
|
||||
<div class="recall">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
|
@ -83,7 +84,8 @@
|
|||
<% end %>
|
||||
<%= format_time reply.created_on %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img"><%= reply.notes.html_safe %></div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
|
||||
<%= reply.notes.html_safe %></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img">
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
|
||||
<%= reply.content.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -60,7 +60,8 @@
|
|||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img"><%= comment.comments.html_safe %></div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
|
||||
<%= comment.comments.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img">
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
|
||||
<% if reply.details.any? %>
|
||||
<% details_to_strings(reply.details).each do |string| %>
|
||||
<p><%= string %></p>
|
||||
|
@ -133,17 +133,3 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var images=$("div#activity_description_<%= user_activity_id %>").find("img");
|
||||
if (images.length>0) {
|
||||
for (var i=0; i<images.length; i++){
|
||||
var image=$(images[i]);
|
||||
var element=$("<a></a>").attr("href",image.attr('src'));
|
||||
image.wrap(element);
|
||||
}
|
||||
}
|
||||
$('#activity_description_<%= user_activity_id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
|
||||
});
|
||||
|
||||
</script>
|
|
@ -74,7 +74,8 @@
|
|||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img"><%= reply.content.html_safe %></div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
|
||||
<%= reply.content.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
@ -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<description_images.length; i++){
|
||||
var image=$(description_images[i]);
|
||||
var element=$("<a></a>").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<reply_images.length; i++){
|
||||
var image=$(reply_images[i]);
|
||||
var element=$("<a></a>").attr("href",image.attr('src'));
|
||||
image.wrap(element);
|
||||
}
|
||||
}
|
||||
$('#reply_content_<%= user_activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
|
||||
|
||||
});
|
||||
</script>
|
||||
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
|
||||
|
|
Loading…
Reference in New Issue