Merge branch 'cxt_course' of https://git.trustie.net/jacknudt/trustieforge into cxt_course

This commit is contained in:
huang 2016-05-27 15:30:19 +08:00
commit 5e2a4342fa
88 changed files with 497 additions and 431 deletions

View File

@ -68,7 +68,7 @@ class AtController < ApplicationController
end end
def find_project(id) def find_project(id)
return [] if id<0 return [] if id.to_i<0
at_persons = Project.find(id).users at_persons = Project.find(id).users
at_persons.delete_if { |u| u.id == User.current.id } at_persons.delete_if { |u| u.id == User.current.id }
end end

View File

@ -341,7 +341,7 @@ class CoursesController < ApplicationController
def export_course_member_excel def export_course_member_excel
@all_members = student_homework_score(0,0,0,"desc") @all_members = student_homework_score(0,0,0,"desc")
@homeworks = @course.homework_commons.order("created_at asc") @homeworks = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("created_at asc")
filename="#{@course.teacher.lastname.to_s + @course.teacher.firstname.to_s }_#{@course.name}_#{@course.time.to_s + @course.term}#{l(:excel_member_list)}"; filename="#{@course.teacher.lastname.to_s + @course.teacher.firstname.to_s }_#{@course.name}_#{@course.time.to_s + @course.term}#{l(:excel_member_list)}";
respond_to do |format| respond_to do |format|

View File

@ -14,6 +14,7 @@ class HomeworkCommonController < ApplicationController
#unless params[:page] #unless params[:page]
# update_homework_time(@course.homework_commons) # update_homework_time(@course.homework_commons)
#end #end
search = "%#{params[:search].to_s.strip.downcase}%"
@new_homework = HomeworkCommon.new @new_homework = HomeworkCommon.new
@new_homework.homework_detail_manual = HomeworkDetailManual.new @new_homework.homework_detail_manual = HomeworkDetailManual.new
@new_homework.course = @course @new_homework.course = @course
@ -21,10 +22,10 @@ class HomeworkCommonController < ApplicationController
@is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) @is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course))
if @is_teacher if @is_teacher
#@homeworks = @course.homework_commons.order("created_at desc").limit(10).offset(@page * 10) #@homeworks = @course.homework_commons.order("created_at desc").limit(10).offset(@page * 10)
@homework_commons = @course.homework_commons.order("created_at desc") @homework_commons = @course.homework_commons.where("name like '%#{search}%'").order("created_at desc")
else else
#@homeworks = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("created_at desc").limit(10).offset(@page * 10) #@homeworks = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("created_at desc").limit(10).offset(@page * 10)
@homework_commons = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("created_at desc") @homework_commons = @course.homework_commons.where("name like '%#{search}%' and publish_time <= '#{Date.today}'").order("created_at desc")
end end
@is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher)) @is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher))
@is_new = params[:is_new] @is_new = params[:is_new]

View File

@ -102,13 +102,15 @@ class OrgDocumentCommentsController < ApplicationController
end end
def destroy def destroy
@org_document_comment = OrgDocumentComment.find(params[:id]) @org_document_comment = SubDocumentComment.find(params[:id])
org = @org_document_comment.organization @sub_domain = @org_document_comment.sub_domain
if @org_document_comment.id == org.home_id @org_subfield = @sub_domain.org_subfield
org.update_attributes(:home_id => nil) # org = @org_document_comment.organization
end # if @org_document_comment.id == org.home_id
if @org_document_comment.destroy # org.update_attributes(:home_id => nil)
end # end
@org_document_comment.destroy
# end
respond_to do |format| respond_to do |format|
format.js format.js
end end

View File

@ -25,14 +25,14 @@ class PraiseTreadController < ApplicationController
return return
end end
@horizontal = params[:horizontal].downcase == "false" ? false:true if params[:horizontal] @horizontal = params[:horizontal].downcase == "false" ? false:true if params[:horizontal]
if @obj.respond_to?("author_id") # if @obj.respond_to?("author_id")
author_id = @obj.author_id # author_id = @obj.author_id
elsif @obj.respond_to?("user_id") # elsif @obj.respond_to?("user_id")
author_id = @obj.user_id # author_id = @obj.user_id
end # end
unless author_id == User.current.id # unless author_id == User.current.id
praise_tread_plus(@obj_type,@obj_id,1) praise_tread_plus(@obj_type,@obj_id,1)
end # end
respond_to do |format| respond_to do |format|
format.js format.js
end end

View File

@ -374,8 +374,9 @@ class StudentWorkController < ApplicationController
end end
end end
################################################################################################################## ##################################################################################################################
@order,@b_sort,@name,@group = params[:order] || "score",params[:sort] || "desc",params[:name] || "",params[:group] @order,@b_sort,@name,@group = params[:order] || "score",params[:sort] || "desc",params[:name].to_s.strip || "",params[:group]
@homework_commons = @course.homework_commons.where("publish_time <= ?",Time.now.strftime("%Y-%m-%d")).order("created_at desc") @homework_commons = @course.homework_commons.where("publish_time <= ?",Time.now.strftime("%Y-%m-%d")).order("created_at desc")
@all_homework_commons = @course.homework_commons.order("created_at desc")
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin? @is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
@is_evaluation = @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评 @is_evaluation = @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评
@show_all = false @show_all = false

View File

@ -727,21 +727,21 @@ class UsersController < ApplicationController
end end
def show_homework_detail def show_homework_detail
homework = HomeworkCommon.find params[:homework].to_i @homework = HomeworkCommon.find params[:homework].to_i
if homework.course.is_public == 0 && !User.current.allowed_to?(:as_teacher,homework.course) && User.current != homework.user # if homework.course.is_public == 0 && !User.current.allowed_to?(:as_teacher,homework.course) && User.current != homework.user
ah = ApplyHomework.where("user_id = ? and homework_common_id = ?", User.current.id, params[:homework].to_i) # ah = ApplyHomework.where("user_id = ? and homework_common_id = ?", User.current.id, params[:homework].to_i)
if ah.empty? # if ah.empty?
@status = 2 # @status = 2
@homework = nil # @homework = nil
elsif ah.first.status != 2 # elsif ah.first.status != 2
@status = ah.first.status # @status = ah.first.status
@homework = nil # @homework = nil
elsif ah.first.status == 2 # elsif ah.first.status == 2
@homework = homework # @homework = homework
end # end
else # else
@homework = homework # @homework = homework
end # end
@is_import = params[:is_import] @is_import = params[:is_import]
respond_to do |format| respond_to do |format|
format.js format.js
@ -2705,7 +2705,7 @@ class UsersController < ApplicationController
# 获取公共资源搜索 # 获取公共资源搜索
def get_public_resources_search user_course_ids, user_project_ids, order, score, search def get_public_resources_search user_course_ids, user_project_ids, order, score, search
attachments = Attachment.where("is_publish = 1 and is_public = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course') and (filename like :p)" ,:p => search).order("#{order.nil? ? 'created_on' : order} #{score}") attachments = Attachment.where("is_publish = 1 and is_public = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course') and (filename like :p)", :p => search).order("#{order.nil? ? 'created_on' : order} #{score}")
end end
# 获取我的资源 # 获取我的资源
@ -2816,7 +2816,7 @@ class UsersController < ApplicationController
# 获取我的用户类型资源 # 获取我的用户类型资源
def get_principal_resources_public order, score def get_principal_resources_public order, score
attchments = Attachment.where("container_type = 'Principal'and container_id is not null").order("#{order.nil? ? 'created_on' : order} #{score}") attchments = Attachment.where("container_type = 'Principal' and container_id is not null").order("#{order.nil? ? 'created_on' : order} #{score}")
end end
# 获取我的用户类型资源 # 获取我的用户类型资源

View File

@ -49,6 +49,21 @@ module ApplicationHelper
return result return result
end end
# 判断某个资源是否可以申请
def attach_show_allow attach_id
attachment = Attachment.find(attach_id)
case attachment.container_type
when "Project"
User.current.member_of?(attachment.container) ? true : false
when "Course"
User.current.member_of_course?(attachment.container) ? true : false
when "OrgSubfield"
User.current.member_of_org?(attachment.container) ? true : false
when "Principal"
User.current.id == attachment.author_id ? true : false
end
end
# Time 2015-03-24 15:27:29 # Time 2015-03-24 15:27:29
# Author lizanle # Author lizanle
# Description 从硬盘上删除对应的资源文件 # Description 从硬盘上删除对应的资源文件

View File

@ -174,7 +174,7 @@ class News < ActiveRecord::Base
if count == 0 if count == 0
ws = WechatService.new ws = WechatService.new
content = strip_html self.author.try(:realname) + " 发布了通知:" + self.title.html_safe, 200 content = strip_html self.author.try(:realname) + " 发布了通知:" + self.title.html_safe, 200
ws.message_update_template m.user_id, "course_notice", self.id, "#{l(:label_new_notice_template)}", self.author.try(:realname) + " 发布了通知:" + content, format_time(self.created_on) ws.message_update_template m.user_id, "course_notice", self.id, "#{l(:label_new_notice_template)}", content, format_time(self.created_on)
end end
end end
end end

View File

@ -122,11 +122,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=@article.id %>"> <span id="praise_count_<%=@article.id %>">
<% if @article.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(@article) > 0 ? "#{get_praise_num(@article)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@article, :user_activity_id=>@article.id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>@article, :user_activity_id=>@article.id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"></div> <div class="homepagePostReplyBannerTime"></div>
@ -141,6 +137,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -161,12 +158,8 @@
<div style="margin-top: -7px; margin-bottom: 5px"> <div style="margin-top: -7px; margin-bottom: 5px">
<%= format_time(reply.created_on) %> <%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>"> <span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span> </span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span>
<div class="fr mr10" id="reply_edit_menu_<%= reply.id%>" style="display: none"> <div class="fr mr10" id="reply_edit_menu_<%= reply.id%>" style="display: none">
<%= link_to( <%= link_to(
l(:button_reply), l(:button_reply),
@ -215,5 +208,6 @@
var postContent = $("#message_description_<%= @article.id %>").html(); var postContent = $("#message_description_<%= @article.id %>").html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#message_description_<%= @article.id %>").html(postContent); $("#message_description_<%= @article.id %>").html(postContent);
autoUrl('message_description_<%= @article.id %>');
}); });
</script> </script>

View File

@ -23,6 +23,9 @@
<div class="ping_disfoot f14"> <div class="ping_disfoot f14">
<% ids = 'project_respond_form_'+ journal.id.to_s%> <% ids = 'project_respond_form_'+ journal.id.to_s%>
<span id="reply_praise_count_<%=journal.id %>">
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>journal, :user_activity_id=>journal.id,:type=>"reply"}%>
</span>
<% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %> <% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %>
<%= link_to(l(:label_bid_respond_delete), <%= link_to(l(:label_bid_respond_delete),
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},

View File

@ -22,9 +22,9 @@
<div class="st_box"> <div class="st_box">
<ul class="st_box_top"> <ul class="st_box_top">
<li class="ml50" style="padding-right: 5px;"><a href="">姓名</a></li> <li class="ml50" style="padding-right: 5px;"><span class="fontGrey6 fb">姓名</span></li>
<li class="ml10" style="padding-right: 15px;"><a href="">学号</a></li> <li class="ml10" style="padding-right: 15px;"><span class="fontGrey6 fb">学号</span></li>
<li style="padding-right: 55px; margin-left: 160px;"><a href="">分班</a></li> <li style="padding-right: 55px; margin-left: 160px;"><span class="fontGrey6 fb">分班</span></li>
<li class="st_list_score ml10"> <li class="st_list_score ml10">
<%= link_to '作业积分', member_score_sort_course_path(:sort_type => 'score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true, :class => 'ml25'%> <%= link_to '作业积分', member_score_sort_course_path(:sort_type => 'score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true, :class => 'ml25'%>
<% if @sort_type == "score" && @score_sort_by == 'desc' %> <% if @sort_type == "score" && @score_sort_by == 'desc' %>
@ -41,7 +41,7 @@
<a id="pic" href="javascript:" class= "st_up"></a> <a id="pic" href="javascript:" class= "st_up"></a>
<% end %> <% end %>
</li> </li>
<li class="ml20"><a href="javascript:void(0)" >加入时间</a></li> <li class="ml20"><span class="fontGrey6 fb">加入时间</span></li>
</ul> </ul>
<div class="cl"></div><!--st_box_top end--> <div class="cl"></div><!--st_box_top end-->

View File

@ -8,19 +8,19 @@
.tscore_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; text-align: center; padding-top:5px;} .tscore_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; text-align: center; padding-top:5px;}
.tscore_box{ width:350px; margin:15px auto;} .tscore_box{ width:370px; margin:15px auto;}
.tscore_box li{ height:25px;} .tscore_box li{ height:25px;}
</style> </style>
<div class="tscore_con" id="user_score"> <div class="tscore_con" id="user_score">
<h2><%= @member_score.user.name %> 历次作业积分</h2> <h2><%= @member_score.user.name %> 历次作业积分</h2>
<ul class="tscore_box"> <ul class="tscore_box" style="max-height: 400px; overflow: auto;">
<li ><span class="c_blue02 w280">作业名称</span><span class="c_blue02 w70">得分</span></li> <li ><span class="c_blue02 w280">作业名称</span><span class="c_blue02 w70">得分</span></li>
<% @member_score.homework_common_list.each do |homework_common| %> <% @member_score.homework_common_list.each_with_index do |homework_common, index| %>
<li> <li>
<span class="c_grey02 w280 hiddent"> <span class="c_grey02 w280 hiddent">
<%= homework_common.name %> 作业<%=index + 1 %><%= homework_common.name %>
</span> </span>
<span class="c_red w70"> <span class="c_red w70">
<% final_score = @member_score.homework_common_score(homework_common).first%> <% final_score = @member_score.homework_common_score(homework_common).first%>

View File

@ -120,6 +120,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -214,5 +215,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @article.id %>');
}); });
</script> </script>

View File

@ -17,7 +17,7 @@
</div>--> </div>-->
<%#= select_tag(:student_work_in_group,options_for_select(course_group_list(@course),@group), {:class => "classSplit"}) unless course_group_list(@course).empty? %> <%#= select_tag(:student_work_in_group,options_for_select(course_group_list(@course),@group), {:class => "classSplit"}) unless course_group_list(@course).empty? %>
<%# end%> <%# end%>
<span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_show" style="display: none">[ 显示测验信息 ]</a> </span> <span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_show" onclick="show_or_hide_info();" style="display: none">[ 显示测验信息 ]</a> </span>
</div> </div>
<div class="cl"></div> <div class="cl"></div>

View File

@ -17,7 +17,7 @@
</div>--> </div>-->
<%#= select_tag(:student_work_in_group,options_for_select(course_group_list(@course),@group), {:class => "classSplit"}) unless course_group_list(@course).empty? %> <%#= select_tag(:student_work_in_group,options_for_select(course_group_list(@course),@group), {:class => "classSplit"}) unless course_group_list(@course).empty? %>
<%# end%> <%# end%>
<span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_show" style="display: none">[ 显示测验信息 ]</a> </span> <span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_show" onclick="show_or_hide_info();" style="display: none">[ 显示测验信息 ]</a> </span>
</div> </div>
<div class="cl"></div> <div class="cl"></div>

View File

@ -15,46 +15,23 @@
</th> </th>
</tr> </tr>
<% @exercise_users_list.each do |exercise|%> <% @exercise_users_list.each_with_index do |exercise, index|%>
<script type="text/javascript">
$(".student_work_<%= exercise.id%>").mouseenter(function(){
$("#work_click_<%= exercise.id%>").show();
}).mouseleave(function(){
$("#work_click_<%= exercise.id%>").hide();
});
$(function(){
<% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %>
$("#show_student_result_div_<%= exercise.id%>").on('click',function() {
window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user_id) %>';
});
<% else %>
$("#show_student_result_div_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_id_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
<% end %>
});
/*function show_result(id) {
window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>';
}*/
</script>
<tr class="hworkListRow" id="student_work_<%= exercise.id%>"> <tr class="hworkListRow" id="student_work_<%= exercise.id%>">
<td class="pl5 pr5" style="width:28px; text-align:center;">1</td> <td class="pl5 pr5" style="width:28px; text-align:center;"><%=index + 1 %></td>
<td class="hworkPortrait pr10 float-none"> <td class="hworkPortrait pr10 float-none">
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;", :class => "mt15"),user_activities_path(exercise.user)) %> <%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;", :class => "mt15"),user_activities_path(exercise.user)) %>
</td> </td>
<td class="hworkStName" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;"> <td class="hworkStName student_work_<%= exercise.id%>" title="姓名" id="student_name_<%= exercise.id%>" style="cursor:pointer;">
<%=exercise.user.show_name %> <%=exercise.user.show_name %>
</td> </td>
<td class="hworkStID pl15 pr10 float-none" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;"> <td class="hworkStID student_work_<%= exercise.id%> pl15 pr10 float-none" title="学号" id="student_id_<%= exercise.id%>" style="cursor:pointer;">
<span class="hidden fl" style="width:80px;"><%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%></span> <span class="hidden fl" style="width:80px;"><%= exercise.user.user_extensions.nil? ? "--" : exercise.user.user_extensions.student_id%></span>
</td> </td>
<td class="hworkStID float-none" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;"> <td class="hworkStID student_work_<%= exercise.id%> float-none" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;">
-- --
</td> </td>
<td width="200">&nbsp;</td> <td width="200">&nbsp;</td>
<td class="hworkList130 c_grey student_work_<%= exercise.id%>"> <td class="hworkList130 c_grey">
<% if exercise.created_at%> <% if exercise.created_at%>
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>&nbsp; <%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>&nbsp;
<% if @exercise.end_time <= exercise.created_at %> <% if @exercise.end_time <= exercise.created_at %>
@ -67,5 +44,29 @@
</td> </td>
<td><div style="position:relative;"><div class="hworkTip" style="display: none" id="work_click_<%= exercise.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></div></div></td> <td><div style="position:relative;"><div class="hworkTip" style="display: none" id="work_click_<%= exercise.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></div></div></td>
</tr> </tr>
<% end%>
<script type="text/javascript">
$(".student_work_<%= exercise.id%>").mouseenter(function(){
$("#work_click_<%= exercise.id%>").show();
}).mouseleave(function(){
$("#work_click_<%= exercise.id%>").hide();
}).mouse;
$(function(){
<% if Time.parse(h(@exercise.end_time)).strftime("%Y-%m-%d-%H-%M-%S") <= Time.now.strftime("%Y-%m-%d-%H-%M-%S") %>
$("#student_name_<%= exercise.id%>,#student_id_<%= exercise.id%>,#student_class_<%= exercise.id%>").on('click',function() {
window.location.href = '<%=show_student_result_exercise_path(@exercise,:user_id => exercise.user_id) %>';
});
<% else %>
//$("#show_student_result_div_<%#= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_name_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_id_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
$("#student_class_<%= exercise.id%>").attr("title","截止日期未到,暂不能查看学生答题结果");
<% end %>
});
/*function show_result(id) {
window.location.href = '<%#=show_student_result_exercise_path(@exercise,:user_id => exercise.user.id) %>';
}*/
</script>
<% end%>
</table> </table>

View File

@ -5,8 +5,14 @@
$("#Container").css("width","1000px"); $("#Container").css("width","1000px");
}); });
function show_or_hide_info(){
$("#homeworkInformation").toggle();
$("#homework_info_hidden").toggle();
$("#homework_info_show").toggle();
}
$(function(){ $(function(){
$("#homework_info_hidden").click(function(){ /*$("#homework_info_hidden").click(function(){
$("#homeworkInformation").hide(); $("#homeworkInformation").hide();
$("#homework_info_hidden").hide(); $("#homework_info_hidden").hide();
$("#homework_info_show").show(); $("#homework_info_show").show();
@ -15,7 +21,7 @@
$("#homework_info_show").hide(); $("#homework_info_show").hide();
$("#homeworkInformation").show(); $("#homeworkInformation").show();
$("#homework_info_hidden").show(); $("#homework_info_hidden").show();
}); });*/
if($("#homework_description").height() > 54) { if($("#homework_description").height() > 54) {
$("#homeworkDetailShow").show(); $("#homeworkDetailShow").show();
@ -88,7 +94,7 @@
<% elsif @exercise.exercise_status == 3 %> <% elsif @exercise.exercise_status == 3 %>
<span class="grey_homework_btn_cir ml5">已截止</span> <span class="grey_homework_btn_cir ml5">已截止</span>
<% end%> <% end%>
<span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_hidden">[ 隐藏测验信息 ]</a> </span> <span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" onclick="show_or_hide_info();" id="homework_info_hidden">[ 隐藏测验信息 ]</a> </span>
<div class="cl"></div> <div class="cl"></div>
<div class="fontGrey2 db mb5">发布者:<%= @exercise.user.show_name %></div> <div class="fontGrey2 db mb5">发布者:<%= @exercise.user.show_name %></div>
<div class="homeworkDetail upload_img break_word list_style max_h54" id="homeworkDetail"> <div class="homeworkDetail upload_img break_word list_style max_h54" id="homeworkDetail">

View File

@ -1,6 +1,12 @@
<div style="padding-top: 10px"> <div style="padding-top: 10px">
<% if memos.any? %> <% if memos.any? %>
<% memos.each do |topic| %> <% memos.each do |topic| %>
<script type="text/javascript">
$(function(){
showNormalImage('postDetailDes_<%= topic.id %>');
autoUrl('postDetailDes_<%= topic.id %>');
});
</script>
<div class="postDetailRow"> <div class="postDetailRow">
<div class="postDetailPortrait"> <div class="postDetailPortrait">
<!--<img src="images/homepageImage.jpg" width="50" height="50" alt="贴吧图片" /></a>--> <!--<img src="images/homepageImage.jpg" width="50" height="50" alt="贴吧图片" /></a>-->
@ -16,7 +22,7 @@
<a href="javascript:void(0);" class="linkGrey2 disablePostLikeIcon ml10 mt20" style="cursor: default" title="点赞人数" > <%= get_praise_num(topic)%></a> <a href="javascript:void(0);" class="linkGrey2 disablePostLikeIcon ml10 mt20" style="cursor: default" title="点赞人数" > <%= get_praise_num(topic)%></a>
</div> </div>
<div class="postDetailDes"><%= topic.content.html_safe%> <div class="postDetailDes" id = "postDetailDes_<%= topic.id %>"><%= topic.content.html_safe%>
<!--<a href="javascript:void(0);" class="linkBlue2 underline ml8">显示全部</a>--> <!--<a href="javascript:void(0);" class="linkBlue2 underline ml8">显示全部</a>-->
</div> </div>
<% author = topic.last_reply.try(:author)%> <% author = topic.last_reply.try(:author)%>

View File

@ -0,0 +1,8 @@
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => homework_commons,:page => 0,:is_in_course => 1,:course_id => course_id} %>
<div style="width:210px; text-align:center; margin:0 auto;">
<ul class="wlist" style=" border:none; display:inline-block; float:none; margin-top:10px;">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<div class="cl"></div>
</div>

View File

@ -1,4 +1,4 @@
<%= form_tag( url_for(:controller => 'courses',:action => 'homework_search',:id=>course.id), <%= form_tag( homework_common_index_url_in_org(course.id),
:remote=>true ,:method => 'get',:class=>'resourcesSearchloadBox',:id=>'resource_search_form') do %> :remote=>true ,:method => 'get',:class=>'resourcesSearchloadBox',:id=>'resource_search_form') do %>
<input type="text" name="search" placeholder="输入作业名称进行搜索" class="searchResource" /> <input type="text" name="search" placeholder="输入作业名称进行搜索" class="searchResource" />
<%= submit_tag '',:class=>'homepageSearchIcon',:onfocus=>'this.blur();',:style=>'border-style:none' %> <%= submit_tag '',:class=>'homepageSearchIcon',:onfocus=>'this.blur();',:style=>'border-style:none' %>

View File

@ -71,13 +71,8 @@
<% end%> <% end%>
</div><!----HomeWork end--> </div><!----HomeWork end-->
<% end%> <% end%>
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homeworks,:page => 0,:is_in_course => 1,:course_id => @course.id} %> <div id="homework_index_list">
<%= render :partial => 'homework_common/homework_index_list', :locals => {:homework_commons => @homeworks,:course_id => @course.id} %>
<div style="width:210px; text-align:center; margin:0 auto;">
<ul class="wlist" style=" border:none; display:inline-block; float:none; margin-top:10px;">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<div class="cl"></div>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>

View File

@ -1 +1,4 @@
$("#user_show_more_homework").replaceWith("<%= escape_javascript( render :partial => 'users/user_homework_list',:locals => {:homework_commons => @homeworks, :page => @page, :is_in_course => 1,:course_id => @course.id} )%>"); /*
$("#user_show_more_homework").replaceWith("<%#= escape_javascript( render :partial => 'users/user_homework_list',:locals => {:homework_commons => @homeworks, :page => @page, :is_in_course => 1,:course_id => @course.id} )%>");*/
$("#homework_index_list").html("<%=escape_javascript(render :partial => 'homework_common/homework_index_list', :locals => {:homework_commons => @homeworks,:course_id => @course.id}) %>");

View File

@ -28,7 +28,7 @@
<%= render :partial => 'action_menu' %> <%= render :partial => 'action_menu' %>
<div class="cl"></div> <div class="cl"></div>
<% if @issue.description? || @issue.attachments.any? -%> <% if @issue.description? || @issue.attachments.any? -%>
<div class="talk_info mb10 issue_desc" style="word-break:break-all;"> <div class="talk_info mb10 issue_desc" id="issue_desc_<%= @issue.id %>" style="word-break:break-all;">
<% if @issue.description? %> <% if @issue.description? %>
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %> <%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %> <%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
@ -44,3 +44,10 @@
<%= render :partial => 'issues/attributes_show' %> <%= render :partial => 'issues/attributes_show' %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<script type="text/javascript">
$(function(){
showNormalImage('issue_desc_<%= @issue.id %>');
autoUrl('issue_desc_<%= @issue.id %>');
});
</script>

View File

@ -3,6 +3,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i + 1 %> <% replies_all_i=replies_all_i + 1 %>

View File

@ -20,9 +20,9 @@
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div > <div >
<a class="pr_info_name fl c_dark fb break_word" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank"></a> <a class="pr_info_name fl c_dark fb" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank"></a>
<div> <div>
<a class="pr_info_name c_dark fb break_word fl" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank"> <a class="pr_info_name c_dark fb fl" href="http://<%= Setting.host_course%>/courses/<%= @course.id%>" target="_blank">
<%= @course.name %> <%= @course.name %>
</a> </a>
<span id="course_outline_bar"> <span id="course_outline_bar">

View File

@ -99,7 +99,7 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$("#activity_description_<%= reply.id %> p,#activity_description__<%= reply.id %> span,#activity_description_<%= reply.id %> em").each(function(){ $("#activity_description_<%= reply.id %> p,#activity_description_<%= reply.id %> span,#activity_description_<%= reply.id %> em").each(function(){
var postContent = $(this).html(); var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
postContent= postContent.replace(/ {2}/g,"&nbsp; "); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
@ -107,6 +107,7 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('activity_description_<%= reply.id %>');
description_show_hide(<%= reply.id %>); description_show_hide(<%= reply.id %>);
}); });
</script> </script>
@ -147,6 +148,7 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('activity_description_<%= @memo.id %>');
description_show_hide(<%= @memo.id %>); description_show_hide(<%= @memo.id %>);
}); });
</script> </script>

View File

@ -95,11 +95,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= @reply_count>0 ? "#{@reply_count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= @reply_count>0 ? "#{@reply_count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=@topic.id %>"> <span id="praise_count_<%=@topic.id %>">
<% if @topic.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(@topic) > 0 ? "#{get_praise_num(@topic)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@topic, :user_activity_id=>@topic.id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>@topic, :user_activity_id=>@topic.id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
</div> </div>
@ -109,6 +105,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -130,11 +127,7 @@
<%= format_time(reply.created_on) %> <%= format_time(reply.created_on) %>
<div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none"> <div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none">
<span id="reply_praise_count_<%=reply.id %>"> <span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<span class="fr newsGrey" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span> </span>
<%= link_to( <%= link_to(
l(:button_reply), l(:button_reply),
@ -188,5 +181,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @topic.id %>');
}); });
</script> </script>

View File

@ -138,6 +138,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -210,5 +211,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @topic.id %>');
}); });
</script> </script>

View File

@ -151,11 +151,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= @reply_count>0 ? "#{@reply_count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= @reply_count>0 ? "#{@reply_count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=@topic.id %>"> <span id="praise_count_<%=@topic.id %>">
<% if @topic.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>@topic, :user_activity_id=>@topic.id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(@topic) > 0 ? "#{get_praise_num(@topic)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@topic, :user_activity_id=>@topic.id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
</div> </div>
@ -165,6 +161,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -186,11 +183,7 @@
<%= format_time(reply.created_on) %> <%= format_time(reply.created_on) %>
<div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none"> <div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none">
<span id="reply_praise_count_<%=reply.id %>"> <span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<span class="fr newsGrey" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span> </span>
<%= link_to( <%= link_to(
l(:button_reply), l(:button_reply),
@ -245,5 +238,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @topic.id %>');
}); });
</script> </script>

View File

@ -101,11 +101,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= @comments.count>0 ? "#{@comments.count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= @comments.count>0 ? "#{@comments.count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=@news.id %>"> <span id="praise_count_<%=@news.id %>">
<% if @news.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>@news, :user_activity_id=>@news.id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(@news) > 0 ? "#{get_praise_num(@news)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@news, :user_activity_id=>@news.id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
</div> </div>
@ -115,6 +111,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -136,11 +133,7 @@
<%= format_time(reply.created_on) %> <%= format_time(reply.created_on) %>
<div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none"> <div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none">
<span id="reply_praise_count_<%=reply.id %>"> <span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<span class="fr newsGrey" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span> </span>
<%= link_to_if_authorized_course( <%= link_to_if_authorized_course(
l(:button_delete), l(:button_delete),
@ -210,5 +203,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @news.id %>');
}); });
</script> </script>

View File

@ -97,6 +97,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -185,5 +186,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @news.id %>');
}); });
</script> </script>

View File

@ -107,6 +107,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -195,5 +196,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @news.id %>');
}); });
</script> </script>

View File

@ -1,6 +1,6 @@
//location.reload(); //location.reload();
<% if params[:detail_page] %> <% if params[:detail_page] %>
window.location.href = '<%= organization_org_document_comments_path(:organization_id => @org_document_comment.root.organization_id)%>'; window.location.href = '<%= org_subfield_sub_domain_sub_document_comments_path(:org_subfield_id => @org_subfield.id, :sub_domain_id => @sub_domain.id)%>';
<% else %> <% else %>
window.location.reload(); window.location.reload();
<% end %> <% end %>

View File

@ -71,11 +71,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=@document.id %>"> <span id="praise_count_<%=@document.id %>">
<% if @document.creator_id.to_i == User.current.id.to_i %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>@document, :user_activity_id=>@document.id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(@document) > 0 ? "#{get_praise_num(@document)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@document, :user_activity_id=>@document.id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
</div> </div>
@ -84,6 +80,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<% user = User.find(reply.creator_id) %> <% user = User.find(reply.creator_id) %>
@ -99,11 +96,7 @@
<div style="margin-top: -7px; margin-bottom: 5px"> <div style="margin-top: -7px; margin-bottom: 5px">
<%= format_time(reply.created_at) %> <%= format_time(reply.created_at) %>
<span id="reply_praise_count_<%=reply.id %>"> <span id="reply_praise_count_<%=reply.id %>">
<% if reply.creator_id.to_i == User.current.id.to_i %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span> </span>
<div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none"> <div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none">
<%= link_to( <%= link_to(
@ -158,6 +151,7 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('intro_content_<%= @document.id %>');
}); });
function expand_reply(container, btnid) { function expand_reply(container, btnid) {
var target = $(container); var target = $(container);

View File

@ -290,12 +290,8 @@
<span class="reply_iconup" > ︿</span> <span class="reply_iconup" > ︿</span>
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.user == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> </span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span>
</div> </div>
<div class="homepagePostReplyBannerTime"></div> <div class="homepagePostReplyBannerTime"></div>
<%if count>3 %> <%if count>3 %>
@ -315,6 +311,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
@ -358,11 +355,7 @@
<div class="reply"> <div class="reply">
<span class="reply-right"> <span class="reply-right">
<span id="reply_praise_count_<%=comment.id %>"> <span id="reply_praise_count_<%=comment.id %>">
<% if comment.user == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
</span> </span>
<span style="position: relative" class="fr mr20"> <span style="position: relative" class="fr mr20">
<%= link_to( <%= link_to(

View File

@ -74,11 +74,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div> <div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
@ -100,6 +96,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>
@ -116,11 +113,7 @@
<% end %> <% end %>
<%= format_time(reply.created_on) %> <%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>"> <span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">

View File

@ -44,12 +44,8 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> </span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span>
</div> </div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div> <div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
<%if count>3 %> <%if count>3 %>
@ -69,6 +65,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
@ -85,11 +82,7 @@
<% end %> <% end %>
<%= format_time(comment.created_on) %> <%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>"> <span id="reply_praise_count_<%=comment.id %>">
<% if comment.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">

View File

@ -1,6 +1,6 @@
<% members.each do |member|%> <% members.each do |member|%>
<ul class="orgListRow"> <ul class="orgListRow">
<li class="orgListUser"><a href="<%= user_url_in_org(member.user_id) %>" class="linkBlue"><%= User.find(member.user_id).realname.blank? ? User.find(member.user_id).login : User.find(member.user_id).realname %></a></li> <li class="orgListUser hidden"><a href="<%= user_url_in_org(member.user_id) %>" class="linkBlue"><%= User.find(member.user_id).realname.blank? ? User.find(member.user_id).login : User.find(member.user_id).realname %></a></li>
<li class="orgListRole"> <li class="orgListRole">
<%= get_org_member_role_name member %> <%= get_org_member_role_name member %>
<%= form_for(member, {:as => :org_member, :remote => true, :url => Setting.protocol + "://" + Setting.host_name + "/org_member/" + member.id.to_s, <%= form_for(member, {:as => :org_member, :remote => true, :url => Setting.protocol + "://" + Setting.host_name + "/org_member/" + member.id.to_s,

View File

@ -55,11 +55,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div> <div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
@ -80,6 +76,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i + 1 %> <% replies_all_i=replies_all_i + 1 %>
@ -96,11 +93,7 @@
<% end %> <% end %>
<%= format_time(reply.created_on) %> <%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>"> <span id="reply_praise_count_<%=reply.id %>">
<% if reply.user == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">

View File

@ -84,11 +84,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<%if count>3 %> <%if count>3 %>
@ -105,6 +101,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>
@ -121,11 +118,7 @@
<% end %> <% end %>
<%= format_time(reply.created_on) %> <%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>"> <span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">

View File

@ -64,11 +64,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%= user_activity_id %>"> <span id="praise_count_<%= user_activity_id %>">
<% if activity.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div> <div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
@ -89,6 +85,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
@ -105,11 +102,7 @@
<% end %> <% end %>
<%= format_time(comment.created_on) %> <%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>"> <span id="reply_praise_count_<%=comment.id %>">
<% if comment.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">

View File

@ -57,11 +57,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div> <div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
@ -79,6 +75,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>
@ -95,11 +92,7 @@
<% end %> <% end %>
<%= format_time(reply.created_on) %> <%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>"> <span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">

View File

@ -59,6 +59,7 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('intro_content_<%= document.id %>');
function expand_reply(container, btnid) { function expand_reply(container, btnid) {
var target = $(container); var target = $(container);
var btn = $(btnid); var btn = $(btnid);

View File

@ -69,11 +69,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=document.id %>"> <span id="praise_count_<%=document.id %>">
<% if document.creator_id.to_i == User.current.id.to_i %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>document, :user_activity_id=>document.id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(document) > 0 ? "#{get_praise_num(document)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>document, :user_activity_id=>document.id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<% if count > 3 %> <% if count > 3 %>
@ -88,6 +84,12 @@
<ul> <ul>
<% reply_id = 0 %> <% reply_id = 0 %>
<% comments_for_doc.each do |comment| %> <% comments_for_doc.each do |comment| %>
<script type="text/javascript">
$(function(){
showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
});
</script>
<% reply_id += 1 %> <% reply_id += 1 %>
<li style="display:<%= reply_id > 3 ? 'none' : '' %>"> <li style="display:<%= reply_id > 3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"><%= link_to image_tag(url_to_avatar(User.find(comment.creator_id)), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_id) %></div> <div class="homepagePostReplyPortrait"><%= link_to image_tag(url_to_avatar(User.find(comment.creator_id)), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_id) %></div>
@ -96,15 +98,11 @@
<%= link_to User.find(comment.creator_id), user_url_in_org(comment.creator_id), :class => "newsBlue mr10 f14" %> <%= link_to User.find(comment.creator_id), user_url_in_org(comment.creator_id), :class => "newsBlue mr10 f14" %>
<%= format_activity_day(comment.created_at) %> <%= format_time(comment.created_at, false) %> <%= format_activity_day(comment.created_at) %> <%= format_time(comment.created_at, false) %>
<span id="reply_praise_count_<%=comment.id %>"> <span id="reply_praise_count_<%=comment.id %>">
<% if comment.creator_id.to_i == User.current.id.to_i %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
</span> </span>
</div> </div>
<% unless comment.content.blank? %> <% unless comment.content.blank? %>
<div class="homepagePostReplyContent"><%= comment.content.html_safe %></div> <div class="homepagePostReplyContent" id="reply_content_<%= comment.id %>"><%= comment.content.html_safe %></div>
<% end %> <% end %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>

View File

@ -14,6 +14,9 @@
</div> </div>
<div class="ping_disfoot f14"> <div class="ping_disfoot f14">
<% ids = 'project_respond_form_'+ journal.id.to_s%> <% ids = 'project_respond_form_'+ journal.id.to_s%>
<span id="reply_praise_count_<%=journal.id %>">
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>journal, :user_activity_id=>journal.id,:type=>"reply"}%>
</span>
<% if journal.user == User.current|| User.current.admin? %> <% if journal.user == User.current|| User.current.admin? %>
<%= link_to(l(:label_bid_respond_delete), <%= link_to(l(:label_bid_respond_delete),
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
@ -26,7 +29,6 @@
<%= link_to l(:label_bid_respond_quote),'javascript:;', {:nhname=>"reply_btn"} %> <%= link_to l(:label_bid_respond_quote),'javascript:;', {:nhname=>"reply_btn"} %>
<% end %> <% end %>
</span>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<% ids = 'project_respond_form_'+ journal.id.to_s%> <% ids = 'project_respond_form_'+ journal.id.to_s%>

View File

@ -44,11 +44,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div> <div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
@ -69,6 +65,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
@ -85,11 +82,7 @@
<% end %> <% end %>
<%= format_time(comment.created_on) %> <%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>"> <span id="reply_praise_count_<%=comment.id %>">
<% if comment.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">

View File

@ -2,8 +2,8 @@
<tr class="b_grey hworkH30" style="border-bottom:1px solid #eaeaea;"> <tr class="b_grey hworkH30" style="border-bottom:1px solid #eaeaea;">
<th class="hworkList30 hworkH30 pl5 pr5">序号</th> <th class="hworkList30 hworkH30 pl5 pr5">序号</th>
<th class="hworkList50">&nbsp;</th> <th class="hworkList50">&nbsp;</th>
<th class="hworkList260" style="text-align:left;">作品名称</th>
<% if @homework.homework_type != 3 %> <% if @homework.homework_type != 3 %>
<th class="hworkList260" style="text-align:left;">作品名称</th>
<th class="hworkList80"> <th class="hworkList80">
<span class="HomeworkStuTitle f14 fb fl">姓名</span> <span class="HomeworkStuTitle f14 fb fl">姓名</span>
</th> </th>
@ -11,9 +11,12 @@
<span class="HomeworkStuTitle f14 fb fl">学号</span> <span class="HomeworkStuTitle f14 fb fl">学号</span>
</th> </th>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %> <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
<th class="hworkList260" style="text-align:left;">作品名称</th>
<th class="hworkList160"> <th class="hworkList160">
<span class="HomeworkStuTitle f14 fb fl">关联项目</span> <span class="HomeworkStuTitle f14 fb fl">关联项目</span>
</th> </th>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 0 %>
<th class="hworkList420" style="text-align:left;">作品名称</th>
<% end %> <% end %>
<th class="hworkList130 pl10"> <th class="hworkList130 pl10">
时间 时间

View File

@ -2,9 +2,9 @@
<tr class="b_grey hworkH30" style="border-bottom:1px solid #eaeaea;"> <tr class="b_grey hworkH30" style="border-bottom:1px solid #eaeaea;">
<th class="hworkList30 hworkH30 pl5 pr5">序号</th> <th class="hworkList30 hworkH30 pl5 pr5">序号</th>
<th class="hworkList50">&nbsp;</th> <th class="hworkList50">&nbsp;</th>
<th class="<%= @homework.homework_type == 2 ? 'hworkList80 pr10' : 'hworkList130 pr10'%>" style="text-align:left;">作品名称</th>
<% if @homework.homework_type != 3 %> <% if @homework.homework_type != 3 %>
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList60'%> pr10"> <th class="<%= @homework.homework_type == 2 ? 'hworkList80 pr10' : 'hworkList130 pr10'%>" style="text-align:left;">作品名称</th>
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList60'%> pr10">
<%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl #{@homework.anonymous_comment == 1 ? 'ml35' : 'ml18'}" ,:remote => true%> <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl #{@homework.anonymous_comment == 1 ? 'ml35' : 'ml18'}" ,:remote => true%>
<% if @show_all && @order == "lastname"%> <% if @show_all && @order == "lastname"%>
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%> <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
@ -17,9 +17,12 @@
<% end%> <% end%>
</th> </th>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %> <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
<th class="hworkList130 pr10" style="text-align:left;">作品名称</th>
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList220' : 'hworkList160'%>"> <th class="<%=@homework.anonymous_comment == 1 ? 'hworkList220' : 'hworkList160'%>">
<span class="c_dark f14 fb">关联项目</span> <span class="c_dark f14 fb">关联项目</span>
</th> </th>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 0 %>
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList340' : 'hworkList290' %> pr10" style="text-align:left;">作品名称</th>
<% end %> <% end %>
<th class="hworkList130"> <th class="hworkList130">
<%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml50" ,:remote => true%> <%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml50" ,:remote => true%>

View File

@ -5,20 +5,26 @@
<td class="hworkPortrait pr10 float-none"> <td class="hworkPortrait pr10 float-none">
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40",:style => "display:block;"),user_activities_path(student_work.user)) %> <%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40",:style => "display:block;"),user_activities_path(student_work.user)) %>
</td> </td>
<td class="hworkName float-none pr10 student_work_<%= student_work.id%> <%= @homework.homework_type == 2 ? '' : 'width130'%>" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');"> <% if @homework.homework_type != 3 %>
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%> <td class="hworkName float-none pr10 student_work_<%= student_work.id%> <%= @homework.homework_type == 2 ? '' : 'width130'%>" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
<div> <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%> <div>
</div> <%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
</td> </div>
<% if @homework.homework_type != 3 %> </td>
<td class="<%=@homework.anonymous_comment == 1 ? 'hworkStName100' : 'hworkStName'%> pr10 student_work_<%= student_work.id%>" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;"> <td class="<%=@homework.anonymous_comment == 1 ? 'hworkStName100' : 'hworkStName'%> pr10 student_work_<%= student_work.id%>" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
<%= student_work.user.show_name%> <%= student_work.user.show_name%>
</td> </td>
<td class="<%=@homework.anonymous_comment == 1 ? 'hworkStID90' : 'hworkStID'%> pr10 float-none student_work_<%= student_work.id%>" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;"> <td class="<%=@homework.anonymous_comment == 1 ? 'hworkStID90' : 'hworkStID'%> pr10 float-none student_work_<%= student_work.id%>" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
<span style="width:80px;" class="hidden fl"><%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%></span> <span style="width:80px;" class="hidden fl"><%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%></span>
</td> </td>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %> <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
<td class="hworkName float-none pr10 student_work_<%= student_work.id%> width130" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<div>
<%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
</div>
</td>
<% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %> <% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %>
<td class="<%=@homework.anonymous_comment == 1 ? 'hworkPrName2' : 'hworkPrName'%> student_work_<%= student_work.id%>" title="项目名称"> <td class="<%=@homework.anonymous_comment == 1 ? 'hworkPrName2' : 'hworkPrName'%> student_work_<%= student_work.id%>" title="项目名称">
<%= link_to( student_work.project.name, project_path(student_work.project.id))%> <%= link_to( student_work.project.name, project_path(student_work.project.id))%>
@ -28,7 +34,14 @@
<%= student_work.project.name %> <%= student_work.project.name %>
</td> </td>
<% end %> <% end %>
<% end %> <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 0 %>
<td class="hworkName float-none pr10 student_work_<%= student_work.id%> <%=@homework.anonymous_comment == 1 ? 'width340' : 'width290' %>" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<div>
<%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
</div>
</td>
<% end %>
<td class="hworkList130 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;"> <td class="hworkList130 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<% if student_work.created_at && @homework.end_time%> <% if student_work.created_at && @homework.end_time%>
<%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>&nbsp; <%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>&nbsp;

View File

@ -12,14 +12,14 @@
<td class="hworkList30 pl5 pr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></td> <td class="hworkList30 pl5 pr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></td>
<td class="hworkPortrait pr10 float-none"> <td class="hworkPortrait pr10 float-none">
<%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40", style: "display:block;") %> <%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40", style: "display:block;") %>
</td>
<td class="hworkName pr10 w250 float-none student_work_<%= student_work.id%>">
<div>
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w250"%>
</div>
</td> </td>
<% if @homework.homework_type != 3 %> <% if @homework.homework_type != 3 %>
<td class="hworkName pr10 w250 float-none student_work_<%= student_work.id%>">
<div>
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w250"%>
</div>
</td>
<td class="hworkStName float-none w80 student_work_<%= student_work.id%>" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;"> <td class="hworkStName float-none w80 student_work_<%= student_work.id%>" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;">
<%= student_work.user.show_name%> <%= student_work.user.show_name%>
</td> </td>
@ -27,6 +27,12 @@
<span class="hidden fl" style="width:80px;"><%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%></span> <span class="hidden fl" style="width:80px;"><%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%></span>
</td> </td>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %> <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
<td class="hworkName pr10 w250 float-none student_work_<%= student_work.id%>">
<div>
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w250"%>
</div>
</td>
<% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %> <% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? %>
<td class="hworkPrName float-none mr10 student_work_<%= student_work.id%>" title="项目名称"> <td class="hworkPrName float-none mr10 student_work_<%= student_work.id%>" title="项目名称">
<%= link_to( student_work.project.name, project_path(student_work.project.id))%> <%= link_to( student_work.project.name, project_path(student_work.project.id))%>
@ -36,6 +42,13 @@
<%= student_work.project.name %> <%= student_work.project.name %>
</td> </td>
<% end %> <% end %>
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 0 %>
<td class="hworkName pr10 w410 float-none student_work_<%= student_work.id%>">
<div>
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word w250"%>
</div>
</td>
<% end %> <% end %>
<% else%> <% else%>
<td class="hworkList30 pl5 pr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></td> <td class="hworkList30 pl5 pr5" id="work_num_<%=student_work.id %>"><%=index + 1 %></td>

View File

@ -24,7 +24,7 @@
<%= link_to "代码查重", work_canrepeat_student_work_index_path(homework:@homework.id, course_id:@course.id), class: 'BlueCirBtn fl',:remote => true %> <%= link_to "代码查重", work_canrepeat_student_work_index_path(homework:@homework.id, course_id:@course.id), class: 'BlueCirBtn fl',:remote => true %>
<% end %> <% end %>
<% end%> <% end%>
<span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_show" style="display: none">[ 显示作业信息 ]</a> </span> <span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_show" onclick="show_or_hide_info();" style="display: none">[ 显示作业信息 ]</a> </span>
</div> </div>
<div class="cl"></div> <div class="cl"></div>

View File

@ -33,8 +33,14 @@
$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed").css("border","3px solid #269ac9"); $('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed").css("border","3px solid #269ac9");
} }
function show_or_hide_info(){
$("#homeworkInformation").toggle();
$("#homework_info_hidden").toggle();
$("#homework_info_show").toggle();
}
$(function(){ $(function(){
$("#homework_info_hidden").click(function(){ /*$("#homework_info_hidden").click(function(){
$("#homeworkInformation").hide(); $("#homeworkInformation").hide();
$("#homework_info_hidden").hide(); $("#homework_info_hidden").hide();
$("#homework_info_show").show(); $("#homework_info_show").show();
@ -43,7 +49,7 @@
$("#homework_info_show").hide(); $("#homework_info_show").hide();
$("#homeworkInformation").show(); $("#homeworkInformation").show();
$("#homework_info_hidden").show(); $("#homework_info_hidden").show();
}); });*/
if($("#homework_description").height() > 54) { if($("#homework_description").height() > 54) {
$("#homeworkDetailShow").show(); $("#homeworkDetailShow").show();
@ -69,16 +75,21 @@
<ul class="menu_r"> <ul class="menu_r">
<li> <li>
<a href="javascript:void(0);" class="parent"> <a href="javascript:void(0);" class="parent">
<% @homework_commons.each_with_index do |homework_common,index |%> <% if @is_teacher %>
<% hcommons = @all_homework_commons %>
<% else %>
<% hcommons = @homework_commons %>
<% end %>
<% hcommons.each_with_index do |homework_common,index |%>
<% if homework_common.id == @homework.id %> <% if homework_common.id == @homework.id %>
<%="作业 #{@homework_commons.count - index}" %> <%="作业 #{hcommons.count - index}" %>
<% end %> <% end %>
<% end%> <% end%>
</a> </a>
<ul> <ul>
<% @homework_commons.each_with_index do |homework_common,index |%> <% hcommons.each_with_index do |homework_common,index |%>
<li class="pr10"> <li class="pr10">
<%= link_to "作业#{@homework_commons.count - index}#{homework_common.name}",student_work_index_path(:homework => homework_common.id)%> <%= link_to "作业#{hcommons.count - index}#{homework_common.name}",student_work_index_path(:homework => homework_common.id)%>
<%#= link_to "第#{@homework_commons.count - index}次作业",student_work_index_path(:homework => homework_common.id)%> <%#= link_to "第#{@homework_commons.count - index}次作业",student_work_index_path(:homework => homework_common.id)%>
</li> </li>
<% end%> <% end%>
@ -156,7 +167,7 @@
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span> <span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
<% end%> <% end%>
<% end%> <% end%>
<span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_hidden">[ 隐藏作业信息 ]</a> </span> <span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" onclick="show_or_hide_info();" id="homework_info_hidden">[ 隐藏作业信息 ]</a> </span>
<div class="cl"></div> <div class="cl"></div>
<div class="fontGrey2 db mb5">发布者:<%= @homework.user.show_name %></div> <div class="fontGrey2 db mb5">发布者:<%= @homework.user.show_name %></div>
<div class="homeworkDetail upload_img break_word list_style max_h54" id="homeworkDetail"> <div class="homeworkDetail upload_img break_word list_style max_h54" id="homeworkDetail">
@ -170,13 +181,15 @@
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="mt5"> <div class="mt5">
<% if @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status < 2 %> <% if @homework.end_time && @homework.publish_time %>
<div class="fontGrey2 db fl">提交截止时间:<%= @homework.end_time %>&nbsp;23:59</div> <% if @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status < 2 %>
<% elsif @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status >= 2 && @homework.anonymous_comment == 0 %> <div class="fontGrey2 db fl">提交截止时间:<%= @homework.end_time %>&nbsp;23:59</div>
<div class="fontGrey2 db fl">匿评截止时间:<%= @homework.homework_detail_manual.evaluation_end %>&nbsp;23:59</div> <% elsif @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status >= 2 && @homework.anonymous_comment == 0 %>
<% end %> <div class="fontGrey2 db fl">匿评截止时间:<%= @homework.homework_detail_manual.evaluation_end %>&nbsp;23:59</div>
<% if @homework.homework_detail_manual.comment_status == 0 %> <% end %>
<div class="fontGrey2 db fl ml10">发布时间:<%= @homework.publish_time %>&nbsp;00:00</div> <% if @homework.homework_detail_manual.comment_status == 0 %>
<div class="fontGrey2 db fl ml10">发布时间:<%= @homework.publish_time %>&nbsp;00:00</div>
<% end %>
<% end %> <% end %>
<% if @homework.homework_detail_manual%> <% if @homework.homework_detail_manual%>
<% if @homework.homework_detail_manual.comment_status == 1%> <% if @homework.homework_detail_manual.comment_status == 1%>

View File

@ -97,6 +97,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<% user = User.find(reply.creator_id) %> <% user = User.find(reply.creator_id) %>
@ -164,6 +165,7 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('intro_content_<%= @document.id %>');
var replyCount = $(".homepagePostReplyContainer").size(); var replyCount = $(".homepagePostReplyContainer").size();
if (replyCount >3){ if (replyCount >3){
for(var i= 3; i < replyCount+1; i++){ for(var i= 3; i < replyCount+1; i++){

View File

@ -7,10 +7,10 @@
</li> </li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<%= link_to owner.show_name, user_path(owner), :class => "newsBlue homepageNewsPublisher" %> <%= link_to owner.show_name, user_path(owner), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.apply_result == 1 ? '同意' : '拒绝'%>引用资源:</span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.apply_result == 2 ? '同意' : '拒绝'%>引用资源:</span>
</li> </li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<% link_str = ma.apply_result == 1 ? <% link_str = ma.apply_result == 2 ?
'您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请已通过' '您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请已通过'
: :
'您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请被婉拒' %> '您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请被婉拒' %>

View File

@ -296,11 +296,7 @@
<span class="reply_iconup" > ︿</span> <span class="reply_iconup" > ︿</span>
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.user == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"></div> <div class="homepagePostReplyBannerTime"></div>
@ -321,6 +317,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
@ -364,11 +361,7 @@
<div class="reply"> <div class="reply">
<span class="reply-right"> <span class="reply-right">
<span id="reply_praise_count_<%=comment.id %>"> <span id="reply_praise_count_<%=comment.id %>">
<% if comment.user == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
</span> </span>
<span style="position: relative" class="fr mr20"> <span style="position: relative" class="fr mr20">
<%= link_to( <%= link_to(

View File

@ -33,10 +33,12 @@
</div> </div>
<% count = fetch_user_leaveWord_reply(activity).count %> <% count = fetch_user_leaveWord_reply(activity).count %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div> <div class="homepagePostReplyBanner">
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>"> <div class="homepagePostReplyBannerCount">回复
<div class="homepagePostReplyBannerCount"> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
回复(<%= count %> <span id="praise_count_<%=user_activity_id %>">
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
</span>
</div> </div>
<div class="homepagePostReplyBannerTime"></div> <div class="homepagePostReplyBannerTime"></div>
<%if count>3 %> <%if count>3 %>
@ -56,6 +58,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
@ -71,6 +74,9 @@
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
<% end %> <% end %>
<%= format_time(comment.created_on) %> <%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>">
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
</span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
<%= comment.notes.html_safe %> <%= comment.notes.html_safe %>

View File

@ -91,11 +91,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div> <div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
@ -117,6 +113,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>
@ -133,11 +130,7 @@
<% end %> <% end %>
<%= format_time(reply.created_on) %> <%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>"> <span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span> </span>
</div> </div>

View File

@ -69,11 +69,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div> <div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
@ -94,6 +90,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
@ -110,11 +107,7 @@
<% end %> <% end %>
<%= format_time(comment.created_on) %> <%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>"> <span id="reply_praise_count_<%=comment.id %>">
<% if comment.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">

View File

@ -1,7 +1,7 @@
<div class="subjectDetail fl mt10"> <div class="subjectDetail fl mt10">
<div class="subjectInfo">题目信息</div> <div class="subjectInfo">题目信息</div>
<div class="subject-content-wrapper"> <div class="subject-content-wrapper">
<% if homework.nil? && status == 0 %> <% if homework.nil? %>
<span id="homework_notice_span"><span class="center db">本题库遵循创作共用许可证</span><br> <span id="homework_notice_span"><span class="center db">本题库遵循创作共用许可证</span><br>
教师给学生出题本质上是一种创作行为,题目的作者通常为此付出大量时间和精力。好的题目不仅能加深学生对知识点的理解,还能激发学生兴趣,提升学习效率。为此,本网站的题库许可证基于创作共用许可证( Creative Commons License )建立,其核心条款包括:<br/><br/> 教师给学生出题本质上是一种创作行为,题目的作者通常为此付出大量时间和精力。好的题目不仅能加深学生对知识点的理解,还能激发学生兴趣,提升学习效率。为此,本网站的题库许可证基于创作共用许可证( Creative Commons License )建立,其核心条款包括:<br/><br/>
@ -14,14 +14,14 @@
对此许可证的支持或反对,请在网站中留言,我们不断完善,谢谢! 对此许可证的支持或反对,请在网站中留言,我们不断完善,谢谢!
</span> </span>
<% elsif homework.nil? && status == 1 %> <!-- <%# elsif homework.nil? && status == 1 %>
<span class="c_red">您选中的作业目前为私有作业,您的分享请求已发送至老师,请耐心等待老师的同意。</span> <span class="c_red">您选中的作业目前为私有作业,您的分享请求已发送至老师,请耐心等待老师的同意。</span>
<% elsif homework.nil? && status == 2 %> <%# elsif homework.nil? && status == 2 %>
<span class="c_red">您选中的作业目前为私有作业,请点击“请求分享”按钮向题目的作者发送分享请求吧!<br/> <span class="c_red">您选中的作业目前为私有作业,请点击“请求分享”按钮向题目的作者发送分享请求吧!<br/>
祝您成功:) 祝您成功:)
</span> </span>
<% elsif homework.nil? && status == 3 %> <%# elsif homework.nil? && status == 3 %>
<span class="c_red">您选中的作业目前为私有作业,您的分享请求已被老师拒绝,暂时不可查看作业详情。</span> <span class="c_red">您选中的作业目前为私有作业,您的分享请求已被老师拒绝,暂时不可查看作业详情。</span>-->
<% else %> <% else %>
<div class="subjectIntro mb15">标题:<%=homework.name %><br /> <div class="subjectIntro mb15">标题:<%=homework.name %><br />
来源:<%=homework.course.name %><br /> 来源:<%=homework.course.name %><br />

View File

@ -1,6 +1,6 @@
<div class="homepagePostIntro break_word upload_img maxh360 table_maxWidth " id="activity_description_<%= user_activity_id%>"> <div class="homepagePostIntro break_word upload_img maxh360 table_maxWidth " id="activity_description_<%= user_activity_id%>">
<div id="intro_content_<%= user_activity_id%>"> <div id="intro_content_<%= user_activity_id%>">
<%= content.to_s.html_safe%> <%= content.to_s.html_safe %>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
@ -13,6 +13,7 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('intro_content_<%= user_activity_id%>');
description_show_hide(<%=user_activity_id %>); description_show_hide(<%=user_activity_id %>);
}); });
</script> </script>

View File

@ -4,11 +4,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div> <div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
@ -29,6 +25,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i + 1 %> <% replies_all_i=replies_all_i + 1 %>
@ -45,12 +42,8 @@
<% end %> <% end %>
<%= format_time(reply.created_on) %> <%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%= reply.id %>"> <span id="reply_praise_count_<%= reply.id %>">
<% if reply.user == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span> </span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">
<% if reply.details.any? %> <% if reply.details.any? %>

View File

@ -90,11 +90,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div> <div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
@ -112,6 +108,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>
@ -128,11 +125,7 @@
<% end %> <% end %>
<%= format_time(reply.created_on) %> <%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>"> <span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">

View File

@ -91,6 +91,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>

View File

@ -6,7 +6,7 @@
<% attachments.each do |attach| %> <% attachments.each do |attach| %>
<ul class="resource-list" onmouseover="if($('#contextMenu').css('display') != 'block')$(this).children().css('background-color', '#e1e1e1')" onmouseout=" if($('#contextMenu').css('display') == 'none')$(this).children().css('background-color', 'white')"> <ul class="resource-list" onmouseover="if($('#contextMenu').css('display') != 'block')$(this).children().css('background-color', '#e1e1e1')" onmouseout=" if($('#contextMenu').css('display') == 'none')$(this).children().css('background-color', 'white')">
<li class="resource-list-checkbox fl"> <li class="resource-list-checkbox fl">
<% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current %> <% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 && !attach_show_allow(attach) %>
<input name="checkbox1[]" type="checkbox" disabled="disabled" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" /> <input name="checkbox1[]" type="checkbox" disabled="disabled" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
<% else %> <% else %>
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" /> <input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
@ -14,15 +14,19 @@
<!--<input name="checkbox2" type="checkbox" value="" class="resourcesCheckbox" />--> <!--<input name="checkbox2" type="checkbox" value="" class="resourcesCheckbox" />-->
</li> </li>
<li class="resource-list-name fl"> <li class="resource-list-name fl">
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename, :class => 'resourcesBlack resource-list-middle hidden mw280' %> <% if attach.is_public == 0 && !attach_show_allow(attach) && attach.get_apply_resource_status(attach.id, attach.author_id) != "2" %>
<a style="cursor: default" class = "resourcesBlack resource-list-middle hidden mw280" title="<%= attach.filename %>"><%= attach.filename %> </a>
<% else %>
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename, :class => 'resourcesBlack resource-list-middle hidden mw280' %>
<% end %>
<% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current %> <% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current %>
<img src="/images/locked.png" alt="私有" title="私有" class="resource-list-middle" height="16" width="16"> <img src="/images/locked.png" alt="私有" title="私有" class="resource-list-middle" height="16" width="16">
<% end %> <% end %>
</li> </li>
<li class="resource-list-apply fr" id="resource_apply_status_<%=attach.id %>"> <li class="resource-list-apply fr" id="resource_apply_status_<%=attach.id %>">
<% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current %> <% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current && !attach_show_allow(attach) %>
<% ah = attach.get_status_by_attach(User.current.id) %> <% ah = attach.get_status_by_attach(User.current.id) %>
<% if ah.nil? %> <% if ah.nil? %>
<%= link_to("请求分享", apply_resource_user_path(User.current.id, :attachment_id => attach.id), :class => 'green_btn_share c_white', :remote => true) %> <%= link_to("请求分享", apply_resource_user_path(User.current.id, :attachment_id => attach.id), :class => 'green_btn_share c_white', :remote => true) %>
<% elsif ah == 1 %> <% elsif ah == 1 %>
等待回复 等待回复
@ -45,6 +49,7 @@
<li class="resource-list-from fr hidden" title="<%= get_resource_origin(attach) %>"><%= get_resource_origin(attach) %></li> <li class="resource-list-from fr hidden" title="<%= get_resource_origin(attach) %>"><%= get_resource_origin(attach) %></li>
<li style="display: none"><%= attach.is_public %></li> <li style="display: none"><%= attach.is_public %></li>
<li style="display: none"><%= attach.get_apply_resource_status(attach.id, attach.author_id) %></li> <li style="display: none"><%= attach.get_apply_resource_status(attach.id, attach.author_id) %></li>
<li style="display: none"><%= attach_show_allow(attach) == true ? 0 : 1 %></li>
<li style="display: none"><%= attach.id %></li> <li style="display: none"><%= attach.id %></li>
</ul> </ul>
<div class="cl"></div> <div class="cl"></div>
@ -66,14 +71,15 @@
//批量删除 //批量删除
function batch_delete(){ function batch_delete(){
var data = $("#resources_list_form").serialize(); var data = $("#resources_list_form").serialize();
if($("input[type=checkbox][data-has-history=Y]:checked").length != 0){
alert("您只能删除没有历史记录的资源,请重新选择后再删除。");
return;
}
if($("input[type=checkbox][data-deleteble=N]:checked").length != 0){ if($("input[type=checkbox][data-deleteble=N]:checked").length != 0){
alert("您只能删除自己上传的资源,请重新选择后再删除。"); alert("您只能删除自己上传的资源,请重新选择后再删除。");
return; return;
} }
if($("input[type=checkbox][data-has-history=Y]:checked").length != 0){
alert("您只能删除没有历史记录的资源,请重新选择后再删除。");
return;
}
if(data != "" && confirm('确认要删除这些资源吗?')) { if(data != "" && confirm('确认要删除这些资源吗?')) {
$.post( $.post(
@ -96,7 +102,8 @@
is_public = line.children().eq(11).html(); is_public = line.children().eq(11).html();
user_id = line.children().eq(6).html(); user_id = line.children().eq(6).html();
apply_status = line.children().eq(12).html(); apply_status = line.children().eq(12).html();
if(is_public == 0 && user_id != '<%= User.current.id %>' && apply_status != 2){ allow = line.children().eq(13).html();
if(is_public == 0 && user_id != '<%= User.current.id %>' && apply_status != 2 && allow == 1){
alert('您无权发送私有资源') alert('您无权发送私有资源')
}else{ }else{
if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。 if (lastSendType === '2'){ //如果已经发送过一次了,那么就应该沿用上次发送的类型。
@ -210,19 +217,21 @@
line.children().css("background-color", 'white'); line.children().css("background-color", 'white');
id = line.children().last().html(); id = line.children().last().html();
user_id = line.children().eq(6).html(); user_id = line.children().eq(6).html();
if(line.children().first().children().data('hasHistory') == 'Y'){
alert('该资源存在历史版本,不能删除');
return;
}
if(user_id === '<%= User.current.id%>') { if(user_id === '<%= User.current.id%>') {
if(line.children().first().children().data('hasHistory') == 'Y'){
alert('该资源存在历史版本,不能删除');
return;
}
if (confirm('确定要删除资源"' + line.children().eq(1).children().attr('title').trim() + '"么?')) { if (confirm('确定要删除资源"' + line.children().eq(1).children().attr('title').trim() + '"么?')) {
$.ajax({ $.ajax({
type: 'post', type: 'post',
url: '<%= user_resource_delete_user_path(User.current.id)%>' + '?resource_id=' + id + '&type=<%=@type %>&status=<%=@status %>' url: '<%= user_resource_delete_user_path(User.current.id)%>' + '?resource_id=' + id + '&type=<%=@type %>&status=<%=@status %>'
}); });
} }
}else{ }else{
alert('您无法删除此资源!') alert('您无法删除此资源!')
} }
} }
</script> </script>

View File

@ -3,6 +3,8 @@
<div class="subject-list fl mr10"> <div class="subject-list fl mr10">
<a href="<%= user_homework_type_user_path(@user,:is_import => 1) %>" id="public_homeworks_choose" class="resource-tab resource-tab-active fl" data-remote="true">公共题库</a> <a href="<%= user_homework_type_user_path(@user,:is_import => 1) %>" id="public_homeworks_choose" class="resource-tab resource-tab-active fl" data-remote="true">公共题库</a>
<a href="<%= user_homework_type_user_path(@user,:type=>'2',:is_import => 1) %>" id="user_homeworks_choose" class="resource-tab fl" data-remote="true">我的题库</a> <a href="<%= user_homework_type_user_path(@user,:type=>'2',:is_import => 1) %>" id="user_homeworks_choose" class="resource-tab fl" data-remote="true">我的题库</a>
<!--<a href="<%#= user_homework_type_user_path(@user,:type=>'3',:is_import => 1) %>" id="apply_homeworks_choose" class="resource-tab fl" data-remote="true">申请题库</a>-->
<div id="homework_search_input"> <div id="homework_search_input">
<%=render :partial=>'homework_search_input', :locals=>{:type => @type,:is_import => 1} %> <%=render :partial=>'homework_search_input', :locals=>{:type => @type,:is_import => 1} %>
</div> </div>
@ -43,11 +45,18 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$("#public_homeworks_choose").click(function(){ $("#public_homeworks_choose").click(function(){
$(this).toggleClass("resource-tab-active"); $(this).addClass("resource-tab-active");
$("#user_homeworks_choose").toggleClass("resource-tab-active"); $("#user_homeworks_choose").removeClass("resource-tab-active");
//$("#apply_homeworks_choose").removeClass("resource-tab-active");
}); });
$("#user_homeworks_choose").click(function(){ $("#user_homeworks_choose").click(function(){
$(this).toggleClass("resource-tab-active"); $(this).addClass("resource-tab-active");
$("#public_homeworks_choose").toggleClass("resource-tab-active"); $("#public_homeworks_choose").removeClass("resource-tab-active");
//$("#apply_homeworks_choose").removeClass("resource-tab-active");
}); });
// $("#apply_homeworks_choose").click(function(){
// $(this).addClass("resource-tab-active");
// $("#public_homeworks_choose").removeClass("resource-tab-active");
// $("#user_homeworks_choose").removeClass("resource-tab-active");
// });
</script> </script>

View File

@ -5,24 +5,24 @@
$(document).ready(function(){ $(document).ready(function(){
$("#relateProject,.relatePInfo").mouseover(function(){ $("#relateProject,.relatePInfo").mouseover(function(){
$(".relatePInfo").css("display","block"); $(".relatePInfo").css("display","block");
}) });
$("#relateProject,.relatePInfo").mouseout(function(){ $("#relateProject,.relatePInfo").mouseout(function(){
$(".relatePInfo").css("display","none"); $(".relatePInfo").css("display","none");
}) });
$(".coursesLineGrey").mouseover(function(){ $(".coursesLineGrey").mouseover(function(){
$(this).css("color","#ffffff"); $(this).css("color","#ffffff");
}) });
$(".coursesLineGrey").mouseout(function(){ $(".coursesLineGrey").mouseout(function(){
$(this).css("color","#808080"); $(this).css("color","#808080");
}) });
$(".homepagePostSetting,.coursesLineGrey").mouseover(function(){ $(".homepagePostSetting,.coursesLineGrey").mouseover(function(){
$(this).prev().css("color","#ffffff"); $(this).prev().css("color","#ffffff");
$(this).css("z-index", "9999"); $(this).css("z-index", "9999");
}) });
$(".homepagePostSetting").mouseout(function(){ $(".homepagePostSetting").mouseout(function(){
$(this).prev().css("color","#808080"); $(this).prev().css("color","#808080");
$(this).css("z-index", "1"); $(this).css("z-index", "1");
}) });
}) })
</script> </script>

View File

@ -50,11 +50,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div> <div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
@ -75,6 +71,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
@ -91,11 +88,7 @@
<% end %> <% end %>
<%= format_time(comment.created_on) %> <%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>"> <span id="reply_praise_count_<%=comment.id %>">
<% if comment.author == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">

View File

@ -201,7 +201,7 @@
<% end %> <% end %>
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1 %> <% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1 %>
<% projects = homework_common.student_work_projects.where("is_leader = 1") %> <% projects = homework_common.student_work_projects.where("is_leader = 1 and project_id != -1") %>
<% unless projects.empty? %> <% unless projects.empty? %>
<% sort_projects = project_sort_update projects %> <% sort_projects = project_sort_update projects %>
<div class="mt10 relatePWrap" id="relatePWrap_<%=homework_common.id %>"> <div class="mt10 relatePWrap" id="relatePWrap_<%=homework_common.id %>">
@ -306,11 +306,7 @@
<span class="reply_iconup" > ︿</span> <span class="reply_iconup" > ︿</span>
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=homework_common.id %>"> <span id="praise_count_<%=homework_common.id %>">
<% if homework_common.user == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>homework_common, :user_activity_id=>homework_common.id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(homework_common) > 0 ? "#{get_praise_num(homework_common)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>homework_common, :user_activity_id=>homework_common.id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"></div> <div class="homepagePostReplyBannerTime"></div>
@ -331,6 +327,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
@ -378,11 +375,7 @@
<div class="reply"> <div class="reply">
<span class="reply-right"> <span class="reply-right">
<span id="reply_praise_count_<%=comment.id %>"> <span id="reply_praise_count_<%=comment.id %>">
<% if comment.user == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
</span> </span>
<span style="position: relative" class="fr mr20"> <span style="position: relative" class="fr mr20">
<%= link_to( <%= link_to(

View File

@ -6,8 +6,22 @@
<ul class="subjectRow"> <ul class="subjectRow">
<li class="subjectName fl hidden"> <li class="subjectName fl hidden">
<label> <label>
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" /> <% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 && !attach_show_allow(attach)%>
<span><%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename%></span> <input name="checkbox1[]" type="checkbox" disabled="disabled" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
<% else %>
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
<% end %>
<span>
<% if attach.is_public == 0 && !attach_show_allow(attach) && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 %>
<a href="" style="cursor: default" title="<%= attach.filename %>"><%= attach.filename %> </a>
<% else %>
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename%>
<% end %>
</span>
<% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current %>
<img src="/images/locked.png" alt="私有" title="私有" class="resource-list-middle" height="16" width="16">
<% end %>
</label> </label>
</li> </li>
<li class="subjectType fl"><%= get_resource_type(attach.container_type)%></li> <li class="subjectType fl"><%= get_resource_type(attach.container_type)%></li>

View File

@ -64,11 +64,7 @@
<div class="homepagePostReplyBannerCount">回复 <div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span> <sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>"> <span id="praise_count_<%=user_activity_id %>">
<% if activity.user == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"></div> <div class="homepagePostReplyBannerTime"></div>
@ -86,6 +82,12 @@
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% fetch_user_leaveWord_reply(activity).reorder("created_on desc").each do |comment| %> <% fetch_user_leaveWord_reply(activity).reorder("created_on desc").each do |comment| %>
<script type="text/javascript">
$(function(){
showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
});
</script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_delete_<%= comment.id%>').show();" onmouseout="$('#message_delete_<%= comment.id%>').hide();" style="display:<%= replies_all_i > 3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_delete_<%= comment.id%>').show();" onmouseout="$('#message_delete_<%= comment.id%>').hide();" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
@ -100,11 +102,7 @@
<% end %> <% end %>
<%= format_time(comment.created_on) %> <%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>"> <span id="reply_praise_count_<%=comment.id %>">
<% if comment.user == User.current %> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
</span> </span>
<div id="message_delete_<%=comment.id %>" style="display: none" class="mr10 fr"> <div id="message_delete_<%=comment.id %>" style="display: none" class="mr10 fr">
<% if comment.user == User.current|| User.current.admin? %> <% if comment.user == User.current|| User.current.admin? %>
@ -115,7 +113,7 @@
<% end %> <% end %>
</div> </div>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= user_activity_id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
<%= comment.notes.html_safe %> <%= comment.notes.html_safe %>
</div> </div>
</div> </div>

View File

@ -19,12 +19,13 @@
<div class="resource-check-all"> <div class="resource-check-all">
<input id="checkboxAll" type="checkbox" value="" onclick="all_select();" class="resourcesCheckbox" /> <input id="checkboxAll" type="checkbox" value="" onclick="all_select();" class="resourcesCheckbox" />
</div> </div>
<a href="javascript:void(0);" class="replyGrey mr15" onclick="all_select();">全选</a> <a href="javascript:void(0);" class="replyGrey" onclick="batch_delete();">删除</a> </div> <!--<a href="javascript:void(0);" class="replyGrey mr15" onclick="all_select();">全选</a> -->
<a href="javascript:void(0);" class="replyGrey" onclick="batch_delete();">删除</a> </div>
<div class="cl"></div> <div class="cl"></div>
<div class="resourcesSelectSend mt10 fl"> <div class="resourcesSelectSend mt10 fl">
<div class="resourcesSelectSendButton fl mr15 inactive-border" onclick="batch_send();"> <!--<div class="resourcesSelectSendButton fl mr15 inactive-border" onclick="batch_send();">-->
<a href="javascript:void(0);" class="sendButtonBlue db inactive-text" data-remote="true">发送至</a> <!--&lt;!&ndash;<a href="javascript:void(0);" class="sendButtonBlue db inactive-text" data-remote="true">发送至</a>&ndash;&gt;-->
</div> <!--</div>-->
<div class="fl">选择&nbsp;<span class="c_red" id="res_count">0</span>&nbsp;个资源</div> <div class="fl">选择&nbsp;<span class="c_red" id="res_count">0</span>&nbsp;个资源</div>
</div> </div>

View File

@ -93,13 +93,13 @@
<div class="mt15"> <div class="mt15">
<span>请使用 <%= @homework.language_name %> 语言编写</span> <span>请使用 <%= @homework.language_name %> 语言编写</span>
<% if @homework.language.to_i == 1 %> <% if @homework.language.to_i == 1 %>
<span class = "fr">编译器信息:gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC)</span> <span class = "fr">编译器信息gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC)</span>
<% elsif @homework.language.to_i == 2 %> <% elsif @homework.language.to_i == 2 %>
<span class = "fr">编译器信息:gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC)</span> <span class = "fr">编译器信息gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC)</span>
<% elsif @homework.language.to_i == 3 %> <% elsif @homework.language.to_i == 3 %>
<span class = "fr">编译器信息:Python version "2.6.6"</span> <span class = "fr">编译器信息Python version "2.6.6"</span>
<% elsif @homework.language.to_i == 4 %> <% elsif @homework.language.to_i == 4 %>
<span class = "fr">编译器信息:java version "1.7.0_85" OpenJDK Runtime Environment</span> <span class = "fr">编译器信息java version "1.7.0_85" OpenJDK Runtime Environment</span>
<% end %> <% end %>
<span data-language=<%=@homework.language%> style="display-hidden" id="data-language"></span> <span data-language=<%=@homework.language%> style="display-hidden" id="data-language"></span>
</div> </div>

View File

@ -1,5 +1,5 @@
<% if @is_import.to_i == 1 %> <% if @is_import.to_i == 1 %>
$("#homework_detail_information").html("<%=escape_javascript(render :partial => 'users/homework_detail_information', :locals => {:homework=>@homework}) %>"); $("#homework_detail_information").html("<%=escape_javascript(render :partial => 'users/homework_detail_information', :locals => {:homework=>@homework}) %>");
<% else %> <% else %>
$("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>@homework,:status=>@status}) %>"); $("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>@homework}) %>");
<% end %> <% end %>

View File

@ -76,13 +76,13 @@
<div class="mt15"> <div class="mt15">
<span>请使用 <%= @homework.language_name %> 语言编写</span> <span>请使用 <%= @homework.language_name %> 语言编写</span>
<% if @homework.language.to_i == 1 %> <% if @homework.language.to_i == 1 %>
<span class = "fr">编译器信息:gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC)</span> <span class = "fr">编译器信息gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC)</span>
<% elsif @homework.language.to_i == 2 %> <% elsif @homework.language.to_i == 2 %>
<span class = "fr">编译器信息:gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC)</span> <span class = "fr">编译器信息gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC)</span>
<% elsif @homework.language.to_i == 3 %> <% elsif @homework.language.to_i == 3 %>
<span class = "fr">编译器信息:Python version "2.6.6"</span> <span class = "fr">编译器信息Python version "2.6.6"</span>
<% elsif @homework.language.to_i == 4 %> <% elsif @homework.language.to_i == 4 %>
<span class = "fr">编译器信息:java version "1.7.0_85" OpenJDK Runtime Environment</span> <span class = "fr">编译器信息java version "1.7.0_85" OpenJDK Runtime Environment</span>
<% end %> <% end %>
</div> </div>
<div class="mt10"> <div class="mt10">

View File

@ -6,7 +6,7 @@ $("#homework_search_input").html("<%=escape_javascript(render :partial=>'homewor
<% else %> <% else %>
$("#homework_repository_list").html('<%= escape_javascript(render :partial => 'users/homework_repository_list', :locals => {:homeworks => @homeworks,:sort => @order,:b_sort => @b_sort,:type=>@type,:is_import => @is_import,:property => @property,:search=>''})%>'); $("#homework_repository_list").html('<%= escape_javascript(render :partial => 'users/homework_repository_list', :locals => {:homeworks => @homeworks,:sort => @order,:b_sort => @b_sort,:type=>@type,:is_import => @is_import,:property => @property,:search=>''})%>');
$("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>'); $("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
$("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>nil, :status => 0}) %>"); $("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>nil}) %>");
$("#homework_search_input").html("<%=escape_javascript(render :partial=>'homework_repository_search', :locals=>{:type=>@type,:is_import=>@is_import,:property=>@property}) %>"); $("#homework_search_input").html("<%=escape_javascript(render :partial=>'homework_repository_search', :locals=>{:type=>@type,:is_import=>@is_import,:property=>@property}) %>");
$("#homework_type_all").attr('href','<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 0) %>'); $("#homework_type_all").attr('href','<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 0) %>');
$("#homework_type_nor").attr('href','<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 1) %>'); $("#homework_type_nor").attr('href','<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 1) %>');

View File

@ -71,7 +71,7 @@
<%=render :partial => 'homework_repository_list', :locals => {:homeworks => @homeworks,:type=>@type,:is_import => 0,:property => @property,:search=>''} %> <%=render :partial => 'homework_repository_list', :locals => {:homeworks => @homeworks,:type=>@type,:is_import => 0,:property => @property,:search=>''} %>
</div> </div>
<div id="homework_repository_detail"> <div id="homework_repository_detail">
<%=render :partial => 'homework_repository_detail', :locals => {:homework => nil, :status => 0} %> <%=render :partial => 'homework_repository_detail', :locals => {:homework => nil} %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div> <div>

View File

@ -1,4 +1,4 @@
/*$("#homework_repository").html('<%#= escape_javascript(render :partial => 'users/homework_repository', :locals => {:homeworks => @homeworks})%>');*/ /*$("#homework_repository").html('<%#= escape_javascript(render :partial => 'users/homework_repository', :locals => {:homeworks => @homeworks})%>');*/
$("#homework_repository_list").html('<%= escape_javascript(render :partial => 'users/homework_repository_list', :locals => {:homeworks => @homeworks,:sort => @order,:b_sort => @b_sort,:type=>@type,:is_import => 0,:property => @property,:search=>''})%>'); $("#homework_repository_list").html('<%= escape_javascript(render :partial => 'users/homework_repository_list', :locals => {:homeworks => @homeworks,:sort => @order,:b_sort => @b_sort,:type=>@type,:is_import => 0,:property => @property,:search=>''})%>');
$("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>'); $("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
$("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>nil, :status => 0}) %>"); $("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>nil}) %>");

View File

@ -5,5 +5,5 @@ $("#homework_detail_information").html("<%=escape_javascript(render :partial =>
<% else %> <% else %>
$("#homework_repository_list").html('<%= escape_javascript(render :partial => 'users/homework_repository_list', :locals => {:homeworks => @homeworks,:sort => @order,:b_sort => @b_sort,:type=>@type,:is_import => @is_import,:property => @property,:search=>@search})%>'); $("#homework_repository_list").html('<%= escape_javascript(render :partial => 'users/homework_repository_list', :locals => {:homeworks => @homeworks,:sort => @order,:b_sort => @b_sort,:type=>@type,:is_import => @is_import,:property => @property,:search=>@search})%>');
$("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>'); $("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
$("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>nil, :status => 0}) %>"); $("#homework_repository_detail").html("<%=escape_javascript(render :partial => 'users/homework_repository_detail', :locals => {:homework=>nil}) %>");
<% end %> <% end %>

View File

@ -29,6 +29,9 @@
<%= format_time reply.created_on %> <%= format_time reply.created_on %>
</span> </span>
<div class="ping_disfoot" style="display: none; margin-left: 4px;" id='<%=ids_r%>' > <div class="ping_disfoot" style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
<span id="reply_praise_count_<%=reply.id %>">
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
</span>
<% if User.current.admin? || reply.user.id == User.current.id || allow_delete%> <% if User.current.admin? || reply.user.id == User.current.id || allow_delete%>
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user}, <%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %> :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>

View File

@ -249,7 +249,7 @@ K.options = {
themeType : 'default', themeType : 'default',
langType : 'zh_CN', langType : 'zh_CN',
urlType : '', urlType : '',
newlineTag : 'br', newlineTag : 'p',
resizeType : 1, resizeType : 1,
syncType : 'form', syncType : 'form',
pasteType : 2, pasteType : 2,

View File

@ -1316,4 +1316,46 @@ function pop_up_box(value,tWidth,tTop,tLeft){
} }
} }
//yk 自动识别URL 并加上链接
function autoUrl(id){
if ($("#"+id).children().length > 0 ){
$("#"+id+" p,#"+ id +" span,#"+id+" em,#"+id+" h1,#"+id+" h2,#"+id+" h3,#"+id+" h4,#"+id+" strong,#"+id+" b,#"+id+" font,#"+id+" i").each(function(){
if ($(this).children().length == 0){
var html = $(this).text();
html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+([a-z]{3}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
//没有://的都加上http://
var reStr = full;
if (full.length > 0){
if (full.indexOf("://") >= 0){
reStr = "<a target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
}
else{
reStr = "<a target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
}
}
return reStr ;
});
$(this).html(html);
}
});
}
else{
var html = $("#"+id).text();
html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+([a-z]{3}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
//没有://的都加上http://
var reStr = full;
if (full.length > 0){
if (full.indexOf("://") >= 0){
reStr = "<a target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
}
else{
reStr = "<a target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
}
}
return reStr ;
});
$("#"+id).html(html);
}
}

View File

@ -61,6 +61,9 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
.hworkList160 {width:160px; text-align:center;} .hworkList160 {width:160px; text-align:center;}
.hworkList220 {width:220px; text-align:center;} .hworkList220 {width:220px; text-align:center;}
.hworkList260 {width:260px; text-align:left;} .hworkList260 {width:260px; text-align:left;}
.hworkList290 {width:290px; text-align:left;}
.hworkList340 {width:340px; text-align:left;}
.hworkList420 {width:420px; text-align:left;}
.codeList{ float:right; font-size:12px; color:#484848; padding:0px 3px; width:714px; margin-bottom:10px; } .codeList{ float:right; font-size:12px; color:#484848; padding:0px 3px; width:714px; margin-bottom:10px; }
.hworkName {width:80px; float:left; line-height:18px;} .hworkName {width:80px; float:left; line-height:18px;}
.hworkName div{max-height: 36px;overflow: hidden;} .hworkName div{max-height: 36px;overflow: hidden;}
@ -91,6 +94,8 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
.width130{width: 130px;} .width130{width: 130px;}
.width165{width: 165px;} .width165{width: 165px;}
.width180{width: 180px;} .width180{width: 180px;}
.width290{width: 290px;}
.width340{width: 340px;}
.width525{width: 525px;} .width525{width: 525px;}
.width285{width: 285px;} .width285{width: 285px;}
.width255{width: 255px;} .width255{width: 255px;}
@ -439,6 +444,7 @@ a:hover.ping_sub{ background:#14a8b9;}
/*.ping_distop span{ float:left;}*/ /*.ping_distop span{ float:left;}*/
.ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;} .ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;}
.ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;} .ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;}
.ping_disfoot span a span{ color: #6883b6;}
/*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/ /*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/
.list_style ol li{list-style-type: decimal;margin-left: 40px;} .list_style ol li{list-style-type: decimal;margin-left: 40px;}
.list_style ul li{list-style-type: disc;margin-left: 40px;} .list_style ul li{list-style-type: disc;margin-left: 40px;}

View File

@ -1,8 +1,8 @@
/*新个人主页框架css*/ /*新个人主页框架css*/
.navContainer {width:100%; background-color:#269ac9;} .navContainer {width:100%; background-color:#3b94d6;}
.homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;} .homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;}
.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;} .homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;}
.navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;} .navHomepage {width:1000px; height:54px; background-color:#3b94d6; margin:0 auto;}
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;} .navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;}
.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;} .navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;}
.navHomepageMenu:hover {background-color:#297fb8;} .navHomepageMenu:hover {background-color:#297fb8;}

View File

@ -537,10 +537,10 @@ a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat;
/*新个人主页框架css*/ /*新个人主页框架css*/
.navContainer {width:100%; margin:0 auto; background-color:#269ac9;} .navContainer {width:100%; margin:0 auto; background-color:#3b94d6;}
.homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;} .homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;}
.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;} .homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;}
.navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;} .navHomepage {width:1000px; height:54px; background-color:#3b94d6; margin:0 auto;}
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;} .navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;}
.navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;} .navHomepageMenu {margin-right:20px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;}
.navHomepageMenu:hover {background-color:#297fb8;} .navHomepageMenu:hover {background-color:#297fb8;}
@ -609,7 +609,7 @@ a.homepageMenuControl {float:left; width:180px;}
.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; width:150px; float:left;} .NewsBannerName {font-size:16px; color:#4b4b4b; display:block; width:150px; float:left;}
.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;} .newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;}
.newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;} .newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;}
.homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;} .homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; }
.homepageNewsPortrait {width:40px; display:block; margin-top:7px;} .homepageNewsPortrait {width:40px; display:block; margin-top:7px;}
.homepageNewsPublisher { max-width:100px; font-size:12px; color:#269ac9; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; } .homepageNewsPublisher { max-width:100px; font-size:12px; color:#269ac9; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; }
.homepageNewsType {padding-left: 5px; font-size:12px; color:#888888; display:block;} .homepageNewsType {padding-left: 5px; font-size:12px; color:#888888; display:block;}
@ -672,6 +672,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostDes {float:left; width:655px; margin-left:15px; overflow:hidden;} .homepagePostDes {float:left; width:655px; margin-left:15px; overflow:hidden;}
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;} .homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;} .homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
.homepagePostTitle td,.homepagePostTitle tr {border: 1px solid; border-color: inherit;}
.homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;} .homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;}
.homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;} .homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;}
.homepagePostSubmit:hover {background-color:#d8d8d8;} .homepagePostSubmit:hover {background-color:#d8d8d8;}
@ -681,10 +682,9 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostReply {width:720px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;} .homepagePostReply {width:720px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;} .homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;} .homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
.borderBottomNone {border-bottom:none !important;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;} .homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
.borderBottomNone {border-bottom:none !important;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;} .homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
.borderBottomNone {border-bottom:none !important;} .borderBottomNone {border-bottom:none !important;}
.topBorder {border-top: 1px solid #e4e4e4;} .topBorder {border-top: 1px solid #e4e4e4;}
@ -721,6 +721,7 @@ a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin:3px 5px 12px 5px;font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family:"微软雅黑","宋体";} .homepagePostReplyContent {font-size:12px; color:#484848; margin:3px 5px 12px 5px;font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family:"微软雅黑","宋体";}
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;} .homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;} .homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
.table_maxWidth table {max-width: 642px;} .table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} .homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;} .homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
@ -864,7 +865,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;} .postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;} .postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;} .postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
.postDetailDes td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;} .postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; } /*line-height: 18px !important;*/ .homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; } /*line-height: 18px !important;*/
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;} .postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;} .postDetailDate {color:#888888; font-size:12px; float:left;}
@ -1456,7 +1457,7 @@ span.at a{color:#269ac9;text-decoration: none;}
.pic_edit2:hover{display:inline-block; background:url(../images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;} .pic_edit2:hover{display:inline-block; background:url(../images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;}
.w70{ width:70px;} .w70{ width:70px;}
.w80{ width:80px;} .w80{ width:80px;}
.label03{ width:70px; text-align:right; display:block; float:left;} .label03{ width:70px; text-align:right; display:block; float:left;white-space: nowrap;}
.pro_info_p{color:#0781b4 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .pro_info_p{color:#0781b4 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
.proInfoP{color:#000000 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .proInfoP{color:#000000 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }

View File

@ -18,14 +18,14 @@
.orgUrlInput {width:200px; outline:none; border:1px solid #eaeaea; height:22px;} .orgUrlInput {width:200px; outline:none; border:1px solid #eaeaea; height:22px;}
a.saveBtn {padding:2px 10px; background-color:#269ac9; color:#ffffff;} a.saveBtn {padding:2px 10px; background-color:#269ac9; color:#ffffff;}
a.saveBtn:hover {background-color:#297fb8;} a.saveBtn:hover {background-color:#297fb8;}
.orgMemberList {width:480px; float:left;} .orgMemberList {width:420px; float:left;}
.orgColumnList {width:688px; float:left;} .orgColumnList {width:688px; float:left;}
.orgListUser {width:110px; float:left;padding-right: 10px;} .orgListUser {width:110px; float:left;padding-right: 10px;}
.orgListRole {width:180px; float:left;} .orgListRole {width:180px; float:left;}
.orgOrder {width:70px; float:left; text-align:center;} .orgOrder {width:70px; float:left; text-align:center;}
.orgSubNum {width:30px; float:left; text-align:center;} .orgSubNum {width:30px; float:left; text-align:center;}
.subNumBlock {cursor:pointer;background-color:#fffce6;color: #0d90c3; width:30px; height:17px; line-height:17px; margin:7px 0; vertical-align:middle;} .subNumBlock {cursor:pointer;background-color:#fffce6;color: #0d90c3; width:30px; height:17px; line-height:17px; margin:7px 0; vertical-align:middle;}
.orgMemContainer {width:208px;} .orgMemContainer {width:268px;}
.orgMemberAdd {float:right;} .orgMemberAdd {float:right;}
.orgAddSearch {border:1px solid #dddddd; outline:none; width:180px; height:22px; color:#9b9b9b;} .orgAddSearch {border:1px solid #dddddd; outline:none; width:180px; height:22px; color:#9b9b9b;}
.undis {display:none;} .undis {display:none;}

View File

@ -332,6 +332,7 @@ a:hover.ping_sub{ background:#14a8b9;}
/*.ping_distop span{ float:left;}*/ /*.ping_distop span{ float:left;}*/
.ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;} .ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;}
.ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;} .ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;}
.ping_disfoot span a span{ color: #6883b6;}
/*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/ /*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/
.list_style ol li{list-style-type: decimal;margin-left: 40px;} .list_style ol li{list-style-type: decimal;margin-left: 40px;}
.list_style ul li{list-style-type: disc;margin-left: 40px;} .list_style ul li{list-style-type: disc;margin-left: 40px;}
@ -470,7 +471,7 @@ a:hover.st_add{ color:#ff8e15;}
.newpro_box select{ height:29px; float:left; margin-bottom:10px;} .newpro_box select{ height:29px; float:left; margin-bottom:10px;}
/*.label{ width:80px; text-align:right; font-size:14 background-image: url(../images/true.png); }*/ /*.label{ width:80px; text-align:right; font-size:14 background-image: url(../images/true.png); }*/
.label02{ width:110px; text-align:right; font-size:14px; display:block; float:left;} .label02{ width:110px; text-align:right; font-size:14px; display:block; float:left;}
.label03{ width:70px; text-align:right; display:block; float:left;} .label03{ width:70px; text-align:right; display:block; float:left;white-space: nowrap;}
.collapsible{ border-left:none;border-right:none;border-bottom:none; border-top:1px solid #e4e4e4; padding-top:10px; } .collapsible{ border-left:none;border-right:none;border-bottom:none; border-top:1px solid #e4e4e4; padding-top:10px; }
.icon-reload { background-image: url(../images/reload.png); } .icon-reload { background-image: url(../images/reload.png); }
.icon { .icon {

View File

@ -159,6 +159,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.w230{width:230px !important;} .w230{width:230px !important;}
.w235{ width:235px !important;} .w235{ width:235px !important;}
.w250{ width:250px !important;} .w250{ width:250px !important;}
.w410{ width:410px !important;}
.w280{ width:280px;} .w280{ width:280px;}
.w265{ width: 265px;} .w265{ width: 265px;}
.w270{ width: 270px;} .w270{ width: 270px;}
@ -243,6 +244,7 @@ a.c_green{ color:#28be6c;}
.fontGrey3 {color:#484848;} .fontGrey3 {color:#484848;}
.fontGrey4{color:#999999;} .fontGrey4{color:#999999;}
.fontGrey5 {color:#a1a1a1;} .fontGrey5 {color:#a1a1a1;}
.fontGrey6 {color:#7a7a7a;}
.fontBlue {color:#3498db;} .fontBlue {color:#3498db;}
.fontBlue2 {color:#269ac9 !important;} .fontBlue2 {color:#269ac9 !important;}
a.underline {text-decoration:underline;} a.underline {text-decoration:underline;}
@ -507,10 +509,10 @@ a.uploadIcon {background:url(../images/resource_icon_list.png) 8px -60px no-repe
/*新个人主页框架css*/ /*新个人主页框架css*/
.navContainer {width:100%; margin:0 auto; background-color:#269ac9;} .navContainer {width:100%; margin:0 auto; background-color:#3b94d6;}
.homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;} .homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;}
.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;} .homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;}
.navHomepage {width:1000px; height:54px; background-color:#269ac9; margin:0 auto;} .navHomepage {width:1000px; height:54px; background-color:#3b94d6; margin:0 auto;}
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;} .navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:30px;}
.navHomepageMenu {margin-right:20px; display:inline-block;height:54px; line-height:54px; vertical-align:middle;} .navHomepageMenu {margin-right:20px; display:inline-block;height:54px; line-height:54px; vertical-align:middle;}
.navHomepageMenu:hover {background-color:#297fb8;} .navHomepageMenu:hover {background-color:#297fb8;}