Merge branch 'yuanke' into develop

Conflicts:
	app/controllers/student_work_controller.rb
	public/stylesheets/new_user.css
ouyang v20160311_01
cxt 10 years ago
commit 7d2bb572b2

@ -1,378 +1,378 @@
class HomeworkCommonController < ApplicationController class HomeworkCommonController < ApplicationController
require 'net/http' require 'net/http'
require 'json' require 'json'
require "base64" require "base64"
layout "base_courses" layout "base_courses"
include StudentWorkHelper include StudentWorkHelper
before_filter :find_course, :only => [:index,:new,:create] before_filter :find_course, :only => [:index,:new,:create]
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment,:alert_open_student_works,:open_student_works] before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment,:alert_open_student_works,:open_student_works]
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment,:alert_open_student_works,:open_student_works] before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment,:alert_open_student_works,:open_student_works]
before_filter :member_of_course, :only => [:index] before_filter :member_of_course, :only => [:index]
def index def index
@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
@page = params[:page] ? params[:page].to_i + 1 : 0 @page = params[:page] ? params[:page].to_i + 1 : 0
@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("updated_at desc").limit(10).offset(@page * 10) @homeworks = @course.homework_commons.order("updated_at desc").limit(10).offset(@page * 10)
else else
@homeworks = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("updated_at desc").limit(10).offset(@page * 10) @homeworks = @course.homework_commons.where("publish_time <= '#{Date.today}'").order("updated_at desc").limit(10).offset(@page * 10)
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]
#设置at已读 #设置at已读
@homeworks.each do |homework| @homeworks.each do |homework|
homework.journals_for_messages.each do |j| homework.journals_for_messages.each do |j|
User.current.at_messages.unviewed('JournalsForMessage', j.id).each {|x| x.viewed!} User.current.at_messages.unviewed('JournalsForMessage', j.id).each {|x| x.viewed!}
end end
end end
respond_to do |format| respond_to do |format|
format.js format.js
format.html format.html
end end
end end
#新建作业,在个人作业列表创建作业 #新建作业,在个人作业列表创建作业
def new def new
render_404 render_404
end end
#新建作业,在个人作业列表创建作业 #新建作业,在个人作业列表创建作业
def create def create
redirect_to user_homeworks_user_path(User.current.id) redirect_to user_homeworks_user_path(User.current.id)
end end
def edit def edit
@user = User.current @user = User.current
@is_in_course = params[:is_in_course].to_i @is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i @course_activity = params[:course_activity].to_i
respond_to do |format| respond_to do |format|
format.html{render :layout => 'new_base_user'} format.html{render :layout => 'new_base_user'}
end end
end end
def update def update
if params[:homework_common] if params[:homework_common]
@homework.name = params[:homework_common][:name] @homework.name = params[:homework_common][:name]
@homework.description = params[:homework_common][:description] @homework.description = params[:homework_common][:description]
if params[:homework_common][:publish_time] == "" if params[:homework_common][:publish_time] == ""
@homework.publish_time = Date.today @homework.publish_time = Date.today
else else
@homework.publish_time = params[:homework_common][:publish_time] @homework.publish_time = params[:homework_common][:publish_time]
end end
@homework.end_time = params[:homework_common][:end_time] || Time.now @homework.end_time = params[:homework_common][:end_time] || Time.now
@homework.course_id = params[:course_id] @homework.course_id = params[:course_id]
@homework.anonymous_comment = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment] : 0 @homework.anonymous_comment = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment] : 0
homework_detail_manual = @homework.homework_detail_manual || HomeworkDetailManual.new homework_detail_manual = @homework.homework_detail_manual || HomeworkDetailManual.new
if @homework.publish_time <= Date.today && homework_detail_manual.comment_status == 0 if @homework.publish_time <= Date.today && homework_detail_manual.comment_status == 0
homework_detail_manual.comment_status = 1 homework_detail_manual.comment_status = 1
end end
homework_detail_manual.evaluation_start = params[:evaluation_start].blank? ? @homework.end_time + 7 : params[:evaluation_start] homework_detail_manual.evaluation_start = params[:evaluation_start].blank? ? @homework.end_time + 7 : params[:evaluation_start]
homework_detail_manual.evaluation_end = params[:evaluation_end].blank? ? homework_detail_manual.evaluation_start + 7 : params[:evaluation_end] homework_detail_manual.evaluation_end = params[:evaluation_end].blank? ? homework_detail_manual.evaluation_start + 7 : params[:evaluation_end]
@homework.save_attachments(params[:attachments]) @homework.save_attachments(params[:attachments])
render_attachment_warning_if_needed(@homework) render_attachment_warning_if_needed(@homework)
#编程作业相关属性 #编程作业相关属性
if @homework.homework_type == 2 if @homework.homework_type == 2
@homework.homework_detail_programing ||= HomeworkDetailPrograming.new @homework.homework_detail_programing ||= HomeworkDetailPrograming.new
@homework_detail_programing = @homework.homework_detail_programing @homework_detail_programing = @homework.homework_detail_programing
@homework_detail_programing.language = params[:language_type].to_i @homework_detail_programing.language = params[:language_type].to_i
@homework.homework_tests.delete_all @homework.homework_tests.delete_all
inputs = params[:program][:input] inputs = params[:program][:input]
if Array === inputs if Array === inputs
inputs.each_with_index do |val, i| inputs.each_with_index do |val, i|
@homework.homework_tests << HomeworkTest.new( @homework.homework_tests << HomeworkTest.new(
input: val, input: val,
output: params[:program][:output][i] output: params[:program][:output][i]
) )
end end
end end
end end
#分组作业 #分组作业
if @homework.homework_type == 3 if @homework.homework_type == 3
@homework.homework_detail_group ||= HomeworkDetailGroup.new @homework.homework_detail_group ||= HomeworkDetailGroup.new
@homework_detail_group = @homework.homework_detail_group @homework_detail_group = @homework.homework_detail_group
@homework_detail_group.min_num = params[:min_num].to_i @homework_detail_group.min_num = params[:min_num].to_i
@homework_detail_group.max_num = params[:max_num].to_i @homework_detail_group.max_num = params[:max_num].to_i
@homework_detail_group.base_on_project = params[:base_on_project].to_i @homework_detail_group.base_on_project = params[:base_on_project].to_i
end end
if @homework.save if @homework.save
@homework_detail_manual.save if @homework_detail_manual @homework_detail_manual.save if @homework_detail_manual
@homework_detail_programing.save if @homework_detail_programing @homework_detail_programing.save if @homework_detail_programing
@homework_detail_group.save if @homework_detail_group @homework_detail_group.save if @homework_detail_group
if params[:is_in_course] == "1" if params[:is_in_course] == "1"
redirect_to homework_common_index_path(:course => @course.id) redirect_to homework_common_index_path(:course => @course.id)
elsif params[:is_in_course] == "0" elsif params[:is_in_course] == "0"
redirect_to user_homeworks_user_path(User.current.id) redirect_to user_homeworks_user_path(User.current.id)
elsif params[:is_in_course] == "-1" && params[:course_activity] == "0" elsif params[:is_in_course] == "-1" && params[:course_activity] == "0"
redirect_to user_path(User.current.id) redirect_to user_path(User.current.id)
elsif params[:is_in_course] == "-1" && params[:course_activity] == "1" elsif params[:is_in_course] == "-1" && params[:course_activity] == "1"
redirect_to course_path(@course.id) redirect_to course_path(@course.id)
end end
end end
end end
end end
def destroy def destroy
if @homework.destroy if @homework.destroy
respond_to do |format| respond_to do |format|
format.html { format.html {
if params[:is_in_course] == "1" if params[:is_in_course] == "1"
redirect_to homework_common_index_path(:course => @course.id) redirect_to homework_common_index_path(:course => @course.id)
elsif params[:is_in_course] == "0" elsif params[:is_in_course] == "0"
redirect_to user_homeworks_user_path(User.current.id) redirect_to user_homeworks_user_path(User.current.id)
elsif params[:is_in_course] == "-1" && params[:course_activity] == "0" elsif params[:is_in_course] == "-1" && params[:course_activity] == "0"
redirect_to user_path(User.current.id) redirect_to user_path(User.current.id)
elsif params[:is_in_course] == "-1" && params[:course_activity] == "1" elsif params[:is_in_course] == "-1" && params[:course_activity] == "1"
redirect_to course_path(@course.id) redirect_to course_path(@course.id)
end end
} }
end end
end end
end end
#开启匿评 #开启匿评
#statue 1:启动成功2启动失败作业总数大于等于2份时才能启动匿评3:已开启匿评,请务重复开启,4:没有开启匿评的权限 #statue 1:启动成功2启动失败作业总数大于等于2份时才能启动匿评3:已开启匿评,请务重复开启,4:没有开启匿评的权限
def start_anonymous_comment def start_anonymous_comment
@statue = 4 and return unless User.current.admin? || User.current.allowed_to?(:as_teacher,@course) @statue = 4 and return unless User.current.admin? || User.current.allowed_to?(:as_teacher,@course)
@statue = 5 and return if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") @statue = 5 and return if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
if @homework_detail_manual.comment_status == 1 if @homework_detail_manual.comment_status == 1
student_works = @homework.student_works student_works = @homework.student_works
if student_works && student_works.size >= 2 if student_works && student_works.size >= 2
if @homework.homework_type == 3 if @homework.homework_type == 3
student_work_projects = @homework.student_work_projects.where("student_work_id is not null") student_work_projects = @homework.student_work_projects.where("student_work_id is not null")
student_work_projects.each_with_index do |pro_work, pro_index| student_work_projects.each_with_index do |pro_work, pro_index|
n = @homework_detail_manual.evaluation_num n = @homework_detail_manual.evaluation_num
n = n < student_works.size ? n : student_works.size - 1 n = n < student_works.size ? n : student_works.size - 1
work_index = -1 work_index = -1
student_works.each_with_index do |stu_work, stu_index| student_works.each_with_index do |stu_work, stu_index|
if stu_work.id.to_i == pro_work.student_work_id.to_i if stu_work.id.to_i == pro_work.student_work_id.to_i
work_index = stu_index work_index = stu_index
end end
end end
assigned_homeworks = get_assigned_homeworks(student_works, n, work_index) assigned_homeworks = get_assigned_homeworks(student_works, n, work_index)
assigned_homeworks.each do |h| assigned_homeworks.each do |h|
student_works_evaluation_distributions = StudentWorksEvaluationDistribution.new(user_id: pro_work.user_id, student_work_id: h.id) student_works_evaluation_distributions = StudentWorksEvaluationDistribution.new(user_id: pro_work.user_id, student_work_id: h.id)
student_works_evaluation_distributions.save student_works_evaluation_distributions.save
end end
end end
else else
student_works.each_with_index do |work, index| student_works.each_with_index do |work, index|
user = work.user user = work.user
n = @homework_detail_manual.evaluation_num n = @homework_detail_manual.evaluation_num
n = n < student_works.size ? n : student_works.size - 1 n = n < student_works.size ? n : student_works.size - 1
assigned_homeworks = get_assigned_homeworks(student_works, n, index) assigned_homeworks = get_assigned_homeworks(student_works, n, index)
assigned_homeworks.each do |h| assigned_homeworks.each do |h|
student_works_evaluation_distributions = StudentWorksEvaluationDistribution.new(user_id: user.id, student_work_id: h.id) student_works_evaluation_distributions = StudentWorksEvaluationDistribution.new(user_id: user.id, student_work_id: h.id)
student_works_evaluation_distributions.save student_works_evaluation_distributions.save
end end
end end
end end
@homework_detail_manual.update_column('comment_status', 2) @homework_detail_manual.update_column('comment_status', 2)
@homework_detail_manual.update_column('evaluation_start', Date.today) @homework_detail_manual.update_column('evaluation_start', Date.today)
@statue = 1 @statue = 1
# 匿评开启消息邮件通知 # 匿评开启消息邮件通知
send_message_anonymous_comment(@homework, m_status = 2) send_message_anonymous_comment(@homework, m_status = 2)
Mailer.send_mail_anonymous_comment_open(@homework).deliver Mailer.send_mail_anonymous_comment_open(@homework).deliver
else else
@statue = 2 @statue = 2
end end
else else
@statue = 3 @statue = 3
end end
@user_activity_id = params[:user_activity_id].to_i @user_activity_id = params[:user_activity_id].to_i
@is_in_course = params[:is_in_course].to_i @is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i @course_activity = params[:course_activity].to_i
end end
#关闭匿评 #关闭匿评
def stop_anonymous_comment def stop_anonymous_comment
@homework_detail_manual.update_column('comment_status', 3) @homework_detail_manual.update_column('comment_status', 3)
@homework_detail_manual.update_column('evaluation_end', Date.today) @homework_detail_manual.update_column('evaluation_end', Date.today)
#计算缺评扣分 #计算缺评扣分
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")" work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
@homework.student_works.each do |student_work| @homework.student_works.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0 student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
student_work.save student_work.save
end end
# 匿评关闭消息邮件通知 # 匿评关闭消息邮件通知
send_message_anonymous_comment(@homework, m_status = 3) send_message_anonymous_comment(@homework, m_status = 3)
Mailer.send_mail_anonymous_comment_close(@homework).deliver Mailer.send_mail_anonymous_comment_close(@homework).deliver
@user_activity_id = params[:user_activity_id].to_i @user_activity_id = params[:user_activity_id].to_i
@is_in_course = params[:is_in_course].to_i @is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i @course_activity = params[:course_activity].to_i
respond_to do |format| respond_to do |format|
format.js format.js
end end
end end
# 开启/关闭匿评消息通知 # 开启/关闭匿评消息通知
def send_message_anonymous_comment(homework, m_status ) def send_message_anonymous_comment(homework, m_status )
# status 标记匿评状态 1为关闭 0为开启 # status 标记匿评状态 1为关闭 0为开启
course = homework.course course = homework.course
course.members.each do |m| course.members.each do |m|
@homework.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => m_status) @homework.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => m_status)
end end
end end
#提示 #提示
def alert_anonymous_comment def alert_anonymous_comment
@cur_size = 0 @cur_size = 0
@totle_size = 0 @totle_size = 0
if @homework_detail_manual.comment_status == 1 if @homework_detail_manual.comment_status == 1
@totle_size = @course.student.count @totle_size = @course.student.count
@cur_size = @homework.student_works.size @cur_size = @homework.student_works.size
elsif @homework_detail_manual.comment_status == 2 elsif @homework_detail_manual.comment_status == 2
@homework.student_works.map { |work| @totle_size += work.student_works_evaluation_distributions.count} @homework.student_works.map { |work| @totle_size += work.student_works_evaluation_distributions.count}
@cur_size = 0 @cur_size = 0
@homework.student_works.map { |work| @cur_size += work.student_works_scores.where(:reviewer_role => 3).count} @homework.student_works.map { |work| @cur_size += work.student_works_scores.where(:reviewer_role => 3).count}
end end
@percent = format("%.2f",(@cur_size.to_f / ( @totle_size == 0 ? 1 : @totle_size)) * 100) @percent = format("%.2f",(@cur_size.to_f / ( @totle_size == 0 ? 1 : @totle_size)) * 100)
@user_activity_id = params[:user_activity_id].to_i @user_activity_id = params[:user_activity_id].to_i
@is_in_course = params[:is_in_course].to_i @is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i @course_activity = params[:course_activity].to_i
respond_to do |format| respond_to do |format|
format.js format.js
end end
end end
def alert_forbidden_anonymous_comment def alert_forbidden_anonymous_comment
if params[:user_activity_id] if params[:user_activity_id]
@user_activity_id = params[:user_activity_id] @user_activity_id = params[:user_activity_id]
else else
@user_activity_id = -1 @user_activity_id = -1
end end
@is_in_course = params[:is_in_course] if params[:is_in_course] @is_in_course = params[:is_in_course] if params[:is_in_course]
@course_activity = params[:course_activity] if params[:course_Activity] @course_activity = params[:course_activity] if params[:course_Activity]
respond_to do |format| respond_to do |format|
format.js format.js
end end
end end
def open_student_works def open_student_works
if @homework.is_open == 0 if @homework.is_open == 0
@homework.update_attribute(:is_open, 1) @homework.update_attribute(:is_open, 1)
else else
@homework.update_attribute(:is_open, 0) @homework.update_attribute(:is_open, 0)
end end
@user_activity_id = params[:user_activity_id] @user_activity_id = params[:user_activity_id]
@is_in_course = params[:is_in_course] if params[:is_in_course] @is_in_course = params[:is_in_course] if params[:is_in_course]
@course_activity = params[:course_activity] if params[:course_Activity] @course_activity = params[:course_activity] if params[:course_Activity]
end end
def alert_open_student_works def alert_open_student_works
if params[:user_activity_id] if params[:user_activity_id]
@user_activity_id = params[:user_activity_id] @user_activity_id = params[:user_activity_id]
else else
@user_activity_id = -1 @user_activity_id = -1
end end
@is_in_course = params[:is_in_course] if params[:is_in_course] @is_in_course = params[:is_in_course] if params[:is_in_course]
@course_activity = params[:course_activity] if params[:course_Activity] @course_activity = params[:course_activity] if params[:course_Activity]
respond_to do |format| respond_to do |format|
format.js format.js
end end
end end
def programing_test def programing_test
test = {language:params[:language],src:Base64.encode64(params[:src]),input:[params[:input]],output:[params[:output]]} test = {language:params[:language],src:Base64.encode64(params[:src]),input:[params[:input]],output:[params[:output]]}
@index = params[:index] @index = params[:index]
uri = URI('http://192.168.80.21:8080/api/realtime.json') uri = URI('http://192.168.80.21:8080/api/realtime.json')
body = test.to_json body = test.to_json
res = Net::HTTP.new(uri.host, uri.port).start do |client| res = Net::HTTP.new(uri.host, uri.port).start do |client|
request = Net::HTTP::Post.new(uri.path) request = Net::HTTP::Post.new(uri.path)
request.body = body request.body = body
request["Content-Type"] = "application/json" request["Content-Type"] = "application/json"
client.request(request) client.request(request)
end end
result = JSON.parse(res.body) result = JSON.parse(res.body)
@err_msg = result["compile_error_msg"] @err_msg = result["compile_error_msg"]
result["results"].each do |re| result["results"].each do |re|
@result = re["status"] @result = re["status"]
end end
end end
#启动匿评参数设置 #启动匿评参数设置
def start_evaluation_set def start_evaluation_set
if params[:user_activity_id] if params[:user_activity_id]
@user_activity_id = params[:user_activity_id] @user_activity_id = params[:user_activity_id]
else else
@user_activity_id = -1 @user_activity_id = -1
end end
@is_in_course = params[:is_in_course] @is_in_course = params[:is_in_course]
@course_activity = params[:course_activity].to_i @course_activity = params[:course_activity].to_i
end end
#设置匿评参数 #设置匿评参数
def set_evaluation_attr def set_evaluation_attr
if @homework_detail_manual if @homework_detail_manual
unless params[:evaluation_start].to_s == @homework_detail_manual.evaluation_start.to_s unless params[:evaluation_start].to_s == @homework_detail_manual.evaluation_start.to_s
@homework_detail_manual.evaluation_start = params[:evaluation_start] @homework_detail_manual.evaluation_start = params[:evaluation_start]
end end
unless @homework_detail_manual.evaluation_end.to_s == params[:evaluation_end].to_s unless @homework_detail_manual.evaluation_end.to_s == params[:evaluation_end].to_s
@homework_detail_manual.evaluation_end = params[:evaluation_end] @homework_detail_manual.evaluation_end = params[:evaluation_end]
end end
@homework_detail_manual.evaluation_num = params[:evaluation_num] @homework_detail_manual.evaluation_num = params[:evaluation_num]
@homework_detail_manual.save @homework_detail_manual.save
@user_activity_id = params[:user_activity_id].to_i @user_activity_id = params[:user_activity_id].to_i
@is_in_course = params[:is_in_course].to_i @is_in_course = params[:is_in_course].to_i
@course_activity = params[:course_activity].to_i @course_activity = params[:course_activity].to_i
end end
end end
#评分设置 #评分设置
def score_rule_set def score_rule_set
if params[:user_activity_id] if params[:user_activity_id]
@user_activity_id = params[:user_activity_id] @user_activity_id = params[:user_activity_id]
else else
@user_activity_id = -1 @user_activity_id = -1
end end
@is_in_course = params[:is_in_course] @is_in_course = params[:is_in_course]
@course_activity = params[:course_activity].to_i @course_activity = params[:course_activity].to_i
end end
private private
#获取课程 #获取课程
def find_course def find_course
@course = Course.find params[:course] @course = Course.find params[:course]
rescue rescue
render_404 render_404
end end
#获取作业 #获取作业
def find_homework def find_homework
@homework = HomeworkCommon.find params[:id] @homework = HomeworkCommon.find params[:id]
@homework_detail_manual = @homework.homework_detail_manual @homework_detail_manual = @homework.homework_detail_manual
@homework_detail_programing = @homework.homework_detail_programing @homework_detail_programing = @homework.homework_detail_programing
@homework_detail_group = @homework.homework_detail_group @homework_detail_group = @homework.homework_detail_group
@course = @homework.course @course = @homework.course
rescue rescue
render_404 render_404
end end
#是不是课程的老师 #是不是课程的老师
def teacher_of_course def teacher_of_course
render_403 unless User.current.allowed_to?(:as_teacher,@course) || User.current.admin? render_403 unless User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
end end
#当前用户是不是课程的成员 #当前用户是不是课程的成员
def member_of_course def member_of_course
render_403 unless @course.is_public==1 || User.current.member_of_course?(@course) || User.current.admin? render_403 unless @course.is_public==1 || User.current.member_of_course?(@course) || User.current.admin?
end end
def get_assigned_homeworks(student_works, n, index) def get_assigned_homeworks(student_works, n, index)
student_works += student_works student_works += student_works
student_works[index + 1 .. index + n] student_works[index + 1 .. index + n]
end end
end end

@ -1,185 +1,185 @@
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang # Copyright (C) 2006-2013 Jean-Philippe Lang
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 # as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. # of the License, or (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class Member < ActiveRecord::Base class Member < ActiveRecord::Base
belongs_to :user belongs_to :user
belongs_to :principal, :foreign_key => 'user_id' belongs_to :principal, :foreign_key => 'user_id'
has_many :member_roles, :dependent => :destroy has_many :member_roles, :dependent => :destroy
has_many :roles, :through => :member_roles has_many :roles, :through => :member_roles
belongs_to :project belongs_to :project
belongs_to :course belongs_to :course
belongs_to :course_group belongs_to :course_group
validates_presence_of :principal validates_presence_of :principal
validates_uniqueness_of :user_id, :scope => [:project_id,:course_id] validates_uniqueness_of :user_id, :scope => [:project_id,:course_id]
validate :validate_role validate :validate_role
before_destroy :set_issue_category_nil before_destroy :set_issue_category_nil
# 删除项目成员一并删除该成员的邀请记录 # 删除项目成员一并删除该成员的邀请记录
after_destroy :delete_ivite_list after_destroy :delete_ivite_list
def role def role
end end
def role= def role=
end end
def name def name
self.user.name self.user.name
end end
alias :base_role_ids= :role_ids= alias :base_role_ids= :role_ids=
def role_ids=(arg) def role_ids=(arg)
ids = (arg || []).collect(&:to_i) - [0] ids = (arg || []).collect(&:to_i) - [0]
# Keep inherited roles # Keep inherited roles
ids += member_roles.select {|mr| !mr.inherited_from.nil?}.collect(&:role_id) ids += member_roles.select {|mr| !mr.inherited_from.nil?}.collect(&:role_id)
new_role_ids = ids - role_ids new_role_ids = ids - role_ids
# Add new roles # Add new roles
new_role_ids.each {|id| member_roles << MemberRole.new(:role_id => id) } new_role_ids.each {|id| member_roles << MemberRole.new(:role_id => id) }
# Remove roles (Rails' #role_ids= will not trigger MemberRole#on_destroy) # Remove roles (Rails' #role_ids= will not trigger MemberRole#on_destroy)
member_roles_to_destroy = member_roles.select {|mr| !ids.include?(mr.role_id)} member_roles_to_destroy = member_roles.select {|mr| !ids.include?(mr.role_id)}
if member_roles_to_destroy.any? if member_roles_to_destroy.any?
member_roles_to_destroy.each(&:destroy) member_roles_to_destroy.each(&:destroy)
end end
end end
def <=>(member) def <=>(member)
a, b = roles.sort.first, member.roles.sort.first a, b = roles.sort.first, member.roles.sort.first
if a == b if a == b
if principal if principal
principal <=> member.principal principal <=> member.principal
else else
1 1
end end
elsif a elsif a
a <=> b a <=> b
else else
1 1
end end
end end
def deletable? def deletable?
member_roles.detect {|mr| mr.inherited_from}.nil? member_roles.detect {|mr| mr.inherited_from}.nil?
end end
def include?(user) def include?(user)
if principal.is_a?(Group) if principal.is_a?(Group)
!user.nil? && user.groups.include?(principal) !user.nil? && user.groups.include?(principal)
else else
self.user == user self.user == user
end end
end end
def set_issue_category_nil def set_issue_category_nil
if user if user
# remove category based auto assignments for this member # remove category based auto assignments for this member
#modify by nwb #modify by nwb
if project if project
IssueCategory.update_all "assigned_to_id = NULL", ["project_id = ? AND assigned_to_id = ?", project.id, user.id] IssueCategory.update_all "assigned_to_id = NULL", ["project_id = ? AND assigned_to_id = ?", project.id, user.id]
elsif course elsif course
#IssueCategory.update_all "assigned_to_id = NULL", ["course_id = ? AND assigned_to_id = ?", course.id, user.id] #IssueCategory.update_all "assigned_to_id = NULL", ["course_id = ? AND assigned_to_id = ?", course.id, user.id]
end end
end end
end end
# 删除成员一并删除该成员的邀请信息 # 删除成员一并删除该成员的邀请信息
def delete_ivite_list def delete_ivite_list
member_invite_lists = InviteList.where("user_id =? and project_id =?", self.user_id, self.project_id) member_invite_lists = InviteList.where("user_id =? and project_id =?", self.user_id, self.project_id)
unless member_invite_lists.nil? unless member_invite_lists.nil?
member_invite_lists.each do |member_invite_list| member_invite_lists.each do |member_invite_list|
member_invite_list.destroy member_invite_list.destroy
end end
end end
end end
# Find or initilize a Member with an id, attributes, and for a Principal # Find or initilize a Member with an id, attributes, and for a Principal
def self.edit_membership(id, new_attributes, principal=nil) def self.edit_membership(id, new_attributes, principal=nil)
@membership = id.present? ? Member.find(id) : Member.new(:principal => principal) @membership = id.present? ? Member.find(id) : Member.new(:principal => principal)
@membership.attributes = new_attributes @membership.attributes = new_attributes
@membership @membership
end end
# Finds or initilizes a Member for the given project and principal # Finds or initilizes a Member for the given project and principal
def self.find_or_new(project, principal) def self.find_or_new(project, principal)
project_id = project.is_a?(Project) ? project.id : project project_id = project.is_a?(Project) ? project.id : project
principal_id = principal.is_a?(Principal) ? principal.id : principal principal_id = principal.is_a?(Principal) ? principal.id : principal
member = Member.find_by_project_id_and_user_id(project_id, principal_id) member = Member.find_by_project_id_and_user_id(project_id, principal_id)
member ||= Member.new(:project_id => project_id, :user_id => principal_id) member ||= Member.new(:project_id => project_id, :user_id => principal_id)
member member
end end
# 查找每个学生每个作业的评分 # 查找每个学生每个作业的评分
def student_homework_score def student_homework_score
homework_score = StudentWork.find_by_sql("SELECT homework_commons.name,student_works.final_score as score homework_score = StudentWork.find_by_sql("SELECT homework_commons.name,student_works.final_score as score
FROM student_works,homework_commons FROM student_works,homework_commons
WHERE student_works.homework_common_id = homework_commons.id WHERE student_works.homework_common_id = homework_commons.id
AND homework_commons.course_id = #{self.course_id} AND homework_commons.course_id = #{self.course_id}
AND student_works.user_id = #{self.user_id}") AND student_works.user_id = #{self.user_id}")
score_count = StudentWork.joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}").average(:final_score).try(:round, 2).to_f score_count = StudentWork.joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}").average(:final_score).try(:round, 2).to_f
[homework_score, format("%0.2f", score_count)] [homework_score, format("%0.2f", score_count)]
end end
def student_work_score def student_work_score
StudentWork.select("homework_commons.name, student_works.final_score").joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}") StudentWork.select("homework_commons.name, student_works.final_score").joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}")
end end
#当前课程的作业列表 #当前课程的作业列表
def homework_common_list def homework_common_list
HomeworkCommon.where(:course_id => self.course_id) HomeworkCommon.where(:course_id => self.course_id)
end end
#当前学生在指定作业内的得分 #当前学生在指定作业内的得分
def homework_common_score homework_common def homework_common_score homework_common
StudentWork.select("IF(final_score is null,null,IF(final_score = 0, 0, final_score - absence_penalty - late_penalty)) as final_score").where(:homework_common_id => homework_common.id,:user_id => self.user_id) StudentWork.select("IF(final_score is null,null,IF(final_score = 0, 0, final_score - absence_penalty - late_penalty)) as final_score").where(:homework_common_id => homework_common.id,:user_id => self.user_id)
end end
def student_work_score_avg def student_work_score_avg
StudentWork.joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}").average(:final_score).try(:round, 2).to_f StudentWork.joins(:homework_common).where("student_works.user_id = #{self.user_id} and homework_commons.course_id = #{self.course_id}").average(:final_score).try(:round, 2).to_f
end end
def student_work_score_sum def student_work_score_sum
sql_select = "SELECT (SUM(IF(student_works.final_score IS NULL,NULL,IF(student_works.final_score =0,0,student_works.final_score - student_works.absence_penalty - student_works.late_penalty)))) as score sql_select = "SELECT (SUM(IF(student_works.final_score IS NULL,NULL,IF(student_works.final_score =0,0,student_works.final_score - student_works.absence_penalty - student_works.late_penalty)))) as score
FROM student_works,homework_commons FROM student_works,homework_commons
WHERE student_works.homework_common_id = homework_commons.id WHERE student_works.homework_common_id = homework_commons.id
AND homework_commons.course_id = #{self.course_id} AND homework_commons.course_id = #{self.course_id}
AND student_works.user_id = #{self.user_id}" AND student_works.user_id = #{self.user_id}"
score = StudentWork.find_by_sql(sql_select) score = StudentWork.find_by_sql(sql_select)
end end
protected protected
def validate_role def validate_role
errors.add_on_empty :role if member_roles.empty? && roles.empty? errors.add_on_empty :role if member_roles.empty? && roles.empty?
end end
def searchTeacherAndAssistant project def searchTeacherAndAssistant project
#searchPeopleByRoles(project, TeacherRoles) #searchPeopleByRoles(project, TeacherRoles)
members = [] members = []
project.members.each do |m| project.members.each do |m|
members << m if m && m.user && m.user.allowed_to?(:as_teacher,project) members << m if m && m.user && m.user.allowed_to?(:as_teacher,project)
end end
members members
end end
end end

@ -1,21 +1,21 @@
<div class="ReplyToMessageContainer borderBottomNone"id="reply_to_message_<%= reply.id%>"> <div class="ReplyToMessageContainer borderBottomNone"id="reply_to_message_<%= reply.id%>">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
<div class="ReplyToMessageInputContainer mb10"> <div class="ReplyToMessageInputContainer mb10">
<div nhname='new_message_<%= reply.id%>'> <div nhname='new_message_<%= reply.id%>'>
<%= form_for @blog_comment, :as => :reply, :url => {:controller => 'blog_comments',:action => 'reply', :id => @blogComment.id}, :html => {:multipart => true, :id => 'new_form'} do |f| %> <%= form_for @blog_comment, :as => :reply, :url => {:controller => 'blog_comments',:action => 'reply', :id => @blogComment.id}, :html => {:multipart => true, :id => 'new_form'} do |f| %>
<input type="hidden" name="quote[quote]" id="quote_quote"> <input type="hidden" name="quote[quote]" id="quote_quote">
<% if course_id%> <% if course_id%>
<input type="hidden" name="course_id" id="" value="<%= course_id%>"> <input type="hidden" name="course_id" id="" value="<%= course_id%>">
<% end %> <% end %>
<input type="hidden" name="blog_comment[title]" id="reply_subject"> <input type="hidden" name="blog_comment[title]" id="reply_subject">
<div nhname='toolbar_container_<%= reply.id%>'></div> <div nhname='toolbar_container_<%= reply.id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="blog_comment[content]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="blog_comment[content]"></textarea>
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a> <a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= reply.id%>'></p> <p nhname='contentmsg_<%= reply.id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>

@ -1,226 +1,226 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id%>" > <div class="resources mt10" id="user_activity_<%= user_activity_id%>" >
<div class="homepagePostBrief" onmouseover="$('#message_setting_<%=activity.id%>').show();" onmouseout="$('#message_setting_<%= activity.id%>').hide();"> <div class="homepagePostBrief" onmouseover="$('#message_setting_<%=activity.id%>').show();" onmouseout="$('#message_setting_<%= activity.id%>').hide();">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<% if activity.author.id == User.current.id%> <% if activity.author.id == User.current.id%>
<div class="homepagePostSetting" id="message_setting_<%= activity.id%>" style="display: none"> <div class="homepagePostSetting" id="message_setting_<%= activity.id%>" style="display: none">
<ul> <ul>
<li class="homepagePostSettingIcon"> <li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText"> <ul class="homepagePostSettiongText">
<li> <li>
<%= link_to( <%= link_to(
l(:button_edit), l(:button_edit),
{:controller => 'blog_comments',:action => 'edit',:user_id=>activity.author_id,:blog_id=>activity.blog_id, :id => activity.id}, {:controller => 'blog_comments',:action => 'edit',:user_id=>activity.author_id,:blog_id=>activity.blog_id, :id => activity.id},
:class => 'postOptionLink' :class => 'postOptionLink'
) if User.current && User.current.id == activity.author.id %> ) if User.current && User.current.id == activity.author.id %>
</li> </li>
<li> <li>
<%= link_to( <%= link_to(
l(:button_delete), l(:button_delete),
{:controller => 'blog_comments',:action => 'destroy',:user_id=>activity.author_id,:blog_id=>activity.blog_id, :id => activity.id}, {:controller => 'blog_comments',:action => 'destroy',:user_id=>activity.author_id,:blog_id=>activity.blog_id, :id => activity.id},
:method => :delete, :method => :delete,
:data => {:confirm => l(:text_are_you_sure)}, :data => {:confirm => l(:text_are_you_sure)},
:class => 'postOptionLink' :class => 'postOptionLink'
) if User.current && User.current.id == activity.author.id %> ) if User.current && User.current.id == activity.author.id %>
</li> </li>
<li> <li>
<% if activity.id == activity.blog.homepage_id %> <% if activity.id == activity.blog.homepage_id %>
<%= link_to( <%= link_to(
l(:button_cancel_homepage), l(:button_cancel_homepage),
{:controller => 'blogs',:action => 'cancel_homepage',:user_id=>activity.author_id,:id=>activity.blog_id, :article_id => activity.id}, {:controller => 'blogs',:action => 'cancel_homepage',:user_id=>activity.author_id,:id=>activity.blog_id, :article_id => activity.id},
:method => :post, :method => :post,
:class => 'postOptionLink' :class => 'postOptionLink'
) if User.current && User.current.id == activity.blog.author_id %> ) if User.current && User.current.id == activity.blog.author_id %>
<% else %> <% else %>
<%= link_to( <%= link_to(
l(:button_set_homepage), l(:button_set_homepage),
{:controller => 'blogs',:action => 'set_homepage',:user_id=>activity.author_id,:id=>activity.blog_id, :article_id => activity.id}, {:controller => 'blogs',:action => 'set_homepage',:user_id=>activity.author_id,:id=>activity.blog_id, :article_id => activity.id},
:method => :post, :method => :post,
:class => 'postOptionLink' :class => 'postOptionLink'
) if User.current && User.current.id == activity.blog.author_id %> ) if User.current && User.current.id == activity.blog.author_id %>
<% end %> <% end %>
</li> </li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
<%end%> <%end%>
<div class="homepagePostTo mt-4 fl"> <div class="homepagePostTo mt-4 fl">
<% if activity.try(:author).try(:realname) == ' ' %> <% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
<% end %> <% end %>
TO TO
<%= link_to activity.blog.name+" | 博客", user_blogs_path(:user_id=>activity.author_id,:host=>Setting.host_user), :class => "newsBlue ml15 mr5"%> <%= link_to activity.blog.name+" | 博客", user_blogs_path(:user_id=>activity.author_id,:host=>Setting.host_user), :class => "newsBlue ml15 mr5"%>
<% if activity.blog.homepage_id and activity.id == activity.blog.homepage_id %> <% if activity.blog.homepage_id and activity.id == activity.blog.homepage_id %>
<span class="red_homework_btn_cir ml5">已设为首页</span> <span class="red_homework_btn_cir ml5">已设为首页</span>
<% end %> <% end %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div class="homepagePostTitle hidden m_w530 fl"> <div class="homepagePostTitle hidden m_w530 fl">
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"--> <% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
<%= link_to activity.title.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author_id, :blog_id=>activity.blog.id,:id=>activity), :class=> "postGrey" %> <%= link_to activity.title.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author_id, :blog_id=>activity.blog.id,:id=>activity), :class=> "postGrey" %>
<% else %> <% else %>
<%= link_to activity.title.subject.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author_id, :blog_id=>activity.blog.id,:id=>activity), :class=> "postGrey"%> <%= link_to activity.title.subject.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author_id, :blog_id=>activity.blog.id,:id=>activity), :class=> "postGrey"%>
<% end %> <% end %>
</div> </div>
<% if activity.sticky == 1%> <% if activity.sticky == 1%>
<span class="sticky_btn_cir ml10">置顶</span> <span class="sticky_btn_cir ml10">置顶</span>
<% end%> <% end%>
<% if activity.locked%> <% if activity.locked%>
<span class="locked_btn_cir ml10 fl" title="已锁定">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class="locked_btn_cir ml10 fl" title="已锁定">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<% end%> <% end%>
<div class="cl"></div> <div class="cl"></div>
<div class="homepagePostDate fl"> <div class="homepagePostDate fl">
发帖时间:<%= format_time(activity.created_on) %> 发帖时间:<%= format_time(activity.created_on) %>
</div> </div>
<div class="homepagePostDate fl ml15"> <div class="homepagePostDate fl ml15">
更新时间:<%= format_time(activity.updated_on) %> 更新时间:<%= format_time(activity.updated_on) %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<% if activity.parent_id.nil? %> <% if activity.parent_id.nil? %>
<% content= activity.content%> <% content= activity.content%>
<% else %> <% else %>
<% content= activity.parent.content%> <% content= activity.parent.content%>
<% end %> <% end %>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %>
<div class="cl"></div> <div class="cl"></div>
<!--<div class=" fl" style="width: 600px"> <!--<div class=" fl" style="width: 600px">
<%# if activity.attachments.any?%> <%# if activity.attachments.any?%>
<%# options = {:author => true, :deletable => false } %> <%# options = {:author => true, :deletable => false } %>
<%#= render :partial => 'blog_comments/attachments_links', :locals => {:attachments => activity.attachments, :options => options, :is_float => true} %> <%#= render :partial => 'blog_comments/attachments_links', :locals => {:attachments => activity.attachments, :options => options, :is_float => true} %>
<%# end %> <%# end %>
</div> </div>
<div class="cl"></div>--> <div class="cl"></div>-->
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div> <div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div> <div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div> <div class="cl"></div>
<div class="mt10" style="font-weight:normal;"> <div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %> <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div> </div>
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden"> <div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
<ul> <ul>
<li class="homepagePostSettingIcon"> <li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText"> <ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li> <li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li> <li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li> <li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% count=0 %> <% count=0 %>
<% if activity.parent %> <% if activity.parent %>
<% count=activity.parent.children.count%> <% count=activity.parent.children.count%>
<% else %> <% else %>
<% count=activity.children.count%> <% count=activity.children.count%>
<% end %> <% end %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<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 %> <% if activity.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> <span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %> <% end %>
</span> </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 %>
<div class="homepagePostReplyBannerMore"> <div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" > <a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多 展开更多
</a> </a>
</div> </div>
<% end %> <% end %>
</div> </div>
<% activity= activity.parent ? activity.parent : activity%> <% activity= activity.parent ? activity.parent : activity%>
<% replies_all_i = 0 %> <% replies_all_i = 0 %>
<% if count > 0 %> <% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% activity.children.reorder("created_on desc").each do |reply|%> <% activity.children.reorder("created_on desc").each do |reply|%>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_path(reply.author_id,:host=>Setting.host_user), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_path(reply.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher mt-4"> <div class="homepagePostReplyPublisher mt-4">
<% if reply.try(:author).try(:realname) == ' ' %> <% if reply.try(:author).try(:realname) == ' ' %>
<%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
<% 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 %> <% if reply.author == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %> <% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= reply.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= reply.id %>">
<%= reply.content.html_safe %> <%= reply.content.html_safe %>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<% if !activity.locked? %> <% if !activity.locked? %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;"> <div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'blog_comments',:action => 'reply', :id => activity.id, :blog_id => activity.blog.id, :user_id => activity.author_id},:method => "post",:remote=>true) do |f|%> <%= form_for('new_form',:url => {:controller=>'blog_comments',:action => 'reply', :id => activity.id, :blog_id => activity.blog.id, :user_id => activity.author_id},:method => "post",:remote=>true) do |f|%>
<input type="hidden" name="quote[quote]" value=""> <input type="hidden" name="quote[quote]" value="">
<input type="hidden" name="blog_comment[sticky]" value="0"> <input type="hidden" name="blog_comment[sticky]" value="0">
<input type="hidden" name="blog_comment[locked]" value="0"> <input type="hidden" name="blog_comment[locked]" value="0">
<input type="hidden" name="blog_comment[title]" value="RE:<%= activity.title%>"> <input type="hidden" name="blog_comment[title]" value="RE:<%= activity.title%>">
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="blog_comment[content]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="blog_comment[content]"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% end %> <% end %>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$("#moreProject_<%=user_activity_id %>").click(function(){ $("#moreProject_<%=user_activity_id %>").click(function(){
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap'); $("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
$("#relatePWrap_<%=user_activity_id %>").css("height","auto"); $("#relatePWrap_<%=user_activity_id %>").css("height","auto");
$(this).hide(); $(this).hide();
}); });
$("#hideProject_<%=user_activity_id %>").click(function(){ $("#hideProject_<%=user_activity_id %>").click(function(){
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap'); $("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
$("#moreProject_<%=user_activity_id %>").show(); $("#moreProject_<%=user_activity_id %>").show();
}); });
</script> </script>

@ -1,218 +1,218 @@
<%= content_for(:header_tags) do %> <%= content_for(:header_tags) do %>
<%= import_ke(enable_at: true, prettify: false, init_activity: true) %> <%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
<%= javascript_include_tag 'blog' %> <%= javascript_include_tag 'blog' %>
<% end %> <% end %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$("#RSide").removeAttr("id"); $("#RSide").removeAttr("id");
$("#Container").css("width","1000px"); $("#Container").css("width","1000px");
}); });
</script> </script>
<script> <script>
function expand_reply(container,btnid){ function expand_reply(container,btnid){
var target = $(container).children(); var target = $(container).children();
var btn = $(btnid); var btn = $(btnid);
if(btn.data('init')=='0'){ if(btn.data('init')=='0'){
btn.data('init',1); btn.data('init',1);
btn.html('收起回复'); btn.html('收起回复');
target.show(); target.show();
}else{ }else{
btn.data('init',0); btn.data('init',0);
btn.html('展开更多'); btn.html('展开更多');
target.hide(); target.hide();
target.eq(0).show(); target.eq(0).show();
target.eq(1).show(); target.eq(1).show();
target.eq(2).show(); target.eq(2).show();
} }
} }
$(function() { $(function() {
//init_activity_KindEditor_data(<%= @article.id%>,null,"87%", "<%=@article.class.to_s%>"); //init_activity_KindEditor_data(<%= @article.id%>,null,"87%", "<%=@article.class.to_s%>");
sd_create_editor_from_data(<%= @article.id%>,null,"100%", "<%=@article.class.to_s%>"); sd_create_editor_from_data(<%= @article.id%>,null,"100%", "<%=@article.class.to_s%>");
showNormalImage('message_description_<%= @article.id %>'); showNormalImage('message_description_<%= @article.id %>');
}); });
</script> </script>
<div class="postRightContainer ml10" > <div class="postRightContainer ml10" >
<div class="postThemeContainer"> <div class="postThemeContainer">
<div class="postDetailPortrait"> <div class="postDetailPortrait">
<%= link_to image_tag(url_to_avatar(@article.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@article.author) %> <%= link_to image_tag(url_to_avatar(@article.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@article.author) %>
</div> </div>
<div class="postThemeWrap"> <div class="postThemeWrap">
<% if User.current && @article.author.id == User.current.id%> <% if User.current && @article.author.id == User.current.id%>
<div class="homepagePostSetting" id="message_setting_<%= @article.id%>" > <div class="homepagePostSetting" id="message_setting_<%= @article.id%>" >
<ul> <ul>
<li class="homepagePostSettingIcon"> <li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText"> <ul class="homepagePostSettiongText">
<li> <li>
<a class="postOptionLink " onclick="course_outline('<%= @course.id%>','Y')" >重设大纲</a> <a class="postOptionLink " onclick="course_outline('<%= @course.id%>','Y')" >重设大纲</a>
</li> </li>
<li> <li>
<%= link_to( <%= link_to(
'取消大纲', '取消大纲',
{:controller => 'blog_comments',:action => 'destroy',:user_id=>BlogComment.find(@course.outline).author_id,:blog_id=>BlogComment.find(@course.outline).blog_id, :id => @course.outline,:course_id=>@course.id}, {:controller => 'blog_comments',:action => 'destroy',:user_id=>BlogComment.find(@course.outline).author_id,:blog_id=>BlogComment.find(@course.outline).blog_id, :id => @course.outline,:course_id=>@course.id},
:method => :delete, :method => :delete,
:data => {:confirm => '您确定要取消么?'}, :data => {:confirm => '您确定要取消么?'},
:class => 'postOptionLink' :class => 'postOptionLink'
) if User.current && User.current.id == @article.author.id %> ) if User.current && User.current.id == @article.author.id %>
</li> </li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
<!--<div class="homepagePostSetting" id="message_setting_<%#= @article.id%>" >--> <!--<div class="homepagePostSetting" id="message_setting_<%#= @article.id%>" >-->
<!--<ul>--> <!--<ul>-->
<!--<li class="syllabusSettingIcon" >--> <!--<li class="syllabusSettingIcon" >-->
<!--</li>--> <!--</li>-->
<!--</ul>--> <!--</ul>-->
<!--</div>--> <!--</div>-->
<!--<a class="syllabusSettingIcon fr" style="width: 100px" onclick="course_outline('<%= @course.id%>')" ><span class="f14 fontGrey2" style="padding-left: 20px">[设置大纲]</span>--> <!--<a class="syllabusSettingIcon fr" style="width: 100px" onclick="course_outline('<%= @course.id%>')" ><span class="f14 fontGrey2" style="padding-left: 20px">[设置大纲]</span>-->
<!--</a>--> <!--</a>-->
<%end%> <%end%>
<div class="postDetailTitle fl" style="width: 550px !important;"> <div class="postDetailTitle fl" style="width: 550px !important;">
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= @article.title%></a> <a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= @article.title%></a>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div class="postDetailCreater"> <div class="postDetailCreater">
<% if @article.try(:author).try(:realname) == ' ' %> <% if @article.try(:author).try(:realname) == ' ' %>
<%= link_to @article.try(:author), user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %> <%= link_to @article.try(:author), user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% else %> <% else %>
<%= link_to @article.try(:author).try(:realname), user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %> <%= link_to @article.try(:author).try(:realname), user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% end %> <% end %>
</div> </div>
<div class="postDetailDate mb5"><%= format_time( @article.created_on)%></div> <div class="postDetailDate mb5"><%= format_time( @article.created_on)%></div>
<div class="cl"></div> <div class="cl"></div>
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @article.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" > <div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @article.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
<%= @article.content.html_safe%> <%= @article.content.html_safe%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div class=" fl" style="width: 600px"> <div class=" fl" style="width: 600px">
<%#= link_to_attachments_course @topic, :author => false %> <%#= link_to_attachments_course @topic, :author => false %>
<% if @article.attachments.any?%> <% if @article.attachments.any?%>
<% options = {:author => true, :deletable => false} %> <% options = {:author => true, :deletable => false} %>
<%= render :partial => 'blog_comments/attachments_links', :locals => {:attachments => @article.attachments, :options => options, :is_float => true} %> <%= render :partial => 'blog_comments/attachments_links', :locals => {:attachments => @article.attachments, :options => options, :is_float => true} %>
<% end %> <% end %>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<% count=0 %> <% count=0 %>
<% if @article.parent %> <% if @article.parent %>
<% count=@article.parent.children.count%> <% count=@article.parent.children.count%>
<% else %> <% else %>
<% count=@article.children.count%> <% count=@article.children.count%>
<% end %> <% end %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<% unless count == 0 %> <% unless count == 0 %>
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复(<%=count %></div> <div class="homepagePostReplyBannerCount">回复(<%=count %></div>
<div class="homepagePostReplyBannerTime"></div> <div class="homepagePostReplyBannerTime"></div>
<!-- <div class="homepagePostReplyBannerMore"> <!-- <div class="homepagePostReplyBannerMore">
<%# if @reply_count > 2%> <%# if @reply_count > 2%>
<a href="javascript:void(0);" class="replyGrey" id="reply_btn_<%#= @topic.id%>" onclick="expand_reply('#reply_div_<%#= @topic.id %>','#reply_btn_<%#= @topic.id%>')" data-count="<%#= @reply_count %>" data-init="0" >点击展开更多回复</a> <a href="javascript:void(0);" class="replyGrey" id="reply_btn_<%#= @topic.id%>" onclick="expand_reply('#reply_div_<%#= @topic.id %>','#reply_btn_<%#= @topic.id%>')" data-count="<%#= @reply_count %>" data-init="0" >点击展开更多回复</a>
<%# end %> <%# end %>
</div>--> </div>-->
</div> </div>
<div class="" id="reply_div_<%= @article.id %>"> <div class="" id="reply_div_<%= @article.id %>">
<%@article.children.reorder('created_on desc').each_with_index do |reply,i| %> <%@article.children.reorder('created_on desc').each_with_index do |reply,i| %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('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();">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %> <%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"> <div class="homepagePostReplyPublisher">
<% if reply.try(:author).try(:realname) == ' ' %> <% if reply.try(:author).try(:realname) == ' ' %>
<%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
<% end %> <% end %>
</div> </div>
<div class="homepagePostReplyContent upload_img break_word" id="reply_message_description_<%= reply.id %>"> <div class="homepagePostReplyContent upload_img break_word" id="reply_message_description_<%= reply.id %>">
<%= reply.content.html_safe%> <%= reply.content.html_safe%>
</div> </div>
<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) %>
<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(
l(:button_reply), l(:button_reply),
{:controller => 'blog_comments',:action => 'quote',:user_id=>reply.author_id,:blog_id=>reply.blog_id, :id => reply.id,:course_id=>@course.id}, {:controller => 'blog_comments',:action => 'quote',:user_id=>reply.author_id,:blog_id=>reply.blog_id, :id => reply.id,:course_id=>@course.id},
:remote => true, :remote => true,
:method => 'get', :method => 'get',
:class => 'fr newsBlue', :class => 'fr newsBlue',
:title => l(:button_reply)) if !@article.locked? && User.current.logged? %> :title => l(:button_reply)) if !@article.locked? && User.current.logged? %>
<%= link_to( <%= link_to(
l(:button_delete), l(:button_delete),
{:controller => 'blog_comments',:action => 'destroy',:user_id=>reply.author_id,:blog_id=>reply.blog_id, :id => reply.id,:course_id=>@course.id}, {:controller => 'blog_comments',:action => 'destroy',:user_id=>reply.author_id,:blog_id=>reply.blog_id, :id => reply.id,:course_id=>@course.id},
:method => :delete, :method => :delete,
:class => 'fr newsGrey mr10', :class => 'fr newsGrey mr10',
:data => {:confirm => l(:text_are_you_sure)}, :data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete) :title => l(:button_delete)
) if reply.author.id == User.current.id %> ) if reply.author.id == User.current.id %>
</div> </div>
</div> </div>
<p id="reply_message_<%= reply.id%>"></p> <p id="reply_message_<%= reply.id%>"></p>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% end %> <% end %>
</div> </div>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
<% if !@article.locked? && User.current.logged?%> <% if !@article.locked? && User.current.logged?%>
<!--<div class="talkWrapMsg" nhname="about_talk_reply">--> <!--<div class="talkWrapMsg" nhname="about_talk_reply">-->
<!--<em class="talkWrapArrow"></em>--> <!--<em class="talkWrapArrow"></em>-->
<!--<div class="cl"></div>--> <!--<div class="cl"></div>-->
<!--<div class="talkConIpt ml5 mb10" id="reply<%#= @article.id %>">--> <!--<div class="talkConIpt ml5 mb10" id="reply<%#= @article.id %>">-->
<!--<%#= form_for :blog_comment, :url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id}, :html => {:multipart => true, :id => 'message_form'} do |f| %>--> <!--<%#= form_for :blog_comment, :url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id}, :html => {:multipart => true, :id => 'message_form'} do |f| %>-->
<!--<input type="hidden" name="course_id" value="<%#= @course.id%>">--> <!--<input type="hidden" name="course_id" value="<%#= @course.id%>">-->
<!--<%#= render :partial => 'blog_comments/reply_form', :locals => {:f => f,:user=>@user,:article=>@article} %>--> <!--<%#= render :partial => 'blog_comments/reply_form', :locals => {:f => f,:user=>@user,:article=>@article} %>-->
<!--<%#= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'canel_message_replay();', :class => " grey_btn fr c_white mt10 mr5" %>--> <!--<%#= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'canel_message_replay();', :class => " grey_btn fr c_white mt10 mr5" %>-->
<!--<%#= link_to l(:button_submit), "javascript:void(0)", :onclick => 'submit_message_replay();', :class => "blue_btn fr c_white mt10", :style => "margin-right: 5px;" %>--> <!--<%#= link_to l(:button_submit), "javascript:void(0)", :onclick => 'submit_message_replay();', :class => "blue_btn fr c_white mt10", :style => "margin-right: 5px;" %>-->
<!--<%# end %>--> <!--<%# end %>-->
<!--<div class="cl"></div>--> <!--<div class="cl"></div>-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @article.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@article.author_id), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @article.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@article.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer" style="margin-top: 8px"> <div class="homepagePostReplyInputContainer" style="margin-top: 8px">
<div nhname='new_message_<%= @article.id%>' style="display:none;"> <div nhname='new_message_<%= @article.id%>' style="display:none;">
<%= form_for 'blog_comment',:url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id},:method => "post",:html => {:multipart => true, :id => 'message_form'} do |f|%> <%= form_for 'blog_comment',:url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id},:method => "post",:html => {:multipart => true, :id => 'message_form'} do |f|%>
<input type="hidden" name="course_id" value="<%= @course.id%>"> <input type="hidden" name="course_id" value="<%= @course.id%>">
<input type="hidden" name="blog_comment[title]" value="RE:<%= @article.title%>"> <input type="hidden" name="blog_comment[title]" value="RE:<%= @article.title%>">
<input type="hidden" name="blog_comment[sticky]" value="0"> <input type="hidden" name="blog_comment[sticky]" value="0">
<input type="hidden" name="quote[quote]" value=""> <input type="hidden" name="quote[quote]" value="">
<input type="hidden" name="blog_comment[locked]" value="0"> <input type="hidden" name="blog_comment[locked]" value="0">
<div nhname='toolbar_container_<%= @article.id%>'></div> <div nhname='toolbar_container_<%= @article.id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @article.id%>' name="blog_comment[content]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @article.id%>' name="blog_comment[content]"></textarea>
<a id="new_message_submit_btn_<%= @article.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a> <a id="new_message_submit_btn_<%= @article.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= @article.id%>'></p> <p nhname='contentmsg_<%= @article.id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% end %> <% end %>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$("#message_description_<%= @article.id %> p,#message_description_<%= @article.id %> span,#message_description_<%= @article.id %> em").each(function(){ $("#message_description_<%= @article.id %> p,#message_description_<%= @article.id %> span,#message_description_<%= @article.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; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;"); postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
}); });
</script> </script>

@ -1,86 +1,86 @@
<ul> <ul>
<% issue.journals.reorder("created_on desc").each do |reply| %> <% issue.journals.reorder("created_on desc").each do |reply| %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i + 1 %> <% replies_all_i=replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();" > <li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();" >
<div class="homepagePostReplyPortrait" > <div class="homepagePostReplyPortrait" >
<%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher mt-4"> <div class="homepagePostReplyPublisher mt-4">
<% if reply.try(:user).try(:realname) == ' ' %> <% if reply.try(:user).try(:realname) == ' ' %>
<%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
<% end %> <% end %>
<%#= format_time(reply.created_on) %> <%#= format_time(reply.created_on) %>
</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? %>
<% details_to_strings(reply.details).each do |string| %> <% details_to_strings(reply.details).each do |string| %>
<p><%= string %></p> <p><%= string %></p>
<% end %> <% end %>
<% end %> <% end %>
<P><%= reply.notes.html_safe %></P> <P><%= reply.notes.html_safe %></P>
</div> </div>
<div style="margin-top: 7px"> <div style="margin-top: 7px">
<%= 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">
<%= link_to( <%= link_to(
l(:button_reply), l(:button_reply),
{:controller => 'issues', :action => 'reply', :user_id => reply.user_id, :id => issue.id, :journal_id => reply.id}, {:controller => 'issues', :action => 'reply', :user_id => reply.user_id, :id => issue.id, :journal_id => reply.id},
:remote => true, :remote => true,
:method => 'get', :method => 'get',
:class => 'fr newsBlue', :class => 'fr newsBlue',
:title => l(:button_reply)) if User.current.logged? %> :title => l(:button_reply)) if User.current.logged? %>
<%= link_to( <%= link_to(
l(:button_delete), l(:button_delete),
{:controller => 'issues',:action => 'delete_journal', :id => issue.id,:journal_id=>reply.id}, {:controller => 'issues',:action => 'delete_journal', :id => issue.id,:journal_id=>reply.id},
:method => :get, :method => :get,
:remote=>true, :remote=>true,
:class => 'fr newsGrey mr10', :class => 'fr newsGrey mr10',
:data => {:confirm => l(:text_are_you_sure)}, :data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete) :title => l(:button_delete)
) if reply.user_id == User.current.id %> ) if reply.user_id == User.current.id %>
</div> </div>
</div> </div>
<p id="reply_message_<%= reply.id%>"></p> <p id="reply_message_<%= reply.id%>"></p>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>"> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= @issue.id %>' style="display:none;"> <div nhname='new_message_<%= @issue.id %>' style="display:none;">
<%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %> <%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %>
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%> <%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
<!--<div class="cl"></div>--> <!--<div class="cl"></div>-->
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/> <input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
<div nhname='toolbar_container_<%= @issue.id %>' ></div> <div nhname='toolbar_container_<%= @issue.id %>' ></div>
<div class="cl"></div> <div class="cl"></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id %>' name="notes"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id %>' name="notes"></textarea>
<div class="cl"></div> <div class="cl"></div>
<div class="mt5 fl"> <div class="mt5 fl">
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %> <%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %>
</div> </div>
<span nhname='contentmsg_<%= @issue.id %>' class="fl"></span> <span nhname='contentmsg_<%= @issue.id %>' class="fl"></span>
<a id="new_message_submit_btn_<%= @issue.id %>" href="javascript:void(0)" class="blue_n_btn fr mt5" style="display:none;">发送</a> <a id="new_message_submit_btn_<%= @issue.id %>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr mt5" style="display:none;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<% end %> <% end %>
</div> </div>
<!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>--> <!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>-->
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>

@ -1,27 +1,27 @@
<div class="ReplyToMessageContainer borderBottomNone " id="reply_to_message_<%= @issue.id%>"> <div class="ReplyToMessageContainer borderBottomNone " id="reply_to_message_<%= @issue.id%>">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>"> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
</div> </div>
<div class="ReplyToMessageInputContainer mb10"> <div class="ReplyToMessageInputContainer mb10">
<div nhname='new_message_<%= @issue.id%>' style="display:none;"> <div nhname='new_message_<%= @issue.id%>' style="display:none;">
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%> <%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%> <%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
<!--<div class="cl"></div>--> <!--<div class="cl"></div>-->
<input type="hidden" name="quote" value=""/> <input type="hidden" name="quote" value=""/>
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/> <input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
<div nhname='toolbar_container_<%= @issue.id%>' ></div> <div nhname='toolbar_container_<%= @issue.id%>' ></div>
<div class="cl"></div> <div class="cl"></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id%>' name="notes"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id%>' name="notes"></textarea>
<div class="cl"></div> <div class="cl"></div>
<span nhname='contentmsg_<%= @issue.id%>' class="fl"></span> <span nhname='contentmsg_<%= @issue.id%>' class="fl"></span>
<a id="new_message_submit_btn_<%= @issue.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= @issue.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<% end %> <% end %>
</div> </div>
<!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>--> <!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>-->
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div> </div>

@ -113,7 +113,7 @@
<%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %> <%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %>
<div nhname='toolbar_container_<%= @memo.id%>'></div> <div nhname='toolbar_container_<%= @memo.id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @memo.id%>' name="memo[content]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @memo.id%>' name="memo[content]"></textarea>
<a id="new_message_submit_btn_<%= @memo.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= @memo.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= @memo.id%>'></p> <p nhname='contentmsg_<%= @memo.id%>'></p>
<% end%> <% end%>

@ -1,19 +1,19 @@
<div class="ReplyToMessageContainer borderBottomNone" id="reply_to_message_<%= reply.id%>"> <div class="ReplyToMessageContainer borderBottomNone" id="reply_to_message_<%= reply.id%>">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
<div class="ReplyToMessageInputContainer mb10"> <div class="ReplyToMessageInputContainer mb10">
<div nhname='new_message_<%= reply.id%>'> <div nhname='new_message_<%= reply.id%>'>
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'new_form'} do |f| %> <%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'new_form'} do |f| %>
<input type="hidden" name="quote[quote]" id="quote_quote"> <input type="hidden" name="quote[quote]" id="quote_quote">
<input type="hidden" name="reply[subject]" id="reply_subject"> <input type="hidden" name="reply[subject]" id="reply_subject">
<div nhname='toolbar_container_<%= reply.id%>'></div> <div nhname='toolbar_container_<%= reply.id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="reply[content]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="reply[content]"></textarea>
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= reply.id%>'></p> <p nhname='contentmsg_<%= reply.id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>

@ -1,18 +1,18 @@
<div class="ReplyToMessageContainer borderBottomNone"id="reply_to_message_<%= reply.id%>"> <div class="ReplyToMessageContainer borderBottomNone"id="reply_to_message_<%= reply.id%>">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
<div class="ReplyToMessageInputContainer mb10"> <div class="ReplyToMessageInputContainer mb10">
<div nhname='new_message_<%= reply.id%>'> <div nhname='new_message_<%= reply.id%>'>
<%= form_for @org_comment, :as => :reply, :url => {:controller => 'org_document_comments',:action => 'reply', :id => @org_comment.id}, :method => 'post', :html => {:multipart => true, :id => 'new_form'} do |f| %> <%= form_for @org_comment, :as => :reply, :url => {:controller => 'org_document_comments',:action => 'reply', :id => @org_comment.id}, :method => 'post', :html => {:multipart => true, :id => 'new_form'} do |f| %>
<input type="hidden" name="quote[quote]" id="quote_quote"> <input type="hidden" name="quote[quote]" id="quote_quote">
<input type="hidden" name="org_document_comment[title]" id="reply_subject"> <input type="hidden" name="org_document_comment[title]" id="reply_subject">
<div nhname='toolbar_container_<%= reply.id%>'></div> <div nhname='toolbar_container_<%= reply.id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="org_document_comment[content]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="org_document_comment[content]"></textarea>
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a> <a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= reply.id%>'></p> <p nhname='contentmsg_<%= reply.id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>

@ -356,7 +356,7 @@
<%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %> <%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %>
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>

@ -144,7 +144,7 @@
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>

@ -1,123 +1,123 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id%>"> <div class="resources mt10" id="user_activity_<%= user_activity_id%>">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_url_in_org(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_url_in_org(activity.author_id), :alt => "用户头像" %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4"> <div class="homepagePostTo break_word mt-4">
<% if @ctivity.try(:author).try(:realname) == ' ' %> <% if @ctivity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO <!--+"(课程名称)"--> <% end %> TO <!--+"(课程名称)"-->
<%= link_to activity.course.name.to_s+" | 课程通知", course_news_index_path(activity.course), :class => "newsBlue ml15" %> <%= link_to activity.course.name.to_s+" | 课程通知", course_news_index_path(activity.course), :class => "newsBlue ml15" %>
</div> </div>
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"--> <div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %> <%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>
</div> </div>
<% if activity.sticky == 1%> <% if activity.sticky == 1%>
<span class="sticky_btn_cir ml10">置顶</span> <span class="sticky_btn_cir ml10">置顶</span>
<% end%> <% end%>
<div class="cl"></div> <div class="cl"></div>
<div class="homepagePostDate fl"> <div class="homepagePostDate fl">
发布时间:<%= format_time(activity.created_on) %> 发布时间:<%= format_time(activity.created_on) %>
</div> </div>
<div class="homepagePostDate fl ml15"> <div class="homepagePostDate fl ml15">
更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %> 更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %>
<div class="cl"></div> <div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div> <div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div> <div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div> <div class="cl"></div>
<div class="mt10" style="font-weight:normal;"> <div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %> <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% count=activity.comments.count %> <% count=activity.comments.count %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<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 %> <% if activity.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> <span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %> <% end %>
</span> </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 %>
<div class="homepagePostReplyBannerMore"> <div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" > <a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多 展开更多
</a> </a>
</div> </div>
<% end %> <% end %>
</div> </div>
<% replies_all_i = 0 %> <% replies_all_i = 0 %>
<% if count > 0 %> <% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% activity.comments.reorder("created_on desc").each do |comment| %> <% activity.comments.reorder("created_on desc").each do |comment| %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_url_in_org(comment.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_url_in_org(comment.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher mt-4"> <div class="homepagePostReplyPublisher mt-4">
<% if comment.try(:author).try(:realname) == ' ' %> <% if comment.try(:author).try(:realname) == ' ' %>
<%= link_to comment.try(:author), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:author), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to comment.try(:author).try(:realname), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:author).try(:realname), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %>
<% 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 %> <% if comment.author == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %> <% 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 %>">
<%= comment.comments.html_safe %></div> <%= comment.comments.html_safe %></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;"> <div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div> </div>
</div> </div>

@ -1,141 +1,141 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id%>"> <div class="resources mt10" id="user_activity_<%= user_activity_id%>">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_url_in_org(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_url_in_org(activity.author_id), :alt => "用户头像" %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4"> <div class="homepagePostTo break_word mt-4">
<% if activity.try(:author).try(:realname) == ' ' %> <% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO <% end %> TO
<%= link_to activity.project.name.to_s+" | 项目问题", project_issues_path(activity.project), :class => "newsBlue ml15"%> <%= link_to activity.project.name.to_s+" | 项目问题", project_issues_path(activity.project), :class => "newsBlue ml15"%>
</div> </div>
<div class="homepagePostTitle break_word"> <div class="homepagePostTitle break_word">
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey" %> <%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey" %>
<span class='<%#= get_issue_priority(activity.priority_id)[0] %>'> <span class='<%#= get_issue_priority(activity.priority_id)[0] %>'>
<%#= get_issue_priority(activity.priority_id)[1] %> <%#= get_issue_priority(activity.priority_id)[1] %>
</span> </span>
</div> </div>
<div class="homepagePostSubmitContainer"> <div class="homepagePostSubmitContainer">
<div class="homepagePostAssignTo">指派给&nbsp;&nbsp; <div class="homepagePostAssignTo">指派给&nbsp;&nbsp;
<% unless activity.assigned_to_id.nil? %> <% unless activity.assigned_to_id.nil? %>
<% if activity.try(:assigned_to).try(:realname) == ' ' %> <% if activity.try(:assigned_to).try(:realname) == ' ' %>
<%= link_to activity.try(:assigned_to), user_url_in_org(activity.assigned_to_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:assigned_to), user_url_in_org(activity.assigned_to_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:assigned_to).try(:realname), user_url_in_org(activity.assigned_to_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:assigned_to).try(:realname), user_url_in_org(activity.assigned_to_id), :class => "newsBlue mr15" %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
<div class="homepagePostDeadline fl"> <div class="homepagePostDeadline fl">
发布时间: 发布时间:
<%=format_time(activity.created_on) %> <%=format_time(activity.created_on) %>
</div> </div>
<div class="homepagePostDate fl ml15"> <div class="homepagePostDate fl ml15">
更新时间:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %> 更新时间:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %>
<div class="cl"></div> <div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div> <div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div> <div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div> <div class="cl"></div>
<div class="mt10" style="font-weight:normal;"> <div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %> <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% count = activity.journals.count %> <% count = activity.journals.count %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<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 %> <% if activity.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> <span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %> <% end %>
</span> </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 %>
<div class="homepagePostReplyBannerMore"> <div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%= user_activity_id %>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help"> <a id="reply_btn_<%= user_activity_id %>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">
展开更多 展开更多
</a> </a>
</div> </div>
<% end %> <% end %>
</div> </div>
<% replies_all_i = 0 %> <% replies_all_i = 0 %>
<% if count > 0 %> <% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% activity.journals.reorder("created_on desc").each do |reply| %> <% activity.journals.reorder("created_on desc").each do |reply| %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i + 1 %> <% replies_all_i=replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_url_in_org(reply.user_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_url_in_org(reply.user_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher mt-4"> <div class="homepagePostReplyPublisher mt-4">
<% if reply.try(:user).try(:realname) == ' ' %> <% if reply.try(:user).try(:realname) == ' ' %>
<%= link_to reply.try(:user), user_url_in_org(reply.user_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:user), user_url_in_org(reply.user_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to reply.try(:user).try(:realname), user_url_in_org(reply.user_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:user).try(:realname), user_url_in_org(reply.user_id), :class => "newsBlue mr10 f14" %>
<% 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 %> <% if reply.user == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %> <% 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 %>">
<% if reply.details.any? %> <% if reply.details.any? %>
<% details_to_strings(reply.details).each do |string| %> <% details_to_strings(reply.details).each do |string| %>
<p><%= string %></p> <p><%= string %></p>
<% end %> <% end %>
<% end %> <% end %>
<P><%= reply.notes.nil? ? "" : reply.notes.html_safe %></P> <P><%= reply.notes.nil? ? "" : reply.notes.html_safe %></P>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;"> <div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => add_journal_in_org_issue_path(activity.id),:method => "post", :remote => true) do |f|%> <%= form_for('new_form',:url => add_journal_in_org_issue_path(activity.id),:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div> </div>
</div> </div>

@ -1,161 +1,161 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id%>"> <div class="resources mt10" id="user_activity_<%= user_activity_id%>">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_url_in_org(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_url_in_org(activity.author_id), :alt => "用户头像" %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4"> <div class="homepagePostTo break_word mt-4">
<% if activity.try(:author).try(:realname) == ' ' %> <% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
<% end %> <% end %>
TO TO
<%= link_to activity.board.org_subfield.name.to_s+" | 帖子栏目讨论区",organization_path(activity.board.org_subfield.organization, :org_subfield_id => activity.board.org_subfield.id), :class => "newsBlue ml15 mr5"%> <%= link_to activity.board.org_subfield.name.to_s+" | 帖子栏目讨论区",organization_path(activity.board.org_subfield.organization, :org_subfield_id => activity.board.org_subfield.id), :class => "newsBlue ml15 mr5"%>
</div> </div>
<div class="homepagePostTitle break_word"> <div class="homepagePostTitle break_word">
<% if activity.parent_id.nil? %> <% if activity.parent_id.nil? %>
<%= link_to activity.subject.to_s.html_safe, board_message_path(activity.board,activity), :class=> "postGrey" <%= link_to activity.subject.to_s.html_safe, board_message_path(activity.board,activity), :class=> "postGrey"
%> %>
<% else %> <% else %>
<%= link_to activity.parent.subject.to_s.html_safe, board_message_path(activity.board,activity), :class=> "postGrey" <%= link_to activity.parent.subject.to_s.html_safe, board_message_path(activity.board,activity), :class=> "postGrey"
%> %>
<% end %> <% end %>
</div> </div>
<div class="homepagePostDate fl"> <div class="homepagePostDate fl">
发布时间:<%= format_time(activity.created_on) %> 发布时间:<%= format_time(activity.created_on) %>
</div> </div>
<div class="homepagePostDate fl ml15"> <div class="homepagePostDate fl ml15">
更新时间:<%= format_time(OrgActivity.where("org_act_type='#{activity.class}' and org_act_id =#{activity.id}").first.updated_at) %> 更新时间:<%= format_time(OrgActivity.where("org_act_type='#{activity.class}' and org_act_id =#{activity.id}").first.updated_at) %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<% if activity.parent_id.nil? %> <% if activity.parent_id.nil? %>
<% content = activity.content%> <% content = activity.content%>
<% else %> <% else %>
<% content = activity.parent.content%> <% content = activity.parent.content%>
<% end %> <% end %>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %>
<div class="cl"></div> <div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div> <div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div> <div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div> <div class="cl"></div>
<div class="mt10" style="font-weight:normal;"> <div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %> <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div> </div>
<div class="homepagePostSetting"> <div class="homepagePostSetting">
<ul> <ul>
<li class="homepagePostSettingIcon"> <li class="homepagePostSettingIcon">
<% if User.current.logged? %> <% if User.current.logged? %>
<ul class="homepagePostSettiongText"> <ul class="homepagePostSettiongText">
<li><%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'message')") %></li> <li><%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'message')") %></li>
<li> <li>
<%= link_to( <%= link_to(
l(:button_edit), l(:button_edit),
{:controller => 'messages', :action => 'edit', :id => activity, :board_id => activity.board_id}, {:controller => 'messages', :action => 'edit', :id => activity, :board_id => activity.board_id},
:class => 'postOptionLink' :class => 'postOptionLink'
) if activity.org_subfield_editable_by?(User.current) %> ) if activity.org_subfield_editable_by?(User.current) %>
</li> </li>
<li> <li>
<%= link_to( <%= link_to(
l(:button_delete), l(:button_delete),
{:controller => 'messages', :action => 'destroy', :id => activity, :board_id => activity.board_id}, {:controller => 'messages', :action => 'destroy', :id => activity, :board_id => activity.board_id},
:method => 'post', :method => 'post',
:data => {:confirm => l(:text_are_you_sure)}, :data => {:confirm => l(:text_are_you_sure)},
:class => 'postOptionLink' :class => 'postOptionLink'
) if activity.org_subfield_editable_by?(User.current) %> ) if activity.org_subfield_editable_by?(User.current) %>
</li> </li>
</ul> </ul>
<% end %> <% end %>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% count = 0 %> <% count = 0 %>
<% if activity.parent %> <% if activity.parent %>
<% count=activity.parent.children.count%> <% count=activity.parent.children.count%>
<% else %> <% else %>
<% count=activity.children.count%> <% count=activity.children.count%>
<% end %> <% end %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<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 %> <% if activity.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> <span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %> <% end %>
</span> </span>
</div> </div>
<%if count>3 %> <%if count>3 %>
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >展开更多</a></div> <div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >展开更多</a></div>
<% end %> <% end %>
</div> </div>
<% activity= activity.parent_id.nil? ? activity : activity.parent %> <% activity= activity.parent_id.nil? ? activity : activity.parent %>
<% replies_all_i = 0 %> <% replies_all_i = 0 %>
<% if count > 0 %> <% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% activity.children.reorder("created_on desc").each do |reply| %> <% activity.children.reorder("created_on desc").each do |reply| %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_url_in_org(reply.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_url_in_org(reply.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher mt-4"> <div class="homepagePostReplyPublisher mt-4">
<% if reply.try(:author).try(:realname) == ' ' %> <% if reply.try(:author).try(:realname) == ' ' %>
<%= link_to reply.try(:author), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:author), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to reply.try(:author).try(:realname), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:author).try(:realname), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
<% 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 %> <% if reply.author == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %> <% 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 %>">
<%= reply.content.html_safe %></div> <%= reply.content.html_safe %></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;"> <div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="quote[quote]" value=""> <input type="hidden" name="quote[quote]" value="">
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div> </div>
</div> </div>

@ -1,146 +1,146 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id %>"> <div class="resources mt10" id="user_activity_<%= user_activity_id %>">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_url_in_org(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_url_in_org(activity.author_id), :alt => "用户头像" %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4"> <div class="homepagePostTo break_word mt-4">
<% if activity.try(:author).try(:realname) == ' ' %> <% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO <!--+"(课程名称)"--> <% end %> TO <!--+"(课程名称)"-->
<%= link_to activity.org_subfield.name.to_s+" | 帖子栏目通知", organization_path(activity.org_subfield.organization, :org_subfield_id => activity.org_subfield.id), :class => "newsBlue ml15" %> <%= link_to activity.org_subfield.name.to_s+" | 帖子栏目通知", organization_path(activity.org_subfield.organization, :org_subfield_id => activity.org_subfield.id), :class => "newsBlue ml15" %>
</div> </div>
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"--> <div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %> <%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div class="homepagePostDate fl"> <div class="homepagePostDate fl">
发布时间:<%= format_time(activity.created_on) %> 发布时间:<%= format_time(activity.created_on) %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %>
<div class="cl"></div> <div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div> <div id="intro_content_show_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div> <div id="intro_content_hide_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div> <div class="cl"></div>
<div class="mt10" style="font-weight:normal;"> <div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %> <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div> </div>
<div class="homepagePostSetting"> <div class="homepagePostSetting">
<ul> <ul>
<li class="homepagePostSettingIcon"> <li class="homepagePostSettingIcon">
<% if User.current.logged? %> <% if User.current.logged? %>
<ul class="homepagePostSettiongText"> <ul class="homepagePostSettiongText">
<li><%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %></li> <li><%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %></li>
<li> <li>
<%= link_to( <%= link_to(
l(:button_edit), l(:button_edit),
{:controller => 'news', :action => 'edit', :id => activity}, {:controller => 'news', :action => 'edit', :id => activity},
:class => 'postOptionLink' :class => 'postOptionLink'
) if activity.author == User.current %> ) if activity.author == User.current %>
</li> </li>
<li> <li>
<%= delete_link( <%= delete_link(
news_path(activity), news_path(activity),
:data => {:confirm => l(:text_are_you_sure)}, :data => {:confirm => l(:text_are_you_sure)},
:class => 'postOptionLink' :class => 'postOptionLink'
) if activity.author == User.current %> ) if activity.author == User.current %>
</li> </li>
</ul> </ul>
<% end %> <% end %>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% count=activity.comments.count %> <% count=activity.comments.count %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<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 %> <% if activity.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> <span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %> <% end %>
</span> </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 %>
<div class="homepagePostReplyBannerMore"> <div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" > <a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多 展开更多
</a> </a>
</div> </div>
<% end %> <% end %>
</div> </div>
<% replies_all_i = 0 %> <% replies_all_i = 0 %>
<% if count > 0 %> <% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% activity.comments.reorder("created_on desc").each do |comment| %> <% activity.comments.reorder("created_on desc").each do |comment| %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_url_in_org(comment.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_url_in_org(comment.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher mt-4"> <div class="homepagePostReplyPublisher mt-4">
<% if comment.try(:author).try(:realname) == ' ' %> <% if comment.try(:author).try(:realname) == ' ' %>
<%= link_to comment.try(:author), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:author), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to comment.try(:author).try(:realname), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:author).try(:realname), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %>
<% 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 %> <% if comment.author == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %> <% 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 %>">
<%= comment.comments.html_safe %></div> <%= comment.comments.html_safe %></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;"> <div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>)); $(description_show_hide(<%=user_activity_id %>));
</script> </script>

@ -1,136 +1,136 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id%>"> <div class="resources mt10" id="user_activity_<%= user_activity_id%>">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_url_in_org(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_url_in_org(activity.author_id), :alt => "用户头像" %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4"> <div class="homepagePostTo break_word mt-4">
<% if activity.try(:author).try(:realname) == ' ' %> <% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
<% end %> <% end %>
TO TO
<%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_path(activity.project), :class => "newsBlue ml15 mr5"%> <%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_path(activity.project), :class => "newsBlue ml15 mr5"%>
<!--<a href="javascript:void(0);" class="newsBlue ml15 mr5"><%= activity.project.name %>(项目讨论区)</a>--> <!--<a href="javascript:void(0);" class="newsBlue ml15 mr5"><%= activity.project.name %>(项目讨论区)</a>-->
</div> </div>
<div class="homepagePostTitle break_word"> <div class="homepagePostTitle break_word">
<% if activity.parent_id.nil? %> <% if activity.parent_id.nil? %>
<%= link_to activity.subject.to_s.html_safe, board_message_path(activity.board,activity), :class=> "postGrey" <%= link_to activity.subject.to_s.html_safe, board_message_path(activity.board,activity), :class=> "postGrey"
%> %>
<% else %> <% else %>
<%= link_to activity.parent.subject.to_s.html_safe, board_message_path(activity.board,activity), :class=> "postGrey" <%= link_to activity.parent.subject.to_s.html_safe, board_message_path(activity.board,activity), :class=> "postGrey"
%> %>
<% end %> <% end %>
</div> </div>
<div class="homepagePostDate fl"> <div class="homepagePostDate fl">
发帖时间:<%= format_time(activity.created_on) %> 发帖时间:<%= format_time(activity.created_on) %>
</div> </div>
<div class="homepagePostDate fl ml15"> <div class="homepagePostDate fl ml15">
更新时间:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %> 更新时间:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<% if activity.parent_id.nil? %> <% if activity.parent_id.nil? %>
<% content = activity.content%> <% content = activity.content%>
<% else %> <% else %>
<% content = activity.parent.content%> <% content = activity.parent.content%>
<% end %> <% end %>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %>
<div class="cl"></div> <div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div> <div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div> <div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div> <div class="cl"></div>
<div class="mt10" style="font-weight:normal;"> <div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %> <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% count = 0 %> <% count = 0 %>
<% if activity.parent %> <% if activity.parent %>
<% count=activity.parent.children.count%> <% count=activity.parent.children.count%>
<% else %> <% else %>
<% count=activity.children.count%> <% count=activity.children.count%>
<% end %> <% end %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<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 %> <% if activity.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> <span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %> <% end %>
</span> </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 %>
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >展开更多</a></div> <div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >展开更多</a></div>
<% end %> <% end %>
</div> </div>
<% activity= activity.parent_id.nil? ? activity : activity.parent %> <% activity= activity.parent_id.nil? ? activity : activity.parent %>
<% replies_all_i = 0 %> <% replies_all_i = 0 %>
<% if count > 0 %> <% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% activity.children.reorder("created_on desc").each do |reply| %> <% activity.children.reorder("created_on desc").each do |reply| %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_url_in_org(reply.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_url_in_org(reply.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher mt-4"> <div class="homepagePostReplyPublisher mt-4">
<% if reply.try(:author).try(:realname) == ' ' %> <% if reply.try(:author).try(:realname) == ' ' %>
<%= link_to reply.try(:author), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:author), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to reply.try(:author).try(:realname), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:author).try(:realname), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
<% 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 %> <% if reply.author == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %> <% 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 %>">
<%= reply.content.html_safe %></div> <%= reply.content.html_safe %></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;"> <div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%> <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="quote[quote]" value=""> <input type="hidden" name="quote[quote]" value="">
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div> </div>
</div> </div>

@ -1,152 +1,152 @@
<div class="resources mt10" id="organization_document_<%= document.id %>"> <div class="resources mt10" id="organization_document_<%= document.id %>">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(User.find(document.creator_id)), :width => 45, :heigth => 45), user_url_in_org(document.creator_id) %> <%= link_to image_tag(url_to_avatar(User.find(document.creator_id)), :width => 45, :heigth => 45), user_url_in_org(document.creator_id) %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => User.find(document.creator_id)} %> <%= render :partial => 'users/show_detail_info', :locals => {:user => User.find(document.creator_id)} %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo"> <div class="homepagePostTo">
<%= link_to User.find(document.creator_id), user_url_in_org(document.creator.id), :class => "newsBlue mr15" %> <%= link_to User.find(document.creator_id), user_url_in_org(document.creator.id), :class => "newsBlue mr15" %>
TO&nbsp;&nbsp;<%= link_to document.organization.name, organization_path(document.organization), :class => "newsBlue" %> TO&nbsp;&nbsp;<%= link_to document.organization.name, organization_path(document.organization), :class => "newsBlue" %>
| |
<span style="color:#269ac9;"><%= document.org_subfield_id.nil? ? "组织文章" :"#{OrgSubfield.find(document.org_subfield_id).name}" %></span> <span style="color:#269ac9;"><%= document.org_subfield_id.nil? ? "组织文章" :"#{OrgSubfield.find(document.org_subfield_id).name}" %></span>
</div> </div>
<div class="homepagePostTitle postGrey"><%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %></div> <div class="homepagePostTitle postGrey"><%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id) %></div>
<div class="homepagePostDate fl"> <div class="homepagePostDate fl">
发布时间:<%= format_activity_day(document.created_at) %> <%= format_time(document.created_at, false) %> 发布时间:<%= format_activity_day(document.created_at) %> <%= format_time(document.created_at, false) %>
</div> </div>
<div class="homepagePostDate fl ml15"> <div class="homepagePostDate fl ml15">
更新时间:<%= format_time(OrgActivity.where("org_act_type='#{document.class}' and org_act_id =#{document.id}").first.updated_at) %> 更新时间:<%= format_time(OrgActivity.where("org_act_type='#{document.class}' and org_act_id =#{document.id}").first.updated_at) %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<% unless document.content.blank? %> <% unless document.content.blank? %>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>document.id, :content=>document.content} %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>document.id, :content=>document.content} %>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
<div id="intro_content_show_<%= document.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div> <div id="intro_content_show_<%= document.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= document.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div> <div id="intro_content_hide_<%= document.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div> <div class="cl"></div>
<div class="mt10" style="font-weight:normal;"> <div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => document} %> <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => document} %>
</div> </div>
<!-- <%# if defined?(home_id) %> <!-- <%# if defined?(home_id) %>
<div style="float:right;">最后编辑:<%#= User.find() %></div> <div style="float:right;">最后编辑:<%#= User.find() %></div>
<%# end %>--> <%# end %>-->
<% if User.current.admin? || User.current.admin_of_org?(Organization.find(document.organization_id)) || User.current.id == document.creator_id %> <% if User.current.admin? || User.current.admin_of_org?(Organization.find(document.organization_id)) || User.current.id == document.creator_id %>
<div class="homepagePostSetting"> <div class="homepagePostSetting">
<ul> <ul>
<li class="homepagePostSettingIcon"> <li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText"> <ul class="homepagePostSettiongText">
<li> <li>
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => document.organization_id, :home_id => document.id, :show_homepage => 1}, :method => "put", :remote => true) do |f| %> <%= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => document.organization_id, :home_id => document.id, :show_homepage => 1}, :method => "put", :remote => true) do |f| %>
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a> <a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a>
<% end %> <% end %>
</li> </li>
<li> <li>
<%= link_to "编辑文章", edit_org_document_comment_path(:id => document.id, :organization_id => document.organization_id, :flag => flag, :org_subfield_id => params[:org_subfield_id] ), :class => "postOptionLink" %> <%= link_to "编辑文章", edit_org_document_comment_path(:id => document.id, :organization_id => document.organization_id, :flag => flag, :org_subfield_id => params[:org_subfield_id] ), :class => "postOptionLink" %>
</li> </li>
<li> <li>
<%= link_to "删除文章", org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :method => 'delete', <%= link_to "删除文章", org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :method => 'delete',
:data => {:confirm => l(:text_are_you_sure)}, :data => {:confirm => l(:text_are_you_sure)},
:remote => true, :class => 'postOptionLink' %> :remote => true, :class => 'postOptionLink' %>
</li> </li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<% end %> <% end %>
</div> </div>
</div> </div>
<% comments_for_doc = document.children.reorder("created_at desc") %> <% comments_for_doc = document.children.reorder("created_at desc") %>
<% count = document.children.count() %> <% count = document.children.count() %>
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= document.id %>"> <div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= document.id %>">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<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 %> <% if document.creator_id.to_i == User.current.id.to_i %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(document) > 0 ? "#{get_praise_num(document)}" : "" %></span></span> <span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(document) > 0 ? "#{get_praise_num(document)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>document, :user_activity_id=>document.id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>document, :user_activity_id=>document.id,:type=>"activity"}%>
<% end %> <% end %>
</span> </span>
</div> </div>
<% if count > 3 %> <% if count > 3 %>
<div class="homepagePostReplyBannerMore"> <div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%= document.id %>" onclick="expand_reply('#reply_div_<%= document.id %> li','#reply_btn_<%=document.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help"> <a id="reply_btn_<%= document.id %>" onclick="expand_reply('#reply_div_<%= document.id %> li','#reply_btn_<%=document.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">
展开更多 展开更多
</a> </a>
</div> </div>
<% end %> <% end %>
</div> </div>
<div class="homepagePostReplyContainer" id="reply_div_<%= document.id %>" style="display:<%= count == 0 ? 'none' : 'block' %>"> <div class="homepagePostReplyContainer" id="reply_div_<%= document.id %>" style="display:<%= count == 0 ? 'none' : 'block' %>">
<ul> <ul>
<% reply_id = 0 %> <% reply_id = 0 %>
<% comments_for_doc.each do |comment| %> <% comments_for_doc.each do |comment| %>
<% 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>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"> <div class="homepagePostReplyPublisher">
<%= 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 %> <% if comment.creator_id.to_i == User.current.id.to_i %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %> <% end %>
</span> </span>
</div> </div>
<% unless comment.content.blank? %> <% unless comment.content.blank? %>
<div class="homepagePostReplyContent"><%= comment.content.html_safe %></div> <div class="homepagePostReplyContent"><%= comment.content.html_safe %></div>
<% end %> <% end %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= act.id %>"> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= act.id %>">
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current) %> <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current) %>
</div> </div>
<div class="homepagePostReplyInputContainer"> <div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= act.id %>' style="display:none;"> <div nhname='new_message_<%= act.id %>' style="display:none;">
<%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %> <%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %>
<input type="hidden" name="org_activity_id" value="<%= act.id %>"/> <input type="hidden" name="org_activity_id" value="<%= act.id %>"/>
<div nhname='toolbar_container_<%= act.id %>'></div> <div nhname='toolbar_container_<%= act.id %>'></div>
<textarea placeholder="有问题或建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= act.id %>' name="org_content"></textarea> <textarea placeholder="有问题或建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= act.id %>' name="org_content"></textarea>
<a id="new_message_submit_btn_<%= act.id %>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;line-height:18px;">发送</a> <a id="new_message_submit_btn_<%= act.id %>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;line-height:18px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= act.id %>'></p> <p nhname='contentmsg_<%= act.id %>'></p>
<% end %> <% end %>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
function expand_reply(container, btnid) { function expand_reply(container, btnid) {
var target = $(container); var target = $(container);
var btn = $(btnid); var btn = $(btnid);
if (btn.data('init') == '0') { if (btn.data('init') == '0') {
btn.data('init', 1); btn.data('init', 1);
btn.html('收起回复'); btn.html('收起回复');
target.show(); target.show();
} else { } else {
btn.data('init', 0); btn.data('init', 0);
btn.html('展开更多'); btn.html('展开更多');
target.hide(); target.hide();
target.eq(0).show(); target.eq(0).show();
target.eq(1).show(); target.eq(1).show();
target.eq(2).show(); target.eq(2).show();
} }
} }
</script> </script>

@ -1,123 +1,123 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id %>"> <div class="resources mt10" id="user_activity_<%= user_activity_id %>">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4"> <div class="homepagePostTo break_word mt-4">
<% if activity.try(:author).try(:realname) == ' ' %> <% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO <% end %> TO
<%= link_to activity.project.name.to_s+" | 项目新闻", project_news_index_path(activity.project), :class => "newsBlue ml15" %> <%= link_to activity.project.name.to_s+" | 项目新闻", project_news_index_path(activity.project), :class => "newsBlue ml15" %>
</div> </div>
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"--> <div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %> <%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>
</div> </div>
<% if activity.sticky == 1%> <% if activity.sticky == 1%>
<span class="sticky_btn_cir ml10">置顶</span> <span class="sticky_btn_cir ml10">置顶</span>
<% end%> <% end%>
<div class="cl"></div> <div class="cl"></div>
<div class="homepagePostDate fl"> <div class="homepagePostDate fl">
发布时间:<%= format_time(activity.created_on) %> 发布时间:<%= format_time(activity.created_on) %>
</div> </div>
<div class="homepagePostDate fl ml15"> <div class="homepagePostDate fl ml15">
更新时间:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %> 更新时间:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %>
<div class="cl"></div> <div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div> <div id="intro_content_show_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div> <div id="intro_content_hide_<%= user_activity_id %>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div> <div class="cl"></div>
<div class="mt10" style="font-weight:normal;"> <div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %> <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% count=activity.comments.count %> <% count=activity.comments.count %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<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 %> <% if activity.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> <span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %> <% end %>
</span> </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 %>
<div class="homepagePostReplyBannerMore"> <div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" > <a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多 展开更多
</a> </a>
</div> </div>
<% end %> <% end %>
</div> </div>
<% replies_all_i = 0 %> <% replies_all_i = 0 %>
<% if count > 0 %> <% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% activity.comments.reorder("created_on desc").each do |comment| %> <% activity.comments.reorder("created_on desc").each do |comment| %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher mt-4"> <div class="homepagePostReplyPublisher mt-4">
<% if comment.try(:author).try(:realname) == ' ' %> <% if comment.try(:author).try(:realname) == ' ' %>
<%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<% 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 %> <% if comment.author == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %> <% 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 %>">
<%= comment.comments.html_safe %></div> <%= comment.comments.html_safe %></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;"> <div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div> </div>
</div> </div>

@ -1,81 +1,81 @@
<%= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %> <%= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
<div class="project_r_h"> <div class="project_r_h">
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div> <div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
</div> </div>
<div class="repository_con" style="line-height:1.9;"> <div class="repository_con" style="line-height:1.9;">
<% if @entries.nil? %> <% if @entries.nil? %>
<%# 未提交代码提示 %> <%# 未提交代码提示 %>
<div class=" repository-url light-well"> <div class=" repository-url light-well">
<% if @entries.nil? && authorize_for('repositories', 'browse') %> <% if @entries.nil? && authorize_for('repositories', 'browse') %>
<div class="page-title"> <div class="page-title">
该版本库还没有上传代码! 该版本库还没有上传代码!
</div> </div>
<% end %> <% end %>
<% if @repository.type.to_s=="Repository::Gitlab" %> <% if @repository.type.to_s=="Repository::Gitlab" %>
版本库地址:<%= @repos_url %> 版本库地址:<%= @repos_url %>
<% else %> <% else %>
版本库地址:<%= h @repository.url %> 版本库地址:<%= h @repository.url %>
<% end %> <% end %>
<!-- added by bai --> <!-- added by bai -->
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% else %> <% else %>
<%= render :partial => 'navigation' %> <%= render :partial => 'navigation' %>
<div class="fl c_grey02 mt5 mr5">克隆网址:</div> <div class="fl c_grey02 mt5 mr5">克隆网址:</div>
<textarea id="copy_rep_content" class="cloneUrl mt5 fl" type="input" ><%= @repository.type.to_s=="Repository::Gitlab" ? @repos_url.to_s.lstrip : @repository.url %></textarea> <textarea id="copy_rep_content" class="cloneUrl mt5 fl" type="input" ><%= @repository.type.to_s=="Repository::Gitlab" ? @repos_url.to_s.lstrip : @repository.url %></textarea>
<a href="javascript:void(0);" class="clone_btn mt5" onclick="jsCopy()"><span class="vl_copy" title="点击复制版本库地址"></span></a> <a href="javascript:void(0);" class="clone_btn mt5" onclick="jsCopy()"><span class="vl_copy" title="点击复制版本库地址"></span></a>
<div class="fl mt5 ml15"><a href="javascript:void(0);" class="vl_btn fb" onclick="zip()"><span class="vl_zip"></span>ZIP</a> </div> <div class="fl mt5 ml15"><a href="javascript:void(0);" class="vl_btn fb" onclick="zip()"><span class="vl_zip"></span>ZIP</a> </div>
<%# 针对公开项目:用户必须创建了项目,否则用户无法同步 %> <%# 针对公开项目:用户必须创建了项目,否则用户无法同步 %>
<% if User.current.id != @project.user_id %> <% if User.current.id != @project.user_id %>
<div class="fr mt5"><%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :target => "_blank", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %> <div class="fr mt5"><%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", {:controller => 'repositories', :action => 'forked'}, :class=>"vl_btn", :target => "_blank", :confirm=>"平台将为您创建一个新的同名项目和版本库,请问是否继续?" %>
<span href="javascript:void(0);" class="vl_btn_2 fb"><%= @project.forked_count.to_i %></span> <span href="javascript:void(0);" class="vl_btn_2 fb"><%= @project.forked_count.to_i %></span>
</div> </div>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
<div class="recordBanner mt10"> <div class="recordBanner mt10">
<% if @changesets && !@changesets.empty? %> <% if @changesets && !@changesets.empty? %>
<% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %> <% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %>
<%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %> <%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %>
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%=link_to user_commit_rep(@changesets_latest_coimmit.author_email), user_path(user_commit_rep(@changesets_latest_coimmit.author_email)) %></div> <span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%=link_to user_commit_rep(@changesets_latest_coimmit.author_email), user_path(user_commit_rep(@changesets_latest_coimmit.author_email)) %></div>
<div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %></div> <div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %></div>
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div> <div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
</span> </span>
<% else %> <% else %>
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%=@changesets_latest_coimmit.author_email %></div> <span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%=@changesets_latest_coimmit.author_email %></div>
<div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %></div> <div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %></div>
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div> <div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
</span> </span>
<%end%> <%end%>
<% end %> <% end %>
<span class="fr mr5 "><font class="fb ml2 mr2 vl_branch mt2"> <span class="fr mr5 "><font class="fb ml2 mr2 vl_branch mt2">
<%= @repository.branches.count %></font> 个分支 <%= @repository.branches.count %></font> 个分支
</span> </span>
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit"> <span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
<%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %></font> 提交 <%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %></font> 提交
</span> </span>
</div> </div>
<% end %> <% end %>
<!--contextual end--> <!--contextual end-->
<% if !@entries.nil? && authorize_for('repositories', 'browse') %> <% if !@entries.nil? && authorize_for('repositories', 'browse') %>
<%# 数据统计 %> <%# 数据统计 %>
<%#= render :partial => 'summary' %> <%#= render :partial => 'summary' %>
<%# end %> <%# end %>
<%= render :partial => 'dir_list' %> <%= render :partial => 'dir_list' %>
<% end %> <% end %>
<%#= render_properties(@properties) %> <%#= render_properties(@properties) %>
<!-- 代码修订 --> <!-- 代码修订 -->
<%#= render_properties(@properties) %> <%#= render_properties(@properties) %>
<a href="https://<%=Setting.host_name %>/forums/1/memos/1232" >如何提交代码</a> <a href="https://<%=Setting.host_name %>/forums/1/memos/1232" >如何提交代码</a>
</div> </div>
<% content_for :header_tags do %> <% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %> <%= stylesheet_link_tag "scm" %>
<% end %> <% end %>
<% html_title(l(:label_repository)) -%> <% html_title(l(:label_repository)) -%>

@ -1,102 +1,102 @@
<!-- 匿评作品列表,显示某一个作品的信息 --> <!-- 匿评作品列表,显示某一个作品的信息 -->
<ul class="hworkListRow" id="student_work_<%= student_work.id%>"> <ul class="hworkListRow" id="student_work_<%= student_work.id%>">
<li class="hworkList340 <%= @homework.homework_type == 2 ? '' : 'width385'%>"> <li class="hworkList340 <%= @homework.homework_type == 2 ? '' : 'width385'%>">
<ul> <ul>
<li class="hworkPortrait mt15 mr10"> <li class="hworkPortrait mt15 mr10">
<%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40"),user_activities_path(student_work.user)) %> <%= link_to(image_tag(url_to_avatar(student_work.user),:width =>"40",:height => "40"),user_activities_path(student_work.user)) %>
</li> </li>
<div onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;" class="student_work_<%= student_work.id%>"> <div onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;" class="student_work_<%= student_work.id%>">
<li class="hworkName mt15 mr15 <%= @homework.homework_type == 2 ? '' : 'width165'%>"> <li class="hworkName mt15 mr15 <%= @homework.homework_type == 2 ? '' : 'width165'%>">
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%> <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
<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'}"%> <%= 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>
</li> </li>
<li> <li>
<% if @homework.homework_type != 3 %> <% if @homework.homework_type != 3 %>
<ul class="mt10 fl"> <ul class="mt10 fl">
<li class="hworkStName mr10 mt16" title="<%= student_work.user.show_name%>"> <li class="hworkStName mr10 mt16" title="<%= student_work.user.show_name%>">
<%= student_work.user.show_name%> <%= student_work.user.show_name%>
</li> </li>
<li class="hworkStID mt16" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>"> <li class="hworkStID mt16" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>">
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
</li> </li>
</ul> </ul>
<% 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 %>
<ul class="mt10 fl"> <ul class="mt10 fl">
<li class="hworkPrName mr10 mt12" title="项目名称"> <li class="hworkPrName mr10 mt12" title="项目名称">
<%= student_work.project.name %> <%= student_work.project.name %>
</li> </li>
</ul> </ul>
<% end %> <% end %>
</li> </li>
</div> </div>
</ul> </ul>
</li> </li>
<li class="hworkList130 c_grey student_work_<%= student_work.id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor: pointer;"> <li 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;
<% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %> <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(format_time(student_work.created_at)).strftime("%Y-%m-%d") %>
<span class="c_red">[迟交]</span> <span class="c_red">[迟交]</span>
<% end %> <% end %>
<% end %> <% end %>
</li> </li>
<li class="hworkList50 <%= score_color student_work.teacher_score%>"> <li class="hworkList50 <%= score_color student_work.teacher_score%>">
<%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%> <%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
</li> </li>
<li class="hworkList50 <%= score_color student_work.teaching_asistant_score%>"> <li class="hworkList50 <%= score_color student_work.teaching_asistant_score%>">
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%> <%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
</li> </li>
<% if @homework.homework_type == 2%> <% if @homework.homework_type == 2%>
<!-- 系统评分 --> <!-- 系统评分 -->
<li class="hworkList50 <%= score_color student_work.system_score%>"> <li class="hworkList50 <%= score_color student_work.system_score%>">
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%> <%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
</li> </li>
<% end%> <% end%>
<% if @homework.anonymous_comment == 0%> <% if @homework.anonymous_comment == 0%>
<li class="hworkList50 <%= score_color student_work.student_score%> student_score_info"> <li class="hworkList50 <%= score_color student_work.student_score%> student_score_info">
<%= student_work.student_score.nil? ? "未参与" : format("%.1f",student_work.student_score)%> <%= student_work.student_score.nil? ? "未参与" : format("%.1f",student_work.student_score)%>
<% unless student_work.student_score.nil?%> <% unless student_work.student_score.nil?%>
<span class="linkBlue"> <span class="linkBlue">
(<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>) (<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>)
</span> </span>
<div class="infoNi none"> <div class="infoNi none">
现共有 现共有
<span class="c_red">&nbsp;<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>&nbsp;</span> <span class="c_red">&nbsp;<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>&nbsp;</span>
名学生进行了匿评,平均分为 名学生进行了匿评,平均分为
<span class="c_red">&nbsp;<%= format("%.1f",student_work.student_score)%>&nbsp;</span>分。 <span class="c_red">&nbsp;<%= format("%.1f",student_work.student_score)%>&nbsp;</span>分。
</div> </div>
<% end%> <% end%>
</li> </li>
<% end %> <% end %>
<!-- 成绩 --> <!-- 成绩 -->
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%> <% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
<li class="hworkList50 <%= score_color score%> student_final_scor_info"> <li class="hworkList50 <%= score_color score%> student_final_scor_info">
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%> <%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
<% unless score.nil?%> <% unless score.nil?%>
<div class="infoNi none width180"> <div class="infoNi none width180">
作品最终评分为 作品最终评分为
<span class="c_red">&nbsp;<%= student_work.final_score%>&nbsp;</span>分。 <span class="c_red">&nbsp;<%= student_work.final_score%>&nbsp;</span>分。
迟交扣分 迟交扣分
<span class="c_red">&nbsp;<%= student_work.late_penalty%>&nbsp;</span>分, <span class="c_red">&nbsp;<%= student_work.late_penalty%>&nbsp;</span>分,
缺评扣分 缺评扣分
<span class="c_red">&nbsp;<%= student_work.absence_penalty%>&nbsp;</span>分, <span class="c_red">&nbsp;<%= student_work.absence_penalty%>&nbsp;</span>分,
最终成绩为 最终成绩为
<span class="c_red">&nbsp;<%= format("%.1f",score<0 ? 0 : score)%>&nbsp;</span>分。 <span class="c_red">&nbsp;<%= format("%.1f",score<0 ? 0 : score)%>&nbsp;</span>分。
</div> </div>
<% end%> <% end%>
</li> </li>
<li class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li> <li class="hworkTip" style="display: none" id="work_click_<%= student_work.id%>"><em></em><span></span><font class="fontGrey2">点击查看详情</font></li>
</ul> </ul>
<script type="text/javascript"> <script type="text/javascript">
$(".student_work_<%= student_work.id%>").mouseenter(function(){ $(".student_work_<%= student_work.id%>").mouseenter(function(){
if($("#about_hwork_<%= student_work.id%>").html().trim() == "") { if($("#about_hwork_<%= student_work.id%>").html().trim() == "") {
$("#work_click_<%= student_work.id%>").show(); $("#work_click_<%= student_work.id%>").show();
} }
}).mouseleave(function(){ }).mouseleave(function(){
$("#work_click_<%= student_work.id%>").hide(); $("#work_click_<%= student_work.id%>").hide();
}).mouse; }).mouse;
</script> </script>

@ -1,36 +1,36 @@
if($("#about_hwork_<%= @work.id%>").children().length > 0){ if($("#about_hwork_<%= @work.id%>").children().length > 0){
$("#about_hwork_<%= @work.id%>").html(""); $("#about_hwork_<%= @work.id%>").html("");
} }
else{ else{
<% if @homework.homework_type == 2%> <% if @homework.homework_type == 2%>
$("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show',:locals => {:work =>@work,:score =>@score,:student_work_scores => @student_work_scores}) %>"); $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'programing_work_show',:locals => {:work =>@work,:score =>@score,:student_work_scores => @student_work_scores}) %>");
var program_name = "text/x-csrc"; var program_name = "text/x-csrc";
var language = <%= @homework.language %>; var language = <%= @homework.language %>;
if (language == 1) { if (language == 1) {
program_name = 'text/x-csrc'; program_name = 'text/x-csrc';
} else if(language==2){ } else if(language==2){
program_name = 'text/x-c++src'; program_name = 'text/x-c++src';
}else if(language==3){ }else if(language==3){
program_name = 'text/x-cython'; program_name = 'text/x-cython';
} else if(language==4){ } else if(language==4){
program_name = 'text/x-java'; program_name = 'text/x-java';
} }
var editor = CodeMirror(document.getElementById("work-code_<%= @work.id%>"), { var editor = CodeMirror(document.getElementById("work-code_<%= @work.id%>"), {
mode: {name: program_name, mode: {name: program_name,
version: 2, version: 2,
singleLineStringErrors: false}, singleLineStringErrors: false},
lineNumbers: true, lineNumbers: true,
indentUnit: 2, indentUnit: 2,
matchBrackets: true, matchBrackets: true,
readOnly: true, readOnly: true,
value: $("#work-src").text() value: $("#work-src").text()
} }
); );
<% else%> <% else%>
$("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show',:locals => {:work =>@work,:score =>@score,:student_work_scores => @student_work_scores}) %>"); $("#about_hwork_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'show',:locals => {:work =>@work,:score =>@score,:student_work_scores => @student_work_scores}) %>");
<% end%> <% end%>
$('#score_<%= @work.id%>').peSlider({range: 'min'}); $('#score_<%= @work.id%>').peSlider({range: 'min'});
} }

@ -356,7 +356,7 @@
<%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %> <%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %>
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>

@ -1,110 +1,110 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id%>"> <div class="resources mt10" id="user_activity_<%= user_activity_id%>">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4"> <div class="homepagePostTo break_word mt-4">
<% if activity.try(:user).try(:realname) == ' ' %> <% if activity.try(:user).try(:realname) == ' ' %>
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% end %> TO <% end %> TO
<% course=Course.find(activity.jour_id) %> <% course=Course.find(activity.jour_id) %>
<%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %> <%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %>
</div> </div>
<div class="homepagePostTitle break_word list_style upload_img"> <div class="homepagePostTitle break_word list_style upload_img">
<% if activity.parent %> <% if activity.parent %>
<%= link_to activity.parent.notes.html_safe, course_feedback_path(course), :class => "postGrey" %> <%= link_to activity.parent.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
<% else %> <% else %>
<%= link_to activity.notes.html_safe, course_feedback_path(course), :class => "postGrey" %> <%= link_to activity.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
<% end %> <% end %>
</div> </div>
<div class="homepagePostDate fl"> <div class="homepagePostDate fl">
留言时间:<%= format_time(activity.created_on) %> 留言时间:<%= format_time(activity.created_on) %>
</div> </div>
<div class="homepagePostDate fl ml15"> <div class="homepagePostDate fl ml15">
更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %> 更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</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="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>"> <div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
<div class="homepagePostReplyBannerCount"> <div class="homepagePostReplyBannerCount">
回复(<%= count %> 回复(<%= count %>
</div> </div>
<div class="homepagePostReplyBannerTime"></div> <div class="homepagePostReplyBannerTime"></div>
<%if count>3 %> <%if count>3 %>
<div class="homepagePostReplyBannerMore"> <div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" > <a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多 展开更多
</a> </a>
</div> </div>
<% end %> <% end %>
</div> </div>
<% replies_all_i = 0 %> <% replies_all_i = 0 %>
<% if count > 0 %> <% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% fetch_user_leaveWord_reply(activity).each do |comment| unless fetch_user_leaveWord_reply(activity).nil? %> <% fetch_user_leaveWord_reply(activity).each do |comment| unless fetch_user_leaveWord_reply(activity).nil? %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"> <div class="homepagePostReplyPublisher">
<% if comment.try(:user).try(:realname) == ' ' %> <% if comment.try(:user).try(:realname) == ' ' %>
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= 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) %>
</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 %>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;"> <div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => activity.id}, :method => "post", :remote => true) do |f|%> <%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => activity.id}, :method => "post", :remote => true) do |f|%>
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %> <%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %>
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %> <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %>
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %> <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %>
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %> <%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %> <%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div> </div>
</div> </div>

@ -178,7 +178,7 @@
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>

@ -1,148 +1,148 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id%>"> <div class="resources mt10" id="user_activity_<%= user_activity_id%>">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4"> <div class="homepagePostTo break_word mt-4">
<% if @ctivity.try(:author).try(:realname) == ' ' %> <% if @ctivity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO <!--+"(课程名称)"--> <% end %> TO <!--+"(课程名称)"-->
<%= link_to activity.course.name.to_s+" | 课程通知", course_news_index_path(activity.course), :class => "newsBlue ml15" %> <%= link_to activity.course.name.to_s+" | 课程通知", course_news_index_path(activity.course), :class => "newsBlue ml15" %>
</div> </div>
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"--> <div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %> <%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>
</div> </div>
<% if activity.sticky == 1%> <% if activity.sticky == 1%>
<span class="sticky_btn_cir ml10">置顶</span> <span class="sticky_btn_cir ml10">置顶</span>
<% end%> <% end%>
<div class="cl"></div> <div class="cl"></div>
<div class="homepagePostDate fl"> <div class="homepagePostDate fl">
发布时间:<%= format_time(activity.created_on) %> 发布时间:<%= format_time(activity.created_on) %>
</div> </div>
<div class="homepagePostDate fl ml15"> <div class="homepagePostDate fl ml15">
更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %> 更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %>
<div class="cl"></div> <div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div> <div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div> <div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div> <div class="cl"></div>
<div class="mt10" style="font-weight:normal;"> <div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %> <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div> </div>
<div class="homepagePostSetting"> <div class="homepagePostSetting">
<ul> <ul>
<li class="homepagePostSettingIcon"> <li class="homepagePostSettingIcon">
<% if User.current.logged? %> <% if User.current.logged? %>
<ul class="homepagePostSettiongText"> <ul class="homepagePostSettiongText">
<li><%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %></li> <li><%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %></li>
<li> <li>
<%= link_to( <%= link_to(
l(:button_edit), l(:button_edit),
{controller:'news', :action => 'edit', :id => activity.id}, {controller:'news', :action => 'edit', :id => activity.id},
:class => 'postOptionLink' :class => 'postOptionLink'
) if User.current.allowed_to?(:manage_news, activity.course) %> ) if User.current.allowed_to?(:manage_news, activity.course) %>
</li> </li>
<li> <li>
<%= delete_link( <%= delete_link(
news_path(activity), news_path(activity),
:data => {:confirm => l(:text_are_you_sure)}, :data => {:confirm => l(:text_are_you_sure)},
:class => 'postOptionLink' :class => 'postOptionLink'
) if User.current.allowed_to?(:manage_news, activity.course) %> ) if User.current.allowed_to?(:manage_news, activity.course) %>
</li> </li>
</ul> </ul>
<% end %> <% end %>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% count=activity.comments.count %> <% count=activity.comments.count %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<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 %> <% if activity.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> <span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %> <% end %>
</span> </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 %>
<div class="homepagePostReplyBannerMore"> <div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" > <a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多 展开更多
</a> </a>
</div> </div>
<% end %> <% end %>
</div> </div>
<% replies_all_i = 0 %> <% replies_all_i = 0 %>
<% if count > 0 %> <% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% activity.comments.reorder("created_on desc").each do |comment| %> <% activity.comments.reorder("created_on desc").each do |comment| %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher mt-4"> <div class="homepagePostReplyPublisher mt-4">
<% if comment.try(:author).try(:realname) == ' ' %> <% if comment.try(:author).try(:realname) == ' ' %>
<%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<% 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 %> <% if comment.author == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %> <% 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 %>">
<%= comment.comments.html_safe %></div> <%= comment.comments.html_safe %></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;"> <div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div> </div>
</div> </div>

@ -1,89 +1,89 @@
<% count = activity.journals.count %> <% count = activity.journals.count %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<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 %> <% if activity.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> <span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %> <% end %>
</span> </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 %>
<div class="homepagePostReplyBannerMore"> <div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%= user_activity_id %>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help"> <a id="reply_btn_<%= user_activity_id %>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">
展开更多 展开更多
</a> </a>
</div> </div>
<% end %> <% end %>
</div> </div>
<% replies_all_i = 0 %> <% replies_all_i = 0 %>
<% if count > 0 %> <% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% activity.journals.reorder("created_on desc").each do |reply| %> <% activity.journals.reorder("created_on desc").each do |reply| %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i + 1 %> <% replies_all_i=replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher mt-4"> <div class="homepagePostReplyPublisher mt-4">
<% if reply.try(:user).try(:realname) == ' ' %> <% if reply.try(:user).try(:realname) == ' ' %>
<%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> <%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
<% 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 %> <% if reply.user == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %> <% 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 %>">
<% if reply.details.any? %> <% if reply.details.any? %>
<% details_to_strings(reply.details).each do |string| %> <% details_to_strings(reply.details).each do |string| %>
<p><%= string %></p> <p><%= string %></p>
<% end %> <% end %>
<% end %> <% end %>
<P><%= reply.notes.html_safe %></P> <P><%= reply.notes.html_safe %></P>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id %>' style="display:none;"> <div nhname='new_message_<%= user_activity_id %>' style="display:none;">
<%= form_for('new_form',:url => add_journal_issue_path(activity.id, :user_activity_id => user_activity_id),:method => "post", :remote => true) do |f| %> <%= form_for('new_form',:url => add_journal_issue_path(activity.id, :user_activity_id => user_activity_id),:method => "post", :remote => true) do |f| %>
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div> </div>

@ -154,7 +154,7 @@
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>

@ -132,7 +132,7 @@
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>

@ -1,33 +1,33 @@
<% if AtMessage === ma && ma.at_valid? %> <% if AtMessage === ma && ma.at_valid? %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"),user_path(ma.author) %></a></li> <li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"),user_path(ma.author) %></a></li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<span class="newsBlue homepageNewsPublisher"><%= ma.author.login %></span><span class="homepageNewsType fl">提到了你:</span> <span class="newsBlue homepageNewsPublisher"><%= ma.author.login %></span><span class="homepageNewsType fl">提到了你:</span>
</li> </li>
<li class="homepageNewsContent fl"> <li class="homepageNewsContent fl">
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %> <% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
<%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course, <%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course,
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id), :parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id),
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}", :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
:onmouseover =>"message_titile_show($(this),event)", :onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %> :onmouseout => "message_titile_hide($(this))" %>
<% elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %> <% elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %>
<%= link_to ma.subject.html_safe, project_boards_path(ma.at_message.project, <%= link_to ma.subject.html_safe, project_boards_path(ma.at_message.project,
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id), :parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id),
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}", :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
:onmouseover =>"message_titile_show($(this),event)", :onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %> :onmouseout => "message_titile_hide($(this))" %>
<% else %> <% else %>
<%= link_to ma.subject.html_safe, ma.url, :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}", :onmouseover =>"message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))" %> <%= link_to ma.subject.html_safe, ma.url, :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}", :onmouseover =>"message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))" %>
<% end %> <% end %>
</li> </li>
<div style="display: none" class="message_title_red system_message_style"> <div style="display: none" class="message_title_red system_message_style">
<p><strong>标题:</strong><%= ma.subject %></p> <p><strong>标题:</strong><%= ma.subject %></p>
<% unless ma.description.nil? %> <% unless ma.description.nil? %>
<div class="fl"><strong>内容:</strong></div> <div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.description.html_safe %></div> <div class="ml36"><%= ma.description.html_safe %></div>
<% end %> <% end %>
</div> </div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul> </ul>
<% end %> <% end %>

@ -1,147 +1,147 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id%>"> <div class="resources mt10" id="user_activity_<%= user_activity_id%>">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo break_word mt-4"> <div class="homepagePostTo break_word mt-4">
<% if @ctivity.try(:author).try(:realname) == ' ' %> <% if @ctivity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %> <% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO <!--+"(课程名称)"--> <% end %> TO <!--+"(课程名称)"-->
<%= link_to activity.author.name.to_s+" | 博客", user_blogs_path(:user_id=>activity.author_id), :class => "newsBlue ml15" %> <%= link_to activity.author.name.to_s+" | 博客", user_blogs_path(:user_id=>activity.author_id), :class => "newsBlue ml15" %>
</div> </div>
<div class="homepagePostTitle break_word"> <!--+"(通知标题)"--> <div class="homepagePostTitle break_word"> <!--+"(通知标题)"-->
<div class="fl"> <div class="fl">
<%= link_to activity.title.to_s, user_blog_blog_comment_path(:user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id,:in_act => true), :class => "postGrey" %> <%= link_to activity.title.to_s, user_blog_blog_comment_path(:user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id,:in_act => true), :class => "postGrey" %>
</div> </div>
<% if activity.sticky == 1%> <% if activity.sticky == 1%>
<span class="sticky_btn_cir ml10">置顶</span> <span class="sticky_btn_cir ml10">置顶</span>
<% end%> <% end%>
<% if activity.locked%> <% if activity.locked%>
<span class="locked_btn_cir ml10 fl" title="已锁定">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> <span class="locked_btn_cir ml10 fl" title="已锁定">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
<% end%> <% end%>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="homepagePostDate fl"> <div class="homepagePostDate fl">
发布时间:<%= format_time(activity.created_on) %> 发布时间:<%= format_time(activity.created_on) %>
</div> </div>
<div class="homepagePostDate fl ml15"> <div class="homepagePostDate fl ml15">
更新时间:<%= format_time(UserActivity.where("act_type='#{activity.class}' and act_id =#{activity.id}").first.updated_at) %> 更新时间:<%= format_time(UserActivity.where("act_type='#{activity.class}' and act_id =#{activity.id}").first.updated_at) %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.content} %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.content} %>
<div class="cl"></div> <div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div> <div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div> <div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div> <div class="cl"></div>
<div class="mt10" style="font-weight:normal;"> <div class="mt10" style="font-weight:normal;">
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %> <%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% count=activity.children.count %> <% count=activity.children.count %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<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 %> <% if activity.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> <span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %> <% end %>
</span> </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 %>
<div class="homepagePostReplyBannerMore"> <div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" > <a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多 展开更多
</a> </a>
</div> </div>
<% end %> <% end %>
</div> </div>
<% replies_all_i = 0 %> <% replies_all_i = 0 %>
<% if count > 0 %> <% if count > 0 %>
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% activity.children.reorder("created_on desc").each do |comment| %> <% activity.children.reorder("created_on desc").each do |comment| %>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher mt-4"> <div class="homepagePostReplyPublisher mt-4">
<% if comment.try(:author).try(:realname) == ' ' %> <% if comment.try(:author).try(:realname) == ' ' %>
<%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<% 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 %> <% if comment.author == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %> <% 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 %>">
<%= comment.content.html_safe %></div> <%= comment.content.html_safe %></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<% if activity.locked == false && User.current.logged?%> <% if activity.locked == false && User.current.logged?%>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;"> <div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'blog_comments', :action => 'reply', :user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id},:method => "post", :remote => true) do |f|%> <%= form_for('new_form',:url => {:controller => 'blog_comments', :action => 'reply', :user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="quote[quote]" value=""> <input type="hidden" name="quote[quote]" value="">
<input type="hidden" name="in_user_center" value="true"> <input type="hidden" name="in_user_center" value="true">
<input type="hidden" name="blog_comment[sticky]" value="0"> <input type="hidden" name="blog_comment[sticky]" value="0">
<input type="hidden" name="blog_comment[locked]" value="0"> <input type="hidden" name="blog_comment[locked]" value="0">
<input type="hidden" name="blog_comment[title]" value="RE:<%= activity.title%>"> <input type="hidden" name="blog_comment[title]" value="RE:<%= activity.title%>">
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>"> <input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="blog_comment[content]"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="blog_comment[content]"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% end %> <% end %>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$("#moreProject_<%=user_activity_id %>").click(function(){ $("#moreProject_<%=user_activity_id %>").click(function(){
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap'); $("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
$("#relatePWrap_<%=user_activity_id %>").css("height","auto"); $("#relatePWrap_<%=user_activity_id %>").css("height","auto");
$(this).hide(); $(this).hide();
}); });
$("#hideProject_<%=user_activity_id %>").click(function(){ $("#hideProject_<%=user_activity_id %>").click(function(){
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap'); $("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
$("#moreProject_<%=user_activity_id %>").show(); $("#moreProject_<%=user_activity_id %>").show();
}); });
</script> </script>

@ -360,7 +360,7 @@
<%= hidden_field_tag 'is_in_course',params[:is_in_course],:value =>is_in_course %> <%= hidden_field_tag 'is_in_course',params[:is_in_course],:value =>is_in_course %>
<div nhname='toolbar_container_<%= homework_common.id%>'></div> <div nhname='toolbar_container_<%= homework_common.id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= homework_common.id%>' name="homework_message"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= homework_common.id%>' name="homework_message"></textarea>
<a id="new_message_submit_btn_<%= homework_common.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= homework_common.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= homework_common.id%>'></p> <p nhname='contentmsg_<%= homework_common.id%>'></p>
<% end%> <% end%>

@ -1,152 +1,152 @@
<div class="resources mt10" id="user_activity_<%= user_activity_id%>" style="<%= activity.private == 1? 'background-color:#cecece;':'' %>"> <div class="resources mt10" id="user_activity_<%= user_activity_id%>" style="<%= activity.private == 1? 'background-color:#cecece;':'' %>">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %> <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
</div> </div>
<div class="homepagePostDes"> <div class="homepagePostDes">
<div class="homepagePostTo break_word"> <div class="homepagePostTo break_word">
<%= link_to activity.user.show_name, user_path(activity.user_id), :class => "newsBlue mr15" %> <%= link_to activity.user.show_name, user_path(activity.user_id), :class => "newsBlue mr15" %>
TO TO
<% if activity.jour %> <% if activity.jour %>
<%= link_to activity.jour.show_name+""+(activity.jour.login ? activity.jour.login : activity.jour.show_name ).to_s+")的"+ (activity.private == 1? "私信":"留言"), <%= link_to activity.jour.show_name+""+(activity.jour.login ? activity.jour.login : activity.jour.show_name ).to_s+")的"+ (activity.private == 1? "私信":"留言"),
feedback_path(activity.jour, :host=> Setting.host_user), :class => "newsBlue ml15" %> feedback_path(activity.jour, :host=> Setting.host_user), :class => "newsBlue ml15" %>
<% if activity.private == 1 %> <% if activity.private == 1 %>
<span class="PMTag ml15 f12">私信</span> <span class="PMTag ml15 f12">私信</span>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
<% if is_activity.to_i == 1 %> <% if is_activity.to_i == 1 %>
<div class="homepagePostTitle break_word list_style upload_img"> <div class="homepagePostTitle break_word list_style upload_img">
<% if activity.parent %> <% if activity.parent %>
<%= link_to activity.parent.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %> <%= link_to activity.parent.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
<% else %> <% else %>
<%= link_to activity.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %> <%= link_to activity.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
<% end %> <% end %>
</div> </div>
<% else %> <% else %>
<% if activity.parent %> <% if activity.parent %>
<% content = activity.parent.notes %> <% content = activity.parent.notes %>
<% else %> <% else %>
<% content = activity.notes %> <% content = activity.notes %>
<% end %> <% end %>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %> <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %>
<% end %> <% end %>
<div class="homepagePostDate fl"> <div class="homepagePostDate fl">
留言时间:<%= format_time(activity.created_on) %> 留言时间:<%= format_time(activity.created_on) %>
</div> </div>
<div class="homepagePostDate fl ml15"> <div class="homepagePostDate fl ml15">
更新时间:<%= format_time(PrincipalActivity.where("principal_act_type='#{activity.class}' and principal_act_id =#{activity.id}").first.updated_at) %> 更新时间:<%= format_time(PrincipalActivity.where("principal_act_type='#{activity.class}' and principal_act_id =#{activity.id}").first.updated_at) %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<% if activity.user == User.current || User.current.admin?%> <% if activity.user == User.current || User.current.admin?%>
<div class="homepagePostSetting"> <div class="homepagePostSetting">
<ul> <ul>
<li class="<%= activity.private == 1 ? 'whiteSettingIcon' : 'homepagePostSettingIcon' %>"> <li class="<%= activity.private == 1 ? 'whiteSettingIcon' : 'homepagePostSettingIcon' %>">
<ul class="homepagePostSettiongText"> <ul class="homepagePostSettiongText">
<li> <li>
<%= link_to(l(:label_bid_respond_delete), <%= link_to(l(:label_bid_respond_delete),
{:controller => 'words', :action => 'destroy', :object_id => activity, :user_id => activity.user,:user_activity_id => user_activity_id,:is_activity=>is_activity}, {:controller => 'words', :action => 'destroy', :object_id => activity, :user_id => activity.user,:user_activity_id => user_activity_id,:is_activity=>is_activity},
:confirm => l(:text_are_you_sure), :method => 'delete', :confirm => l(:text_are_you_sure), :method => 'delete',
:class => "postOptionLink", :title => l(:button_delete)) %> :class => "postOptionLink", :title => l(:button_delete)) %>
</li> </li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% count=fetch_user_leaveWord_reply(activity).count %> <% count=fetch_user_leaveWord_reply(activity).count %>
<div class="homepagePostReply"> <div class="homepagePostReply">
<div class="homepagePostReplyBanner"> <div class="homepagePostReplyBanner">
<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 %> <% if activity.user == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span> <span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %> <% end %>
</span> </span>
</div> </div>
<div class="homepagePostReplyBannerTime"></div> <div class="homepagePostReplyBannerTime"></div>
<%if count>3 %> <%if count>3 %>
<div class="homepagePostReplyBannerMore"> <div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" > <a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多 展开更多
</a> </a>
</div> </div>
<% end %> <% end %>
</div> </div>
<% replies_all_i = 0 %> <% replies_all_i = 0 %>
<% if count > 0 %> <% if count > 0 %>
<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| %>
<% 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">
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
</div> </div>
<div class="homepagePostReplyDes"> <div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"> <div class="homepagePostReplyPublisher">
<% if comment.try(:user).try(:realname) == ' ' %> <% if comment.try(:user).try(:realname) == ' ' %>
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %> <%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
<% else %> <% else %>
<%= 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 %>"> <span id="reply_praise_count_<%=comment.id %>">
<% if comment.user == User.current %> <% if comment.user == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span> <span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %> <% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %> <% 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? %>
<%= link_to(l(:label_bid_respond_delete), <%= link_to(l(:label_bid_respond_delete),
{:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:user_activity_id => user_activity_id,:is_activity=>is_activity}, {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:user_activity_id => user_activity_id,:is_activity=>is_activity},
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
:class => "delete", :title => l(:button_delete)) %> :class => "delete", :title => l(:button_delete)) %>
<% 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_<%= user_activity_id %>">
<%= comment.notes.html_safe %> <%= comment.notes.html_safe %>
</div> </div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
<% end %> <% end %>
<div class="homepagePostReplyContainer borderBottomNone minHeight48"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %></div> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10"> <div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;"> <div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => activity.id},:method => "post", :remote => true) do |f|%> <%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => activity.id},:method => "post", :remote => true) do |f|%>
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %> <%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %>
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %> <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %>
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %> <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %>
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %> <%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %> <%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
<%= hidden_field_tag 'is_activity',params[:is_activity],:value =>is_activity %> <%= hidden_field_tag 'is_activity',params[:is_activity],:value =>is_activity %>
<div nhname='toolbar_container_<%= user_activity_id%>'></div> <div nhname='toolbar_container_<%= user_activity_id%>'></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea> <textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea>
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a> <a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div> <div class="cl"></div>
<p nhname='contentmsg_<%= user_activity_id%>'></p> <p nhname='contentmsg_<%= user_activity_id%>'></p>
<% end%> <% end%>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
</div> </div>
</div> </div>

File diff suppressed because it is too large Load Diff

@ -1,30 +1,30 @@
<% if ma.class == UserFeedbackMessage %> <% if ma.class == UserFeedbackMessage %>
<% if ma.journals_for_message_type == "JournalsForMessage" %> <% if ma.journals_for_message_type == "JournalsForMessage" %>
<ul class="homepageNewsList fl"> <ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"> <li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"), user_path(ma.journals_for_message.user) %></a> <a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"), user_path(ma.journals_for_message.user) %></a>
</li> </li>
<li class="homepageNewsPubType fl"> <li class="homepageNewsPubType fl">
<%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher" %> <%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %></span> <span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %></span>
</li> </li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey"> <li class="homepageNewsContent fl">
<%= link_to ma.journals_for_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", <%= link_to ma.journals_for_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)", :onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a> :onmouseout => "message_titile_hide($(this))" %>
</li> </li>
<div style="display: none" class="message_title_red system_message_style" > <div style="display: none" class="message_title_red system_message_style" >
<% if ma.journals_for_message.reply_id == 0 %> <% if ma.journals_for_message.reply_id == 0 %>
<%= ma.journals_for_message.notes.html_safe %> <%= ma.journals_for_message.notes.html_safe %>
<% else %> <% else %>
<div class="fl"><strong>您的留言:</strong></div> <div class="fl"><strong>您的留言:</strong></div>
<div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div> <div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>
<div class="fl"><strong>回复内容:</strong></div> <div class="fl"><strong>回复内容:</strong></div>
<div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div> <div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div>
<% end %> <% end %>
</div> </div>
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li> <li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
</ul> </ul>
<% end %> <% end %>
<% end %> <% end %>

@ -1,18 +1,18 @@
class UpdateHomeworkCommonUpdatedAt < ActiveRecord::Migration class UpdateHomeworkCommonUpdatedAt < ActiveRecord::Migration
def up def up
count = HomeworkCommon.all.count / 30 + 2 count = HomeworkCommon.all.count / 30 + 2
transaction do transaction do
for i in 1 ... count do i for i in 1 ... count do i
HomeworkCommon.page(i).per(30).each do |hw| HomeworkCommon.page(i).per(30).each do |hw|
ca = CourseActivity.where("course_act_type = 'HomeworkCommon' and course_act_id = #{hw.id}").first ca = CourseActivity.where("course_act_type = 'HomeworkCommon' and course_act_id = #{hw.id}").first
unless ca.nil? unless ca.nil?
hw.update_attributes(:updated_at => ca.updated_at) hw.update_attributes(:updated_at => ca.updated_at)
end end
end end
end end
end end
end end
def down def down
end end
end end

@ -1,50 +1,50 @@
class UpdateContributorAfterDelete < ActiveRecord::Migration class UpdateContributorAfterDelete < ActiveRecord::Migration
def up def up
Course.all.each do |course| Course.all.each do |course|
if course.course_activities.count > 1 if course.course_activities.count > 1
course.members.each do |s| course.members.each do |s|
puts course.id puts course.id
puts course.name puts course.name
puts s.user_id puts s.user_id
# board_count = CourseActivity.where("user_id =? and course_id =? and course_act_type =?",s.student_id, course.id, "Message").count * 2 # board_count = CourseActivity.where("user_id =? and course_id =? and course_act_type =?",s.student_id, course.id, "Message").count * 2
# 发帖数 # 发帖数
board_count = Message.find_by_sql("select DISTINCT me.* from messages me, boards b where b.id = me.board_id and b.course_id = #{course.id} and b.project_id = '-1' and me.author_id = #{s.user_id} and me.parent_id is null;").count board_count = Message.find_by_sql("select DISTINCT me.* from messages me, boards b where b.id = me.board_id and b.course_id = #{course.id} and b.project_id = '-1' and me.author_id = #{s.user_id} and me.parent_id is null;").count
# 回帖数 # 回帖数
message_reply_count = Message.find_by_sql("select DISTINCT me.* from messages me, boards b where b.id = me.board_id and b.course_id = #{course.id} and b.project_id = '-1' and me.author_id = #{s.user_id} and me.parent_id is not null").count * 1 message_reply_count = Message.find_by_sql("select DISTINCT me.* from messages me, boards b where b.id = me.board_id and b.course_id = #{course.id} and b.project_id = '-1' and me.author_id = #{s.user_id} and me.parent_id is not null").count * 1
# 新闻回复 # 新闻回复
common_reply_count = Comment.find_by_sql("select cm.* from comments cm, news n where cm.author_id = #{s.user_id} and n.course_id = #{course.id} and cm.commented_id = n.id and cm.commented_type ='News'").count * 1 common_reply_count = Comment.find_by_sql("select cm.* from comments cm, news n where cm.author_id = #{s.user_id} and n.course_id = #{course.id} and cm.commented_id = n.id and cm.commented_type ='News'").count * 1
# 通知 # 通知
common_count = News.find_by_sql("select n.* from news n where n.author_id = #{s.user_id} and n.course_id = #{course.id} ").count * 1 common_count = News.find_by_sql("select n.* from news n where n.author_id = #{s.user_id} and n.course_id = #{course.id} ").count * 1
# attachment_count = CourseActivity.where("user_id =? and course_id =? and course_act_type =?", s.student_id, course.id, "Attachment").count * 5 # attachment_count = CourseActivity.where("user_id =? and course_id =? and course_act_type =?", s.student_id, course.id, "Attachment").count * 5
# 附件数 # 附件数
attachment_count = Attachment.find_by_sql("SELECT * FROM `attachments` where container_id = #{course.id} and author_id = #{s.user_id} and container_type ='Course'").count attachment_count = Attachment.find_by_sql("SELECT * FROM `attachments` where container_id = #{course.id} and author_id = #{s.user_id} and container_type ='Course'").count
# 课程留言数 # 课程留言数
journal_count = JournalsForMessage.where("user_id =? and jour_id =? and jour_type =? ", s.user_id, course.id, "Course").count * 1 journal_count = JournalsForMessage.where("user_id =? and jour_id =? and jour_type =? ", s.user_id, course.id, "Course").count * 1
# 作业留言 # 作业留言
journal_homework_count = JournalsForMessage.find_by_sql("SELECT jfm.* FROM `journals_for_messages` jfm, homework_commons hc where hc.id = jfm.jour_id and hc.course_id =#{course.id} and jfm.user_id =#{s.user_id} and jfm.jour_type ='HomeworkCommon';").count * 1 journal_homework_count = JournalsForMessage.find_by_sql("SELECT jfm.* FROM `journals_for_messages` jfm, homework_commons hc where hc.id = jfm.jour_id and hc.course_id =#{course.id} and jfm.user_id =#{s.user_id} and jfm.jour_type ='HomeworkCommon';").count * 1
# journal_count = CourseActivity.where("user_id =? and course_id =? and course_act_type =?", s.student_id, course.id, "JournalsForMessage").count * 1 # journal_count = CourseActivity.where("user_id =? and course_id =? and course_act_type =?", s.student_id, course.id, "JournalsForMessage").count * 1
# journal_reply_count = JournalsForMessage.where("user_id =? and jour_id =? and jour_type =? and status =?", s.student_id, course.id, "Course",1).count * 1 # journal_reply_count = JournalsForMessage.where("user_id =? and jour_id =? and jour_type =? and status =?", s.student_id, course.id, "Course",1).count * 1
total = board_count + message_reply_count + common_reply_count + attachment_count + journal_count total = board_count + message_reply_count + common_reply_count + attachment_count + journal_count
course_contributor = CourseContributorScore.where("course_id =? and user_id =?", course.id, s.user_id).first course_contributor = CourseContributorScore.where("course_id =? and user_id =?", course.id, s.user_id).first
if course_contributor.nil? if course_contributor.nil?
CourseContributorScore.create(:course_id => course.id, :user_id => s.user_id, :message_num => board_count, :message_reply_num => message_reply_count, CourseContributorScore.create(:course_id => course.id, :user_id => s.user_id, :message_num => board_count, :message_reply_num => message_reply_count,
:news_reply_num => common_reply_count, :news_num => common_count, :resource_num => attachment_count, :journal_num => journal_count, :news_reply_num => common_reply_count, :news_num => common_count, :resource_num => attachment_count, :journal_num => journal_count,
:homework_journal_num => journal_homework_count, :journal_reply_num => 0, :total_score => total) :homework_journal_num => journal_homework_count, :journal_reply_num => 0, :total_score => total)
else else
course_contributor.message_num = board_count course_contributor.message_num = board_count
course_contributor.message_reply_num = message_reply_count course_contributor.message_reply_num = message_reply_count
course_contributor.news_reply_num = common_reply_count course_contributor.news_reply_num = common_reply_count
course_contributor.news_num = common_count course_contributor.news_num = common_count
course_contributor.resource_num = attachment_count course_contributor.resource_num = attachment_count
course_contributor.journal_num = journal_count course_contributor.journal_num = journal_count
course_contributor.homework_journal_num = journal_homework_count course_contributor.homework_journal_num = journal_homework_count
course_contributor.save course_contributor.save
end end
end end
end end
end end
end end
def down def down
end end
end end

@ -1,8 +1,8 @@
class DeleteStudentWorkData < ActiveRecord::Migration class DeleteStudentWorkData < ActiveRecord::Migration
def up def up
StudentWork.where("homework_common_id = 2604 AND user_id = 10763 AND final_score = 0").destroy_all StudentWork.where("homework_common_id = 2604 AND user_id = 10763 AND final_score = 0").destroy_all
end end
def down def down
end end
end end

@ -1,78 +1,78 @@
#coding=utf-8 #coding=utf-8
module Trustie module Trustie
module Gitlab module Gitlab
module Helper module Helper
GUEST = 10 GUEST = 10
REPORTER = 20 REPORTER = 20
DEVELOPER = 30 DEVELOPER = 30
MASTER = 40 MASTER = 40
OWNER = 50 OWNER = 50
# 项目公开和私有 # 项目公开和私有
PUBLIC = 20 PUBLIC = 20
PRIVATE = 0 PRIVATE = 0
def change_password(uid, en_pwd, salt) def change_password(uid, en_pwd, salt)
return unless uid return unless uid
options = {:encrypted_password=>en_pwd, :password_salt=>salt} options = {:encrypted_password=>en_pwd, :password_salt=>salt}
self.g.put("/users/ext/#{uid}", :body => options) self.g.put("/users/ext/#{uid}", :body => options)
# g.edit_user(uid, :encrypted_password=>en_pwd, :password_salt=>salt) # g.edit_user(uid, :encrypted_password=>en_pwd, :password_salt=>salt)
end end
def find_user(user) def find_user(user)
us = self.g.get("/users?search=#{user.mail}") us = self.g.get("/users?search=#{user.mail}")
if Array === us if Array === us
us.each do |u| us.each do |u|
return u if u.email == user.mail return u if u.email == user.mail
end end
end end
return nil return nil
end end
def add_user(user) def add_user(user)
u = nil u = nil
begin begin
u = find_user(user) u = find_user(user)
unless u unless u
u = self.g.create_user(user.mail, u = self.g.create_user(user.mail,
user.hashed_password, user.hashed_password,
name: user.show_name, name: user.show_name,
username: user.login, username: user.login,
confirm: "true") confirm: "true")
user.gid = u.id user.gid = u.id
user.save user.save
end end
if user.gid.nil? if user.gid.nil?
user.gid = u.id user.gid = u.id
user.save user.save
end end
change_password(u.id, user.hashed_password, user.salt) change_password(u.id, user.hashed_password, user.salt)
rescue => e rescue => e
puts e puts e
end end
return u return u
end end
def del_user(user) def del_user(user)
return unless user.gid return unless user.gid
self.g.delete_user(user.gid) self.g.delete_user(user.gid)
end end
def get_gitlab_role m def get_gitlab_role m
case m.roles.first.position case m.roles.first.position
when 1,2 when 1,2
GUEST GUEST
when 5 when 5
REPORTER REPORTER
when 4 when 4
DEVELOPER DEVELOPER
when 3 when 3
MASTER MASTER
else else
GUEST GUEST
end end
end end
end end
end end
end end

File diff suppressed because it is too large Load Diff

@ -1,49 +1,51 @@
.ke-content { .ke-content {
font-size: 10pt; font-size: 12px;
} font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family: ΢ÈíÑźÚ, ËÎÌå;
.ke-content pre { font-family:Tahoma;
font-size:9pt; }
font-family:Courier New,Arial; .ke-content pre {
border:1px solid #ddd; font-size:9pt;
border-left:5px solid #6CE26C; font-family:Courier New,Arial;
background:#f6f6f6; border:1px solid #ddd;
padding:5px; border-left:5px solid #6CE26C;
} background:#f6f6f6;
padding:5px;
.ke-content code { }
margin: 0 2px;
padding: 0 5px; .ke-content code {
white-space: nowrap; margin: 0 2px;
border: 1px solid #DDD; padding: 0 5px;
background-color: #F6F6F6; white-space: nowrap;
border-radius: 3px; border: 1px solid #DDD;
} background-color: #F6F6F6;
border-radius: 3px;
.ke-content pre>code { }
margin: 0;
padding: 0; .ke-content pre>code {
white-space: pre; margin: 0;
border: none; padding: 0;
background: transparent; white-space: pre;
} border: none;
background: transparent;
.ke-content pre code { }
background-color: transparent;
border: none; .ke-content pre code {
} background-color: transparent;
border: none;
.ke-content p { }
/*margin: 0 0 15px 0;*/
/*margin-bottom:15pt;*/ .ke-content p {
line-height:1.5; /*margin: 0 0 15px 0;*/
/*letter-spacing: 1px;*/ /*margin-bottom:15pt;*/
} line-height:1.5;
/*letter-spacing: 1px;*/
.ke-content div.ref {border:1px solid #ddd;margin:0 0 10px 0;padding:2px;font-size:9pt;background:#ffe;} }
.ke-content div.ref h4 {margin:0;padding:1px 3px;background:#CC9966;color:#fff;font-size:9pt;font-weight:normal;}
.ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;} .ke-content div.ref {border:1px solid #ddd;margin:0 0 10px 0;padding:2px;font-size:9pt;background:#ffe;}
.ke-content div.ref h4 {margin:0;padding:1px 3px;background:#CC9966;color:#fff;font-size:9pt;font-weight:normal;}
.ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;}
.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;background:#f4f5f7 url('../img/blockquote.gif') no-repeat left top;color:#060;font-size:9pt;}
span.at {color:#269ac9;}
.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;background:#f4f5f7 url('../img/blockquote.gif') no-repeat left top;color:#060;font-size:9pt;}
span.at {color:#269ac9;}
span.at a{color:#269ac9;text-decoration: none;} span.at a{color:#269ac9;text-decoration: none;}

@ -98,6 +98,9 @@ KindEditor.plugin('image', function(K) {
yesBtn : { yesBtn : {
name : self.lang('yes'), name : self.lang('yes'),
click : function(e) { click : function(e) {
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(self.edit.html())){
self.edit.html('');
}
// Bugfix: http://code.google.com/p/kindeditor/issues/detail?id=319 // Bugfix: http://code.google.com/p/kindeditor/issues/detail?id=319
if (dialog.isLoading) { if (dialog.isLoading) {
return; return;

@ -1,38 +1,40 @@
/******************************************************************************* /*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet * KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2011 kindsoft.net * Copyright (C) 2006-2011 kindsoft.net
* *
* @author Roddy <luolonghao@gmail.com> * @author Roddy <luolonghao@gmail.com>
* @site http://www.kindsoft.net/ * @site http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php * @licence http://www.kindsoft.net/license.php
*******************************************************************************/ *******************************************************************************/
KindEditor.plugin('lineheight', function(K) { KindEditor.plugin('lineheight', function(K) {
var self = this, name = 'lineheight', lang = self.lang(name + '.'); var self = this, name = 'lineheight', lang = self.lang(name + '.');
self.clickToolbar(name, function() { self.clickToolbar(name, function() {
var curVal = '', commonNode = self.cmd.commonNode({'*' : '.line-height'}); var curVal = '', commonNode = self.cmd.commonNode({'*' : '.line-height'});
if (commonNode) { if (commonNode) {
curVal = commonNode.css('line-height'); curVal = commonNode.css('line-height');
} }
var menu = self.createMenu({ var menu = self.createMenu({
name : name, name : name,
width : 150 width : 150
}); });
K.each(lang.lineHeight, function(i, row) { K.each(lang.lineHeight, function(i, row) {
K.each(row, function(key, val) { K.each(row, function(key, val) {
menu.addItem({ menu.addItem({
title : val, title : val,
checked : curVal === key, checked : curVal === key,
click : function() { click : function() {
self.cmd.toggle('<span style="line-height:' + key + ';"></span>', { self.cmd.toggle('<span style="line-height:' + key + ';"></span>', {
span : '.line-height=' + key span : '.line-height=' + key
}); });
self.updateState(); self.updateState();
self.addBookmark(); self.addBookmark();
self.hideMenu(); //curVal = key;
} //self.cmd.doc.body.style.lineHeight = key;
}); self.hideMenu();
}); }
}); });
}); });
}); });
});
});

@ -47,6 +47,9 @@ KindEditor.plugin('media', function(K) {
yesBtn : { yesBtn : {
name : self.lang('yes'), name : self.lang('yes'),
click : function(e) { click : function(e) {
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(self.edit.html())){
self.edit.html('');
}
var url = K.trim(urlBox.val()), var url = K.trim(urlBox.val()),
width = widthBox.val(), width = widthBox.val(),
height = heightBox.val(); height = heightBox.val();

@ -25,7 +25,7 @@ KindEditor.plugin('preview', function(K) {
doc.open(); doc.open();
doc.write(self.fullHtml()); doc.write(self.fullHtml());
doc.close(); doc.close();
K(doc.body).css('background-color', '#FFF'); K(doc.body).css({'background-color': '#FFF','word-break':'break-all','word-wrap':'wrap-all'});
iframe[0].contentWindow.focus(); iframe[0].contentWindow.focus();
}); });
}); });

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

@ -1,177 +1,183 @@
//需求:表情栏可以隐藏显示,高度只要一点高 //需求:表情栏可以隐藏显示,高度只要一点高
function sd_create_editor(params){ function sd_create_editor(params){
// var minHeight; //最小高度 // var minHeight; //最小高度
var paramsHeight = params.height; //设定的高度 var paramsHeight = params.height; //设定的高度
var id = arguments[1] ? arguments[1] : undefined; var id = arguments[1] ? arguments[1] : undefined;
var type = arguments[2] ? arguments[2] : ''; var type = arguments[2] ? arguments[2] : '';
var paramsWidth = params.width == undefined ? "100%" : params.width; var paramsWidth = params.width == undefined ? "100%" : params.width;
var editor = params.kindutil.create(params.textarea, { var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"94%", resizeType : 1,minWidth:"1px",width:"94%",
height:"33px",// == undefined ? "30px":paramsHeight+"px", height:"33px",// == undefined ? "30px":paramsHeight+"px",
minHeight:"33px",// == undefined ? "30px":paramsHeight+"px", minHeight:"33px",// == undefined ? "30px":paramsHeight+"px",
width:params.width, width:params.width,
items:['emoticons','fontname', /*
'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|', items:['emoticons','fontname',
'formatblock', 'fontsize', '|','indent', 'outdent', 'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
'|','imagedirectupload','more'], 'formatblock', 'fontsize', '|','indent', 'outdent',
afterChange:function(){//按键事件 '|','imagedirectupload','more'],*/
var edit = this.edit; items : ['code','emoticons','fontname',
var body = edit.doc.body; 'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|',
edit.iframe.height(paramsHeight); 'formatblock', 'fontsize', '|','indent', 'outdent',
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight)) , paramsHeight)); '|','imagedirectupload','table', 'media', 'preview',"more"
}, ],
afterBlur:function(){ afterChange:function(){//按键事件
//params.toolbar_container.hide(); var edit = this.edit;
sd_check_editor_form_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea}); var body = edit.doc.body;
if(this.isEmpty()) { edit.iframe.height(paramsHeight);
this.edit.html("<span id='hint' style='color: #999999; font-size: 12px'>我要回复</span>"); this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : (params.kindutil.GECKO ? body.offsetHeight+26:body.offsetHeight)) , paramsHeight));
} },
//params.toolbar_container.hide(); afterBlur:function(){
$('#reply_image_' + id).addClass('imageFuzzy'); //params.toolbar_container.hide();
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html())){ sd_check_editor_form_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
params.submit_btn.hide(); if(this.isEmpty()) {
params.toolbar_container.hide(); this.edit.html("<span id='hint' style='color: #999999; font-size: 12px'>我要回复</span>");
this.resize("100%", null); }
}else if(this.edit.html().trim() != ""){ //params.toolbar_container.hide();
params.submit_btn.show(); $('#reply_image_' + id).addClass('imageFuzzy');
params.toolbar_container.show(); if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(this.edit.html())){
} params.submit_btn.hide();
params.toolbar_container.hide();
//params.submit_btn.css("display","none"); this.resize("100%", null);
}, }else if(this.edit.html().trim() != ""){
afterFocus: function(){ params.submit_btn.show();
var edit = this.edit; params.toolbar_container.show();
var body = edit.doc.body; }
if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(edit.html())){
edit.html(''); //params.submit_btn.css("display","none");
} },
params.submit_btn.show(); afterFocus: function(){
params.contentmsg.hide(); var edit = this.edit;
params.toolbar_container.show(); var body = edit.doc.body;
// params.toolbar_container.show(); if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(edit.html())){
$('#reply_image_' + id).removeClass('imageFuzzy'); edit.html('');
//edit.iframe.width(paramsWidth); }
this.resize(paramsWidth, null); params.submit_btn.show();
//params.submit_btn.show(); params.contentmsg.hide();
}, params.toolbar_container.show();
// params.toolbar_container.show();
afterCreate:function(){ $('#reply_image_' + id).removeClass('imageFuzzy');
//params.submit_btn.hide(); //edit.iframe.width(paramsWidth);
var toolbar = $("div[class='ke-toolbar']",params.div_form); this.resize(paramsWidth, null);
toolbar.css('display','inline'); //params.submit_btn.show();
toolbar.css('padding',0); },
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar); afterCreate:function(){
params.toolbar_container.hide(); //params.submit_btn.hide();
//init var toolbar = $("div[class='ke-toolbar']",params.div_form);
var edit = this.edit; toolbar.css('display','inline');
var body = edit.doc.body; toolbar.css('padding',0);
edit.iframe[0].scroll = 'no'; $(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
body.style.overflowY = 'hidden'; params.toolbar_container.append(toolbar);
//reset height params.toolbar_container.hide();
paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight; //init
edit.iframe.height(paramsHeight); var edit = this.edit;
edit.html("<span id='hint' style='color: #999999; font-size: 12px'>我要回复</span>"); var body = edit.doc.body;
this.resize(null,paramsHeight);// Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight) edit.iframe[0].scroll = 'no';
// params.toolbar_container.hide(); body.style.overflowY = 'hidden';
if(typeof enableAt === 'function'){ //reset height
enableAt(this, id, type); paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight;
} edit.iframe.height(paramsHeight);
} edit.html("<span id='hint' style='color: #999999; font-size: 12px'>我要回复</span>");
}).loadPlugin('paste'); this.resize(null,paramsHeight);// Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight)
return editor; // params.toolbar_container.hide();
} if(typeof enableAt === 'function'){
enableAt(this, id, type);
function sd_check_editor_form_field(params){ }
var result=true; }
if(params.content!=undefined){ }).loadPlugin('paste');
if(params.content.isEmpty()){ return editor;
result=false; }
}
if(params.content.html()!=params.textarea.html() || params.issubmit==true){ function sd_check_editor_form_field(params){
params.textarea.html(params.content.html()); var result=true;
params.content.sync(); if(params.content!=undefined){
if(params.content.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(params.textarea.html())){ if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空'); result=false;
params.contentmsg.css({color:'#ff0000'}); }
}else{ if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.contentmsg.html('填写正确'); params.textarea.html(params.content.html());
params.contentmsg.css({color:'#008000'}); params.content.sync();
} if(params.content.isEmpty() || /^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\s*\#\d*\;\s*\w*\-\w*\:\s*\w*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(params.textarea.html())){
params.contentmsg.show(); params.contentmsg.html('内容不能为空');
} params.contentmsg.css({color:'#ff0000'});
} }else{
return result; params.contentmsg.html('填写正确');
} params.contentmsg.css({color:'#008000'});
function sd_create_form(params){ }
params.form.submit(function(){ params.contentmsg.show();
var flag = false; }
if(params.form.attr('data-remote') != undefined ){ }
flag = true return result;
} }
var is_checked = sd_check_editor_form_field({ function sd_create_form(params){
issubmit:true, params.form.submit(function(){
content:params.editor, var flag = false;
contentmsg:params.contentmsg, if(params.form.attr('data-remote') != undefined ){
textarea:params.textarea flag = true
}); }
if(is_checked){ var is_checked = sd_check_editor_form_field({
if(flag){ issubmit:true,
return true; content:params.editor,
}else{ contentmsg:params.contentmsg,
$(this)[0].submit(); textarea:params.textarea
return false; });
} if(is_checked){
} if(flag){
return false; return true;
}); }else{
} $(this)[0].submit();
function sd_reset_editor_form(params){ return false;
params.form[0].reset(); }
params.textarea.empty(); }
if(params.editor != undefined){ return false;
params.editor.html(params.textarea.html()); });
} }
params.contentmsg.hide(); function sd_reset_editor_form(params){
} params.form[0].reset();
//第二个参数是高度,可以传,可以不传 params.textarea.empty();
function sd_create_editor_from_data(id){ if(params.editor != undefined){
var height = arguments[1] ? arguments[1] : undefined; params.editor.html(params.textarea.html());
var width = arguments[2] ? arguments[2] : undefined; }
var type = arguments[3] ? arguments[3] : undefined; params.contentmsg.hide();
KindEditor.ready(function (K) { }
$("div[nhname='new_message_" + id + "']").each(function () { //第二个参数是高度,可以传,可以不传
var params = {}; function sd_create_editor_from_data(id){
params.kindutil = K; var height = arguments[1] ? arguments[1] : undefined;
params.div_form = $(this); var width = arguments[2] ? arguments[2] : undefined;
params.form = $("form", params.div_form); var type = arguments[3] ? arguments[3] : undefined;
if (params.form == undefined || params.form.length == 0) { KindEditor.ready(function (K) {
return; $("div[nhname='new_message_" + id + "']").each(function () {
} var params = {};
params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form); params.kindutil = K;
params.contentmsg = $("span[nhname='contentmsg_" + id + "']", params.div_form); params.div_form = $(this);
params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form); params.form = $("form", params.div_form);
params.cancel_btn = $("#new_message_cancel_btn_" + id); if (params.form == undefined || params.form.length == 0) {
params.submit_btn = $("#new_message_submit_btn_" + id); return;
params.height = height; }
params.width = width; params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form);
if (params.textarea.data('init') == undefined) { params.contentmsg = $("span[nhname='contentmsg_" + id + "']", params.div_form);
params.editor = sd_create_editor(params,id, type); params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form);
sd_create_form(params); params.cancel_btn = $("#new_message_cancel_btn_" + id);
params.cancel_btn.click(function () { params.submit_btn = $("#new_message_submit_btn_" + id);
sd_reset_editor_form(params); params.height = height;
}); params.width = width;
params.submit_btn.click(function () { if (params.textarea.data('init') == undefined) {
params.form.submit(); params.editor = sd_create_editor(params,id, type);
}); sd_create_form(params);
params.textarea.data('init', 1); params.cancel_btn.click(function () {
$(this).show(); sd_reset_editor_form(params);
} });
}); params.submit_btn.click(function () {
}); params.form.submit();
});
div_form = $("div[nhname='new_message_" + id + "']"); params.textarea.data('init', 1);
$(".ke-edit", div_form).css("height","33px"); $(this).show();
$(".ke-edit-iframe",div_form).css("height","33px"); }
});
});
div_form = $("div[nhname='new_message_" + id + "']");
$(".ke-edit", div_form).css("height","33px");
$(".ke-edit-iframe",div_form).css("height","33px");
} }

@ -1,354 +1,354 @@
/* /*
# Code Review plugin for Redmine # Code Review plugin for Redmine
# Copyright (C) 2009-2013 Haruyuki Iida # Copyright (C) 2009-2013 Haruyuki Iida
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 # as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. # of the License, or (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
var topZindex = 1000; var topZindex = 1000;
var action_type = ''; var action_type = '';
var rev = ''; var rev = '';
var rev_to = ''; var rev_to = '';
var path = ''; var path = '';
var urlprefix = ''; var urlprefix = '';
var review_form_dialog = null; var review_form_dialog = null;
var add_form_title = null; var add_form_title = null;
var review_dialog_title = null; var review_dialog_title = null;
var repository_id = null; var repository_id = null;
var filenames = []; var filenames = [];
var ReviewCount = function(total, open, progress){ var ReviewCount = function(total, open, progress){
this.total = total; this.total = total;
this.open = open; this.open = open;
this.closed = total - open; this.closed = total - open;
this.progress = progress this.progress = progress
}; };
var CodeReview = function(id) { var CodeReview = function(id) {
this.id = id; this.id = id;
this.path = ''; this.path = '';
this.line = 0; this.line = 0;
this.url = ''; this.url = '';
this.is_closed = false; this.is_closed = false;
}; };
var review_counts = new Array(); var review_counts = new Array();
var code_reviews_map = new Array(); var code_reviews_map = new Array();
var code_reviews_dialog_map = new Array(); var code_reviews_dialog_map = new Array();
function UpdateRepositoryView(title) { function UpdateRepositoryView(title) {
var header = $("table.changesets thead tr:first"); var header = $("table.changesets thead tr:first");
var th = $('<th></th>'); var th = $('<th></th>');
th.html(title); th.html(title);
header.append(th); header.append(th);
$('tr.changeset td.id a').each(function(i){ $('tr.changeset td.id a').each(function(i){
var revision = this.getAttribute("href"); var revision = this.getAttribute("href");
revision = revision.substr(revision.lastIndexOf("/") + 1); revision = revision.substr(revision.lastIndexOf("/") + 1);
var review = review_counts['revision_' + revision]; var review = review_counts['revision_' + revision];
var td = $('<td/>',{ var td = $('<td/>',{
'class':'progress' 'class':'progress'
}); });
td.html(review.progress); td.html(review.progress);
$(this.parentNode.parentNode).append(td); $(this.parentNode.parentNode).append(td);
}); });
} }
//add function $.down //add function $.down
if(! $.fn.down) if(! $.fn.down)
(function($) { (function($) {
$.fn.down = function() { $.fn.down = function() {
var el = this[0] && this[0].firstChild; var el = this[0] && this[0].firstChild;
while (el && el.nodeType != 1) while (el && el.nodeType != 1)
el = el.nextSibling; el = el.nextSibling;
return $(el); return $(el);
}; };
})(jQuery); })(jQuery);
function UpdateRevisionView() { function UpdateRevisionView() {
$('li.change').each(function(){ $('li.change').each(function(){
var li = $(this); var li = $(this);
if (li.hasClass('folder')) return; if (li.hasClass('folder')) return;
var a = li.down('a'); var a = li.down('a');
if (a.size() == 0) return; if (a.size() == 0) return;
var path = a.attr('href').replace(urlprefix, '').replace(/\?.*$/, ''); var path = a.attr('href').replace(urlprefix, '').replace(/\?.*$/, '');
var reviewlist = code_reviews_map[path]; var reviewlist = code_reviews_map[path];
if (reviewlist == null) return; if (reviewlist == null) return;
var ul = $('<ul></ul>'); var ul = $('<ul></ul>');
for (var j = 0; j < reviewlist.length; j++) { for (var j = 0; j < reviewlist.length; j++) {
var review = reviewlist[j]; var review = reviewlist[j];
var icon = review.is_closed? 'icon-closed-review': 'icon-review'; var icon = review.is_closed? 'icon-closed-review': 'icon-review';
var item = $('<li></li>', { var item = $('<li></li>', {
'class': 'icon ' + icon + ' code_review_summary' 'class': 'icon ' + icon + ' code_review_summary'
}); });
item.html(review.url); item.html(review.url);
ul.append(item); ul.append(item);
} }
li.append(ul); li.append(ul);
}); });
} }
function setAddReviewButton(url, change_id, image_tag, is_readonly, is_diff, attachment_id){ function setAddReviewButton(url, change_id, image_tag, is_readonly, is_diff, attachment_id){
var filetables = []; var filetables = [];
var j = 0; var j = 0;
$('table').each(function(){ $('table').each(function(){
if($(this).hasClass('filecontent')){ if($(this).hasClass('filecontent')){
filetables[j++] = this; filetables[j++] = this;
} }
}); });
j = 0; j = 0;
$('table.filecontent th.filename').each(function(){ $('table.filecontent th.filename').each(function(){
filenames[j] = $.trim($(this).text()); filenames[j] = $.trim($(this).text());
j++; j++;
}); });
addReviewUrl = url + '?change_id=' + change_id + '&action_type=' + action_type + addReviewUrl = url + '?change_id=' + change_id + '&action_type=' + action_type +
'&rev=' + rev + '&rev_to=' + rev_to + '&rev=' + rev + '&rev_to=' + rev_to +
'&attachment_id=' + attachment_id + '&repository_id=' + encodeURIComponent(repository_id); '&attachment_id=' + attachment_id + '&repository_id=' + encodeURIComponent(repository_id);
if (path != null && path.length > 0) { if (path != null && path.length > 0) {
addReviewUrl = addReviewUrl + '&path=' + encodeURIComponent(path); addReviewUrl = addReviewUrl + '&path=' + encodeURIComponent(path);
} }
var num = 0; var num = 0;
if (is_diff) { if (is_diff) {
num = 1; num = 1;
} }
var i, l, tl; var i, l, tl;
for (i = 0, tl = filetables.length; i < tl; i++) { for (i = 0, tl = filetables.length; i < tl; i++) {
var table = filetables[i]; var table = filetables[i];
var trs = table.getElementsByTagName('tr'); var trs = table.getElementsByTagName('tr');
for (j = 0,l = trs.length; j < l; j++) { for (j = 0,l = trs.length; j < l; j++) {
var tr = trs[j]; var tr = trs[j];
var ths = tr.getElementsByTagName('th'); var ths = tr.getElementsByTagName('th');
var th = ths[num]; var th = ths[num];
if (th == null) { if (th == null) {
continue; continue;
} }
var th_html = th.innerHTML; var th_html = th.innerHTML;
var line = th_html.match(/[0-9]+/); var line = th_html.match(/[0-9]+/);
if (line == null) { if (line == null) {
continue; continue;
} }
var span_html = '<span white-space="nowrap" id="review_span_' + line + '_' + i + '">'; var span_html = '<span white-space="nowrap" id="review_span_' + line + '_' + i + '">';
if (!is_readonly) { if (!is_readonly) {
span_html += image_tag; span_html += image_tag;
} }
span_html += '</span>'; span_html += '</span>';
th.innerHTML = th_html + span_html; th.innerHTML = th_html + span_html;
var img = th.getElementsByTagName('img')[0]; var img = th.getElementsByTagName('img')[0];
if (img != null ) { if (img != null ) {
img.id = 'add_revew_img_' + line + '_' + i; img.id = 'add_revew_img_' + line + '_' + i;
$(img).click(clickPencil); $(img).click(clickPencil);
} }
} }
} }
} }
function clickPencil(e) function clickPencil(e)
{ {
// alert('$(e.target).attr("id") = ' + $(e.target).attr("id")); // alert('$(e.target).attr("id") = ' + $(e.target).attr("id"));
var result = $(e.target).attr("id").match(/([0-9]+)_([0-9]+)/); var result = $(e.target).attr("id").match(/([0-9]+)_([0-9]+)/);
var line = result[1]; var line = result[1];
var file_count = eval(result[2]); var file_count = eval(result[2]);
var url = addReviewUrl + '&line=' + line + '&file_count=' + file_count; var url = addReviewUrl + '&line=' + line + '&file_count=' + file_count;
if (path == null || path.length == 0) { if (path == null || path.length == 0) {
url = url + '&path=' + encodeURIComponent(filenames[file_count]) + '&diff_all=true'; url = url + '&path=' + encodeURIComponent(filenames[file_count]) + '&diff_all=true';
} }
addReview(url); addReview(url);
formPopup(e.pageX, e.pageY); formPopup(e.pageX, e.pageY);
e.preventDefault(); e.preventDefault();
} }
var addReviewUrl = null; var addReviewUrl = null;
var showReviewUrl = null; var showReviewUrl = null;
var showReviewImageTag = null; var showReviewImageTag = null;
var showClosedReviewImageTag = null; var showClosedReviewImageTag = null;
function setShowReviewButton(line, review_id, is_closed, file_count) { function setShowReviewButton(line, review_id, is_closed, file_count) {
//alert('file_count = ' + file_count); //alert('file_count = ' + file_count);
var span = $('#review_span_' + line + '_' + file_count); var span = $('#review_span_' + line + '_' + file_count);
if (span.size() == 0) { if (span.size() == 0) {
return; return;
} }
var innerSpan = $('<span></span>',{id: 'review_' + review_id}); var innerSpan = $('<span></span>',{id: 'review_' + review_id});
span.append(innerSpan); span.append(innerSpan);
innerSpan.html(is_closed? showClosedReviewImageTag : showReviewImageTag); innerSpan.html(is_closed? showClosedReviewImageTag : showReviewImageTag);
var div = $('<div></div>', { var div = $('<div></div>', {
'class':'draggable', 'class':'draggable',
id: 'show_review_' + review_id id: 'show_review_' + review_id
}); });
$('#code_review').append(div); $('#code_review').append(div);
innerSpan.down('img').click(function(e) { innerSpan.down('img').click(function(e) {
var review_id = $(e.target).parent().attr('id').match(/[0-9]+/)[0]; var review_id = $(e.target).parent().attr('id').match(/[0-9]+/)[0];
var span = $('#review_' + review_id); // span element of view review button var span = $('#review_' + review_id); // span element of view review button
var pos = span.offset(); var pos = span.offset();
showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top + 25); showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top + 25);
}); });
} }
function popupReview(review_id) { function popupReview(review_id) {
var span = $('#review_' + review_id); // span element of view review button var span = $('#review_' + review_id); // span element of view review button
var pos = span.offset(); var pos = span.offset();
$('html,body').animate({ scrollTop: pos.top }, $('html,body').animate({ scrollTop: pos.top },
{duration: 'fast', {duration: 'fast',
complete: function(){showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top)}}); complete: function(){showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top)}});
// position and show popup dialog // position and show popup dialog
// create popup dialog // create popup dialog
//var win = showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top); //var win = showReview(showReviewUrl, review_id, pos.left + 10 + 5, pos.top);
// win.toFront(); // win.toFront();
} }
function showReview(url, review_id, x, y) { function showReview(url, review_id, x, y) {
if (code_reviews_dialog_map[review_id] != null) { if (code_reviews_dialog_map[review_id] != null) {
var cur_win = code_reviews_dialog_map[review_id]; var cur_win = code_reviews_dialog_map[review_id];
cur_win.hide(); cur_win.hide();
code_reviews_dialog_map[review_id] = null; code_reviews_dialog_map[review_id] = null;
} }
$('#show_review_' + review_id).load(url, {review_id: review_id}); $('#show_review_' + review_id).load(url, {review_id: review_id});
var review = getReviewObjById(review_id); var review = getReviewObjById(review_id);
var win = $('#show_review_' + review_id).dialog({ var win = $('#show_review_' + review_id).dialog({
show: {effect:'scale'},// ? 'top-left' show: {effect:'scale'},// ? 'top-left'
//position: [x, y + 5], //position: [x, y + 5],
width:640, width:640,
zIndex: topZindex, zIndex: topZindex,
title: review_dialog_title title: review_dialog_title
}); });
// win.getContent().style.color = "#484848"; // win.getContent().style.color = "#484848";
// win.getContent().style.background = "#ffffff"; // win.getContent().style.background = "#ffffff";
topZindex++; topZindex++;
code_reviews_dialog_map[review_id] = win; code_reviews_dialog_map[review_id] = win;
return win return win
} }
function getReviewObjById(review_id) { function getReviewObjById(review_id) {
for (var reviewlist in code_reviews_map) { for (var reviewlist in code_reviews_map) {
for (var i = 0; i < reviewlist.length; i++) { for (var i = 0; i < reviewlist.length; i++) {
var review = reviewlist[i]; var review = reviewlist[i];
if (review.id == review_id) { if (review.id == review_id) {
return review; return review;
} }
} }
} }
return null; return null;
} }
function formPopup(x, y){ function formPopup(x, y){
//@see http://docs.jquery.com/UI/Effects/Scale //@see http://docs.jquery.com/UI/Effects/Scale
var win = $('#review-form-frame').dialog({ var win = $('#review-form-frame').dialog({
show: {effect:'scale', direction: 'both'},// ? 'top-left' show: {effect:'scale', direction: 'both'},// ? 'top-left'
// position: [x, y + 5], // position: [x, y + 5],
width:640, width:640,
zIndex: topZindex, zIndex: topZindex,
title: add_form_title title: add_form_title
}); });
// win.getContent().style.background = "#ffffff"; // win.getContent().style.background = "#ffffff";
if (review_form_dialog != null) { if (review_form_dialog != null) {
review_form_dialog.destroy(); review_form_dialog.destroy();
review_form_dialog = null; review_form_dialog = null;
} }
review_form_dialog = win; review_form_dialog = win;
topZindex += 10; topZindex += 10;
return false; return false;
} }
function hideForm() { function hideForm() {
if (review_form_dialog == null) { if (review_form_dialog == null) {
return; return;
} }
review_form_dialog.dialog('close'); review_form_dialog.dialog('close');
review_form_dialog = null; review_form_dialog = null;
$('#review-form').html(''); $('#review-form').html('');
} }
function addReview(url) { function addReview(url) {
$('#review-form').load(url); $('#review-form').load(url);
} }
function deleteReview(review_id) { function deleteReview(review_id) {
$('show_review_' + review_id).remove(); $('show_review_' + review_id).remove();
$('review_' + review_id).remove(); $('review_' + review_id).remove();
} }
function changeImage(review_id, is_closed) { function changeImage(review_id, is_closed) {
var span = $('review_' + review_id); var span = $('review_' + review_id);
var new_image = null; var new_image = null;
var dummy = new Element('span'); var dummy = new Element('span');
if (is_closed) { if (is_closed) {
dummy.insert(showClosedReviewImageTag); dummy.insert(showClosedReviewImageTag);
} }
else { else {
dummy.insert(showReviewImageTag); dummy.insert(showReviewImageTag);
} }
new_image = dummy.down().getAttribute('src'); new_image = dummy.down().getAttribute('src');
//alert(new_image); //alert(new_image);
span.down('img').setAttribute('src', new_image); span.down('img').setAttribute('src', new_image);
} }
function make_addreview_link(project, link) { function make_addreview_link(project, link) {
var alist = $('#content p a'); var alist = $('#content p a');
if (alist == null) { if (alist == null) {
return; return;
} }
var a = alist[0]; var a = alist[0];
var p = a.parentNode; var p = a.parentNode;
p.innerHTML = p.innerHTML + " | " + link; p.innerHTML = p.innerHTML + " | " + link;
} }
function call_update_revisions(url) { function call_update_revisions(url) {
var changeset_ids = ''; var changeset_ids = '';
var links = $$('table.changesets tbody tr.changeset td.id a'); var links = $$('table.changesets tbody tr.changeset td.id a');
for (var i = 0; i < links.length; i++) { for (var i = 0; i < links.length; i++) {
var link = links[i]; var link = links[i];
var href = link.getAttribute('href'); var href = link.getAttribute('href');
var id = href.replace(/^.*\/revisions\//, ''); var id = href.replace(/^.*\/revisions\//, '');
if (i > 0) { if (i > 0) {
changeset_ids += ','; changeset_ids += ',';
} }
changeset_ids += id; changeset_ids += id;
} }
new Ajax.Updater('code_review_revisions', url, new Ajax.Updater('code_review_revisions', url,
{ {
evalScripts:true, evalScripts:true,
method:'get', method:'get',
parameters: 'changeset_ids=' + encodeURI(changeset_ids) parameters: 'changeset_ids=' + encodeURI(changeset_ids)
}); });
} }
$.fn.serialize2json = function() $.fn.serialize2json = function()
{ {
var o = {}; var o = {};
var a = this.serializeArray(); var a = this.serializeArray();
$.each(a, function() { $.each(a, function() {
if (o[this.name]) { if (o[this.name]) {
if (!o[this.name].push) { if (!o[this.name].push) {
o[this.name] = [o[this.name]]; o[this.name] = [o[this.name]];
} }
o[this.name].push(this.value || ''); o[this.name].push(this.value || '');
} else { } else {
o[this.name] = this.value || ''; o[this.name] = this.value || '';
} }
}); });
return o; return o;
}; };

@ -1,4 +1,4 @@
dt.code_review { dt.code_review {
background-image: url(../images/review.png); background-image: url(../images/review.png);
} }

@ -1,97 +1,97 @@
/* /*
# Code Review plugin for Redmine # Code Review plugin for Redmine
# Copyright (C) 2009 Haruyuki Iida # Copyright (C) 2009 Haruyuki Iida
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 # as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. # of the License, or (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#review-form-frame { #review-form-frame {
height: 100%; height: 100%;
} }
.autoscroll table.filecontent th.line-num { .autoscroll table.filecontent th.line-num {
white-space: nowrap; white-space: nowrap;
vertical-align: bottom; vertical-align: bottom;
padding-top: 0; padding-top: 0;
padding-bottom: 0; padding-bottom: 0;
text-align:left; text-align:left;
} }
table.filecontent th.line-num img{ table.filecontent th.line-num img{
padding: 0; padding: 0;
margin: 0; margin: 0;
cursor: pointer; cursor: pointer;
} }
.code-review-form-title { .code-review-form-title {
background-color: #002059; background-color: #002059;
color: white; color: white;
padding-left: 2px; padding-left: 2px;
padding-right: 2px; padding-right: 2px;
cursor: default; cursor: default;
} }
.code_review_viewer { .code_review_viewer {
min-width: 300px; min-width: 300px;
/* /*
max-width: 60%; max-width: 60%;
*/ */
/* max-height: 400px; */ /* max-height: 400px; */
} }
.code_review_viewer .issue{ .code_review_viewer .issue{
} }
.code_review_body { .code_review_body {
background-color: white; background-color: white;
padding:2px; padding:2px;
} }
#code_review_list table.list td { #code_review_list table.list td {
text-align: center; text-align: center;
} }
#code_review_list table.list td.path { #code_review_list table.list td.path {
text-align: left; text-align: left;
} }
#code_review_list table.list td.subject { #code_review_list table.list td.subject {
text-align: left; text-align: left;
} }
.icon-review { .icon-review {
background-image: url(../images/review.png); background-image: url(../images/review.png);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.icon-closed-review { .icon-closed-review {
background-image: url(../images/closed_review.png); background-image: url(../images/closed_review.png);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.icon-settings { .icon-settings {
background-image: url(../../../images/changeset.png); background-image: url(../../../images/changeset.png);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
li.code_review_summary { li.code_review_summary {
list-style-type: none; list-style-type: none;
} }

@ -1,19 +1,19 @@
Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com) Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com)
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to permit persons to whom the Software is furnished to do so, subject to
the following conditions: the following conditions:
The above copyright notice and this permission notice shall be The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software. included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@ -1,119 +1,119 @@
.overlay_alert { .overlay_alert {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.alert_nw { .alert_nw {
width: 5px; width: 5px;
height: 5px; height: 5px;
background: transparent url(alert/top_left.gif) no-repeat bottom left; background: transparent url(alert/top_left.gif) no-repeat bottom left;
} }
.alert_n { .alert_n {
height: 5px; height: 5px;
background: transparent url(alert/top.gif) repeat-x bottom left; background: transparent url(alert/top.gif) repeat-x bottom left;
} }
.alert_ne { .alert_ne {
width: 5px; width: 5px;
height: 5px; height: 5px;
background: transparent url(alert/top_right.gif) no-repeat bottom left background: transparent url(alert/top_right.gif) no-repeat bottom left
} }
.alert_e { .alert_e {
width: 5px; width: 5px;
background: transparent url(alert/right.gif) repeat-y 0 0; background: transparent url(alert/right.gif) repeat-y 0 0;
} }
.alert_w { .alert_w {
width: 5px; width: 5px;
background: transparent url(alert/left.gif) repeat-y 0 0; background: transparent url(alert/left.gif) repeat-y 0 0;
} }
.alert_sw { .alert_sw {
width: 5px; width: 5px;
height: 5px; height: 5px;
background: transparent url(alert/bottom_left.gif) no-repeat 0 0; background: transparent url(alert/bottom_left.gif) no-repeat 0 0;
} }
.alert_s { .alert_s {
height: 5px; height: 5px;
background: transparent url(alert/bottom.gif) repeat-x 0 0; background: transparent url(alert/bottom.gif) repeat-x 0 0;
} }
.alert_se, .alert_sizer { .alert_se, .alert_sizer {
width: 5px; width: 5px;
height: 5px; height: 5px;
background: transparent url(alert/bottom_right.gif) no-repeat 0 0; background: transparent url(alert/bottom_right.gif) no-repeat 0 0;
} }
.alert_close { .alert_close {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_minimize { .alert_minimize {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_maximize { .alert_maximize {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_title { .alert_title {
float:left; float:left;
height:1px; height:1px;
width:100%; width:100%;
} }
.alert_content { .alert_content {
overflow:visible; overflow:visible;
color: #000; color: #000;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font: 12px arial; font: 12px arial;
background: #FFF; background: #FFF;
} }
/* For alert/confirm dialog */ /* For alert/confirm dialog */
.alert_window { .alert_window {
background: #FFF; background: #FFF;
padding:20px; padding:20px;
margin-left:auto; margin-left:auto;
margin-right:auto; margin-right:auto;
width:400px; width:400px;
} }
.alert_message { .alert_message {
font: 12px arial; font: 12px arial;
width:100%; width:100%;
color:#F00; color:#F00;
padding-bottom:10px; padding-bottom:10px;
} }
.alert_buttons { .alert_buttons {
text-align:center; text-align:center;
width:100%; width:100%;
} }
.alert_buttons input { .alert_buttons input {
width:20%; width:20%;
margin:10px; margin:10px;
} }
.alert_progress { .alert_progress {
float:left; float:left;
margin:auto; margin:auto;
text-align:center; text-align:center;
width:100%; width:100%;
height:16px; height:16px;
background: #FFF url('alert/progress.gif') no-repeat center center background: #FFF url('alert/progress.gif') no-repeat center center
} }

@ -1,88 +1,88 @@
.overlay_alert_lite { .overlay_alert_lite {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.alert_lite_sizer { .alert_lite_sizer {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_lite_close { .alert_lite_close {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_lite_minimize { .alert_lite_minimize {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_lite_maximize { .alert_lite_maximize {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_lite_title { .alert_lite_title {
width:0px; width:0px;
height:0px; height:0px;
display:none; display:none;
} }
.alert_lite_content { .alert_lite_content {
overflow:auto; overflow:auto;
color: #000; color: #000;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 10px; font-size: 10px;
background: #FFF; background: #FFF;
} }
/* For alert/confirm dialog */ /* For alert/confirm dialog */
.alert_lite_window { .alert_lite_window {
border:1px solid #F00; border:1px solid #F00;
background: #FFF; background: #FFF;
padding:20px; padding:20px;
margin-left:auto; margin-left:auto;
margin-right:auto; margin-right:auto;
width:400px; width:400px;
} }
.alert_lite_message { .alert_lite_message {
font-size:16px; font-size:16px;
text-align:center; text-align:center;
width:100%; width:100%;
color:#F00; color:#F00;
padding-bottom:10px; padding-bottom:10px;
} }
.alert_lite_buttons { .alert_lite_buttons {
text-align:center; text-align:center;
width:100%; width:100%;
} }
.alert_lite_buttons input { .alert_lite_buttons input {
width:20%; width:20%;
margin:10px; margin:10px;
} }
.alert_lite_progress { .alert_lite_progress {
float:left; float:left;
margin:auto; margin:auto;
text-align:center; text-align:center;
width:100%; width:100%;
height:16px; height:16px;
background: #FFF url('alert/progress.gif') no-repeat center center background: #FFF url('alert/progress.gif') no-repeat center center
} }
table.alert_lite_header { table.alert_lite_header {
border:1px solid #F00; border:1px solid #F00;
background:#FFF background:#FFF
} }

@ -1,150 +1,150 @@
.overlay_alphacube { .overlay_alphacube {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.alphacube_nw { .alphacube_nw {
background: transparent url(alphacube/left-top.gif) no-repeat 0 0; background: transparent url(alphacube/left-top.gif) no-repeat 0 0;
width:10px; width:10px;
height:25px; height:25px;
} }
.alphacube_n { .alphacube_n {
background: transparent url(alphacube/top-middle.gif) repeat-x 0 0; background: transparent url(alphacube/top-middle.gif) repeat-x 0 0;
height:25px; height:25px;
} }
.alphacube_ne { .alphacube_ne {
background: transparent url(alphacube/right-top.gif) no-repeat 0 0; background: transparent url(alphacube/right-top.gif) no-repeat 0 0;
width:10px; width:10px;
height:25px; height:25px;
} }
.alphacube_w { .alphacube_w {
background: transparent url(alphacube/frame-left.gif) repeat-y top left; background: transparent url(alphacube/frame-left.gif) repeat-y top left;
width:7px; width:7px;
} }
.alphacube_e { .alphacube_e {
background: transparent url(alphacube/frame-right.gif) repeat-y top right; background: transparent url(alphacube/frame-right.gif) repeat-y top right;
width:7px; width:7px;
} }
.alphacube_sw { .alphacube_sw {
background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0; background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0;
width:7px; width:7px;
height:7px; height:7px;
} }
.alphacube_s { .alphacube_s {
background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0; background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0;
height:7px; height:7px;
} }
.alphacube_se, .alphacube_sizer { .alphacube_se, .alphacube_sizer {
background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0; background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0;
width:7px; width:7px;
height:7px; height:7px;
} }
.alphacube_sizer { .alphacube_sizer {
cursor:se-resize; cursor:se-resize;
} }
.alphacube_close { .alphacube_close {
width: 23px; width: 23px;
height: 23px; height: 23px;
background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0; background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:11px; right:11px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.alphacube_minimize { .alphacube_minimize {
width: 23px; width: 23px;
height: 23px; height: 23px;
background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0; background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:55px; right:55px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.alphacube_maximize { .alphacube_maximize {
width: 23px; width: 23px;
height: 23px; height: 23px;
background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0; background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:33px; right:33px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.alphacube_title { .alphacube_title {
float:left; float:left;
height:14px; height:14px;
font-size:14px; font-size:14px;
text-align:center; text-align:center;
margin-top:2px; margin-top:2px;
width:100%; width:100%;
color:#123456; color:#123456;
} }
.alphacube_content { .alphacube_content {
overflow:auto; overflow:auto;
color: #000; color: #000;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font: 12px arial; font: 12px arial;
background:#FDFDFD; background:#FDFDFD;
} }
/* For alert/confirm dialog */ /* For alert/confirm dialog */
.alphacube_window { .alphacube_window {
border:1px solid #F00; border:1px solid #F00;
background: #FFF; background: #FFF;
padding:20px; padding:20px;
margin-left:auto; margin-left:auto;
margin-right:auto; margin-right:auto;
width:400px; width:400px;
} }
.alphacube_message { .alphacube_message {
font: 12px arial; font: 12px arial;
text-align:center; text-align:center;
width:100%; width:100%;
padding-bottom:10px; padding-bottom:10px;
} }
.alphacube_buttons { .alphacube_buttons {
text-align:center; text-align:center;
width:100%; width:100%;
} }
.alphacube_buttons input { .alphacube_buttons input {
width:20%; width:20%;
margin:10px; margin:10px;
} }
.alphacube_progress { .alphacube_progress {
float:left; float:left;
margin:auto; margin:auto;
text-align:center; text-align:center;
width:100%; width:100%;
height:16px; height:16px;
background: #FFF url('alert/progress.gif') no-repeat center center background: #FFF url('alert/progress.gif') no-repeat center center
} }
.alphacube_wired_frame { .alphacube_wired_frame {
background: #FFF; background: #FFF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }

@ -1,51 +1,51 @@
<public:component> <public:component>
<public:attach event="onpropertychange" onevent="propertyChanged()" /> <public:attach event="onpropertychange" onevent="propertyChanged()" />
<script> <script>
var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32"; var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32";
var realSrc; var realSrc;
var blankSrc = "blank.gif"; var blankSrc = "blank.gif";
if (supported) fixImage(); if (supported) fixImage();
function propertyChanged() { function propertyChanged() {
if (!supported) return; if (!supported) return;
var pName = event.propertyName; var pName = event.propertyName;
if (pName != "src") return; if (pName != "src") return;
// if not set to blank // if not set to blank
if ( ! new RegExp(blankSrc).test(src)) if ( ! new RegExp(blankSrc).test(src))
fixImage(); fixImage();
}; };
function fixImage() { function fixImage() {
// get src // get src
var src = element.src; var src = element.src;
// check for real change // check for real change
if (src == realSrc) { if (src == realSrc) {
element.src = blankSrc; element.src = blankSrc;
return; return;
} }
if ( ! new RegExp(blankSrc).test(src)) { if ( ! new RegExp(blankSrc).test(src)) {
// backup old src // backup old src
realSrc = src; realSrc = src;
} }
// test for png // test for png
if ( /\.png$/.test( realSrc.toLowerCase() ) ) { if ( /\.png$/.test( realSrc.toLowerCase() ) ) {
// set blank image // set blank image
element.src = blankSrc; element.src = blankSrc;
// set filter // set filter
element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
src + "',sizingMethod='scale')"; src + "',sizingMethod='scale')";
} }
else { else {
// remove filter // remove filter
element.runtimeStyle.filter = ""; element.runtimeStyle.filter = "";
} }
} }
</script> </script>
</public:component> </public:component>

@ -1,121 +1,121 @@
.overlay_darkX { .overlay_darkX {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.darkX_nw { .darkX_nw {
background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0; background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0;
width:6px; width:6px;
height:21px; height:21px;
} }
.darkX_n { .darkX_n {
background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0; background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0;
height:21px; height:21px;
} }
.darkX_ne { .darkX_ne {
background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0; background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0;
width:6px; width:6px;
height:21px; height:21px;
} }
.darkX_w { .darkX_w {
background: transparent url(darkX/frame-left-focused.png) repeat-y top left; background: transparent url(darkX/frame-left-focused.png) repeat-y top left;
width:3px; width:3px;
} }
.darkX_e { .darkX_e {
background: transparent url(darkX/frame-right-focused.png) repeat-y top right; background: transparent url(darkX/frame-right-focused.png) repeat-y top right;
width:3px; width:3px;
} }
.darkX_sw { .darkX_sw {
background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0; background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0;
width:5px; width:5px;
height:3px; height:3px;
} }
.darkX_s { .darkX_s {
background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0; background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0;
height:3px; height:3px;
} }
.darkX_se, .darkX_sizer { .darkX_se, .darkX_sizer {
background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0; background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0;
width:5px; width:5px;
height:3px; height:3px;
} }
.darkX_sizer { .darkX_sizer {
cursor:se-resize; cursor:se-resize;
} }
.darkX_close { .darkX_close {
width: 21px; width: 21px;
height: 21px; height: 21px;
background: transparent url(darkX/button-close-focused.png) no-repeat 0 0; background: transparent url(darkX/button-close-focused.png) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:5px; right:5px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.darkX_minimize { .darkX_minimize {
width: 21px; width: 21px;
height: 21px; height: 21px;
background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0; background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:26px; right:26px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.darkX_maximize { .darkX_maximize {
width: 21px; width: 21px;
height: 21px; height: 21px;
background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0; background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:47px; right:47px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.darkX_title { .darkX_title {
float:left; float:left;
height:14px; height:14px;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
margin-top:2px; margin-top:2px;
width:100%; width:100%;
color:#FFF; color:#FFF;
} }
.darkX_content { .darkX_content {
overflow:auto; overflow:auto;
color: #E6DF2A; color: #E6DF2A;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 14px; font-size: 14px;
background:#5E5148; background:#5E5148;
} }
/* FOR IE */ /* FOR IE */
* html .darkX_minimize { * html .darkX_minimize {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop");
} }
* html .darkX_maximize { * html .darkX_maximize {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale");
} }
* html .darkX_close { * html .darkX_close {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop");
} }

@ -1,25 +1,25 @@
div.inspector div.inspectable { div.inspector div.inspectable {
padding: 0.25em 0 0.25em 1em; padding: 0.25em 0 0.25em 1em;
background-color: Gray; background-color: Gray;
color: white; color: white;
border: outset 2px white; border: outset 2px white;
cursor: pointer; cursor: pointer;
} }
div.inspector div.child { div.inspector div.child {
margin: 0 0 0 1em; margin: 0 0 0 1em;
} }
#debug_window_content { /* DIV container for debug sizing*/ #debug_window_content { /* DIV container for debug sizing*/
width:250px; width:250px;
height:100px; height:100px;
background-color:#000; background-color:#000;
} }
#debug { /* DIV container for debug contents*/ #debug { /* DIV container for debug contents*/
padding:3px; padding:3px;
color:#0f0; color:#0f0;
font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif; font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size:10px; font-size:10px;
} }

@ -1,155 +1,155 @@
.overlay_dialog { .overlay_dialog {
background-color: #666666; background-color: #666666;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.overlay___invisible__ { .overlay___invisible__ {
background-color: #666666; background-color: #666666;
filter:alpha(opacity=0); filter:alpha(opacity=0);
-moz-opacity: 0; -moz-opacity: 0;
opacity: 0; opacity: 0;
} }
.dialog_nw { .dialog_nw {
width: 9px; width: 9px;
height: 23px; height: 23px;
background: transparent url(default/top_left.gif) no-repeat 0 0; background: transparent url(default/top_left.gif) no-repeat 0 0;
} }
.dialog_n { .dialog_n {
background: transparent url(default/top_mid.gif) repeat-x 0 0; background: transparent url(default/top_mid.gif) repeat-x 0 0;
height: 23px; height: 23px;
} }
.dialog_ne { .dialog_ne {
width: 9px; width: 9px;
height: 23px; height: 23px;
background: transparent url(default/top_right.gif) no-repeat 0 0; background: transparent url(default/top_right.gif) no-repeat 0 0;
} }
.dialog_e { .dialog_e {
width: 2px; width: 2px;
background: transparent url(default/center_right.gif) repeat-y 0 0; background: transparent url(default/center_right.gif) repeat-y 0 0;
} }
.dialog_w { .dialog_w {
width: 2px; width: 2px;
background: transparent url(default/center_left.gif) repeat-y 0 0; background: transparent url(default/center_left.gif) repeat-y 0 0;
} }
.dialog_sw { .dialog_sw {
width: 9px; width: 9px;
height: 19px; height: 19px;
background: transparent url(default/bottom_left.gif) no-repeat 0 0; background: transparent url(default/bottom_left.gif) no-repeat 0 0;
} }
.dialog_s { .dialog_s {
background: transparent url(default/bottom_mid.gif) repeat-x 0 0; background: transparent url(default/bottom_mid.gif) repeat-x 0 0;
height: 19px; height: 19px;
} }
.dialog_se { .dialog_se {
width: 9px; width: 9px;
height: 19px; height: 19px;
background: transparent url(default/bottom_right.gif) no-repeat 0 0; background: transparent url(default/bottom_right.gif) no-repeat 0 0;
} }
.dialog_sizer { .dialog_sizer {
width: 9px; width: 9px;
height: 19px; height: 19px;
background: transparent url(default/sizer.gif) no-repeat 0 0; background: transparent url(default/sizer.gif) no-repeat 0 0;
cursor:se-resize; cursor:se-resize;
} }
.dialog_close { .dialog_close {
width: 14px; width: 14px;
height: 14px; height: 14px;
background: transparent url(default/close.gif) no-repeat 0 0; background: transparent url(default/close.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:5px; top:5px;
left:8px; left:8px;
cursor:pointer; cursor:pointer;
z-index:2000; z-index:2000;
} }
.dialog_minimize { .dialog_minimize {
width: 14px; width: 14px;
height: 15px; height: 15px;
background: transparent url(default/minimize.gif) no-repeat 0 0; background: transparent url(default/minimize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:5px; top:5px;
left:28px; left:28px;
cursor:pointer; cursor:pointer;
z-index:2000; z-index:2000;
} }
.dialog_maximize { .dialog_maximize {
width: 14px; width: 14px;
height: 15px; height: 15px;
background: transparent url(default/maximize.gif) no-repeat 0 0; background: transparent url(default/maximize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:5px; top:5px;
left:49px; left:49px;
cursor:pointer; cursor:pointer;
z-index:2000; z-index:2000;
} }
.dialog_title { .dialog_title {
float:left; float:left;
height:14px; height:14px;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
width:100%; width:100%;
color:#000; color:#000;
} }
.dialog_content { .dialog_content {
overflow:auto; overflow:auto;
color: #DDD; color: #DDD;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 10px; font-size: 10px;
background-color:#123; background-color:#123;
} }
.top_draggable, .bottom_draggable { .top_draggable, .bottom_draggable {
cursor:move; cursor:move;
} }
.status_bar { .status_bar {
font-size:12px; font-size:12px;
} }
.status_bar input{ .status_bar input{
font-size:12px; font-size:12px;
} }
.wired_frame { .wired_frame {
display: block; display: block;
position: absolute; position: absolute;
border: 1px #000 dashed; border: 1px #000 dashed;
} }
/* DO NOT CHANGE THESE VALUES*/ /* DO NOT CHANGE THESE VALUES*/
.dialog { .dialog {
display: block; display: block;
position: absolute; position: absolute;
} }
.dialog table.table_window { .dialog table.table_window {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
width: 100%; width: 100%;
margin: 0px; margin: 0px;
padding:0px; padding:0px;
} }
.dialog table.table_window td , .dialog table.table_window th { .dialog table.table_window td , .dialog table.table_window th {
padding: 0; padding: 0;
} }
.dialog .title_window { .dialog .title_window {
-moz-user-select:none; -moz-user-select:none;
} }

@ -1,3 +1,3 @@
/* PNG fix for all themes that uses PNG images on IE */ /* PNG fix for all themes that uses PNG images on IE */
td, div { behavior: url(../themes/iefix/iepngfix.htc) } td, div { behavior: url(../themes/iefix/iepngfix.htc) }

@ -1,54 +1,54 @@
<public:component> <public:component>
<public:attach event="onpropertychange" onevent="doFix()" /> <public:attach event="onpropertychange" onevent="doFix()" />
<script type="text/javascript"> <script type="text/javascript">
// IE5.5+ PNG Alpha Fix v1.0RC4 // IE5.5+ PNG Alpha Fix v1.0RC4
// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com // (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
// This is licensed under the CC-GNU LGPL, version 2.1 or later. // This is licensed under the CC-GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/ // For details, see: http://creativecommons.org/licenses/LGPL/2.1/
// Modified/Simplified on 04/23/2007 by Sebastien Gruhier (http://www.xilinus.com) // Modified/Simplified on 04/23/2007 by Sebastien Gruhier (http://www.xilinus.com)
// To work only on background and to handle repeat bg // To work only on background and to handle repeat bg
// This must be a path to a blank image. That's all the configuration you need. // This must be a path to a blank image. That's all the configuration you need.
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif'; if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';
var f = 'DXImageTransform.Microsoft.AlphaImageLoader'; var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
function filt(s, m) function filt(s, m)
{ {
if (filters[f]) if (filters[f])
{ {
filters[f].enabled = s ? true : false; filters[f].enabled = s ? true : false;
if (s) with (filters[f]) { src = s; sizingMethod = m } if (s) with (filters[f]) { src = s; sizingMethod = m }
} }
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")'; else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
} }
function doFix() function doFix()
{ {
// Assume IE7 is OK. // Assume IE7 is OK.
if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) || if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
(event && !/(background|src)/.test(event.propertyName))) return; (event && !/(background|src)/.test(event.propertyName))) return;
var bgImg = currentStyle.backgroundImage || style.backgroundImage; var bgImg = currentStyle.backgroundImage || style.backgroundImage;
var bgRepeat = currentStyle.backgroundRepeat || style.backgroundRepeat; var bgRepeat = currentStyle.backgroundRepeat || style.backgroundRepeat;
if (bgImg && bgImg != 'none') if (bgImg && bgImg != 'none')
{ {
if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i)) if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
{ {
var s = RegExp.$1; var s = RegExp.$1;
if (currentStyle.width == 'auto' && currentStyle.height == 'auto') if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px'; style.width = offsetWidth + 'px';
style.backgroundImage = 'none'; style.backgroundImage = 'none';
filt(s, bgRepeat == "no-repeat" ? 'crop' : 'scale'); filt(s, bgRepeat == "no-repeat" ? 'crop' : 'scale');
} }
} }
} }
doFix(); doFix();
</script> </script>
</public:component> </public:component>

@ -1,67 +1,67 @@
<public:component> <public:component>
<public:attach event="onpropertychange" onevent="doFix()" /> <public:attach event="onpropertychange" onevent="doFix()" />
<script type="text/javascript"> <script type="text/javascript">
// IE5.5+ PNG Alpha Fix v1.0RC4 // IE5.5+ PNG Alpha Fix v1.0RC4
// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com // (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
// This is licensed under the CC-GNU LGPL, version 2.1 or later. // This is licensed under the CC-GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/ // For details, see: http://creativecommons.org/licenses/LGPL/2.1/
// This must be a path to a blank image. That's all the configuration you need. // This must be a path to a blank image. That's all the configuration you need.
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif'; if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';
var f = 'DXImageTransform.Microsoft.AlphaImageLoader'; var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
function filt(s, m) function filt(s, m)
{ {
if (filters[f]) if (filters[f])
{ {
filters[f].enabled = s ? true : false; filters[f].enabled = s ? true : false;
if (s) with (filters[f]) { src = s; sizingMethod = m } if (s) with (filters[f]) { src = s; sizingMethod = m }
} }
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")'; else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
} }
function doFix() function doFix()
{ {
alert('ok') alert('ok')
// Assume IE7 is OK. // Assume IE7 is OK.
if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) || if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
(event && !/(background|src)/.test(event.propertyName))) return; (event && !/(background|src)/.test(event.propertyName))) return;
var bgImg = currentStyle.backgroundImage || style.backgroundImage; var bgImg = currentStyle.backgroundImage || style.backgroundImage;
if (tagName == 'IMG') if (tagName == 'IMG')
{ {
if ((/\.png$/i).test(src)) if ((/\.png$/i).test(src))
{ {
if (currentStyle.width == 'auto' && currentStyle.height == 'auto') if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px'; style.width = offsetWidth + 'px';
filt(src, 'scale'); filt(src, 'scale');
src = blankImg; src = blankImg;
} }
else if (src.indexOf(blankImg) < 0) filt(); else if (src.indexOf(blankImg) < 0) filt();
} }
else if (bgImg && bgImg != 'none') else if (bgImg && bgImg != 'none')
{ {
if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i)) if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
{ {
var s = RegExp.$1; var s = RegExp.$1;
if (currentStyle.width == 'auto' && currentStyle.height == 'auto') if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
style.width = offsetWidth + 'px'; style.width = offsetWidth + 'px';
style.backgroundImage = 'none'; style.backgroundImage = 'none';
filt(s, 'crop'); filt(s, 'crop');
// IE link fix. // IE link fix.
for (var n = 0; n < childNodes.length; n++) for (var n = 0; n < childNodes.length; n++)
if (childNodes[n].style) childNodes[n].style.position = 'relative'; if (childNodes[n].style) childNodes[n].style.position = 'relative';
} }
else filt(); else filt();
} }
} }
doFix(); doFix();

@ -1,333 +1,333 @@
/* Focused windows */ /* Focused windows */
.overlay_mac_os_x { .overlay_mac_os_x {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.mac_os_x_nw { .mac_os_x_nw {
background: transparent url(mac_os_x/TL_Main.png) no-repeat 0 0; background: transparent url(mac_os_x/TL_Main.png) no-repeat 0 0;
width:24px; width:24px;
height:30px; height:30px;
} }
.mac_os_x_n { .mac_os_x_n {
background: transparent url(mac_os_x/T_Main.png) repeat-x 0 0; background: transparent url(mac_os_x/T_Main.png) repeat-x 0 0;
height:30px; height:30px;
} }
.mac_os_x_ne { .mac_os_x_ne {
background: transparent url(mac_os_x/TR_Main.png) no-repeat 0 0; background: transparent url(mac_os_x/TR_Main.png) no-repeat 0 0;
width:31px; width:31px;
height:30px; height:30px;
} }
.mac_os_x_w { .mac_os_x_w {
background: transparent url(mac_os_x/L_Main.png) repeat-y top left; background: transparent url(mac_os_x/L_Main.png) repeat-y top left;
width:16px; width:16px;
} }
.mac_os_x_e { .mac_os_x_e {
background: transparent url(mac_os_x/R_Main.png) repeat-y top right; background: transparent url(mac_os_x/R_Main.png) repeat-y top right;
width:16px; width:16px;
} }
.mac_os_x_sw { .mac_os_x_sw {
background: transparent url(mac_os_x/BL_Main.png) no-repeat 0 0; background: transparent url(mac_os_x/BL_Main.png) no-repeat 0 0;
width:31px; width:31px;
height:40px; height:40px;
} }
.mac_os_x_s { .mac_os_x_s {
background: transparent url(mac_os_x/B_Main.png) repeat-x 0 0; background: transparent url(mac_os_x/B_Main.png) repeat-x 0 0;
height:40px; height:40px;
} }
.mac_os_x_se, .mac_os_x_sizer { .mac_os_x_se, .mac_os_x_sizer {
background: transparent url(mac_os_x/BR_Main.png) no-repeat 0 0; background: transparent url(mac_os_x/BR_Main.png) no-repeat 0 0;
width:31px; width:31px;
height:40px; height:40px;
} }
.mac_os_x_sizer { .mac_os_x_sizer {
cursor:se-resize; cursor:se-resize;
} }
.mac_os_x_close { .mac_os_x_close {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x/close.gif) no-repeat 0 0; background: transparent url(mac_os_x/close.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:25px; left:25px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.mac_os_x_minimize { .mac_os_x_minimize {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x/minimize.gif) no-repeat 0 0; background: transparent url(mac_os_x/minimize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:45px; left:45px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.mac_os_x_maximize { .mac_os_x_maximize {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x/maximize.gif) no-repeat 0 0; background: transparent url(mac_os_x/maximize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:65px; left:65px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.mac_os_x_title { .mac_os_x_title {
float:left; float:left;
height:14px; height:14px;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
margin-top:8px; margin-top:8px;
width:100%; width:100%;
color:#000; color:#000;
} }
.mac_os_x_content { .mac_os_x_content {
overflow:auto; overflow:auto;
color: #222; color: #222;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 10px; font-size: 10px;
background:#FFF; background:#FFF;
} }
.mac_os_x_s .status_bar { .mac_os_x_s .status_bar {
padding-bottom:24px; padding-bottom:24px;
} }
/* FOR IE */ /* FOR IE */
* html .mac_os_x_nw { * html .mac_os_x_nw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TL_Main.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TL_Main.png", sizingMethod="crop");
} }
* html .mac_os_x_n { * html .mac_os_x_n {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/T_Main.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/T_Main.png", sizingMethod="scale");
} }
* html .mac_os_x_ne { * html .mac_os_x_ne {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TR_Main.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TR_Main.png", sizingMethod="crop");
} }
* html .mac_os_x_w { * html .mac_os_x_w {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/L_Main.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/L_Main.png", sizingMethod="scale");
} }
* html .mac_os_x_e { * html .mac_os_x_e {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/R_Main.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/R_Main.png", sizingMethod="scale");
} }
* html .mac_os_x_sw { * html .mac_os_x_sw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BL_Main.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BL_Main.png", sizingMethod="crop");
} }
* html .mac_os_x_s { * html .mac_os_x_s {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/B_Main.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/B_Main.png", sizingMethod="scale");
} }
* html .mac_os_x_se { * html .mac_os_x_se {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR_Main.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR_Main.png", sizingMethod="crop");
} }
* html .mac_os_x_sizer { * html .mac_os_x_sizer {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR_Main.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR_Main.png", sizingMethod="crop");
} }
/* Focused windows */ /* Focused windows */
.overlay_blur_os_x { .overlay_blur_os_x {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.blur_os_x_nw { .blur_os_x_nw {
background: transparent url(mac_os_x/TL.png) no-repeat 0 0; background: transparent url(mac_os_x/TL.png) no-repeat 0 0;
width:24px; width:24px;
height:30px; height:30px;
} }
.blur_os_x_n { .blur_os_x_n {
background: transparent url(mac_os_x/T.png) repeat-x 0 0; background: transparent url(mac_os_x/T.png) repeat-x 0 0;
height:30px; height:30px;
} }
.blur_os_x_ne { .blur_os_x_ne {
background: transparent url(mac_os_x/TR.png) no-repeat 0 0; background: transparent url(mac_os_x/TR.png) no-repeat 0 0;
width:31px; width:31px;
height:30px; height:30px;
} }
.blur_os_x_w { .blur_os_x_w {
background: transparent url(mac_os_x/L.png) repeat-y top left; background: transparent url(mac_os_x/L.png) repeat-y top left;
width:16px; width:16px;
} }
.blur_os_x_e { .blur_os_x_e {
background: transparent url(mac_os_x/R.png) repeat-y top right; background: transparent url(mac_os_x/R.png) repeat-y top right;
width:16px; width:16px;
} }
.blur_os_x_sw { .blur_os_x_sw {
background: transparent url(mac_os_x/BL.png) no-repeat 0 0; background: transparent url(mac_os_x/BL.png) no-repeat 0 0;
width:31px; width:31px;
height:40px; height:40px;
} }
.blur_os_x_s { .blur_os_x_s {
background: transparent url(mac_os_x/B.png) repeat-x 0 0; background: transparent url(mac_os_x/B.png) repeat-x 0 0;
height:40px; height:40px;
} }
.blur_os_x_se, .blur_os_x_sizer { .blur_os_x_se, .blur_os_x_sizer {
background: transparent url(mac_os_x/BR.png) no-repeat 0 0; background: transparent url(mac_os_x/BR.png) no-repeat 0 0;
width:31px; width:31px;
height:40px; height:40px;
} }
.blur_os_x_sizer { .blur_os_x_sizer {
cursor:se-resize; cursor:se-resize;
} }
.blur_os_x_close { .blur_os_x_close {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x/close.gif) no-repeat 0 0; background: transparent url(mac_os_x/close.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:25px; left:25px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.blur_os_x_minimize { .blur_os_x_minimize {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x/minimize.gif) no-repeat 0 0; background: transparent url(mac_os_x/minimize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:45px; left:45px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.blur_os_x_maximize { .blur_os_x_maximize {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x/maximize.gif) no-repeat 0 0; background: transparent url(mac_os_x/maximize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:65px; left:65px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.blur_os_x_title { .blur_os_x_title {
float:left; float:left;
height:14px; height:14px;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
margin-top:8px; margin-top:8px;
width:100%; width:100%;
color:#000; color:#000;
} }
.blur_os_x_content { .blur_os_x_content {
overflow:auto; overflow:auto;
color: #222; color: #222;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 10px; font-size: 10px;
background:#FFF; background:#FFF;
} }
.blur_os_x_s .status_bar { .blur_os_x_s .status_bar {
padding-bottom:24px; padding-bottom:24px;
} }
/* FOR IE */ /* FOR IE */
* html .blur_os_x_nw { * html .blur_os_x_nw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TL.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TL.png", sizingMethod="crop");
} }
* html .blur_os_x_n { * html .blur_os_x_n {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/T.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/T.png", sizingMethod="scale");
} }
* html .blur_os_x_ne { * html .blur_os_x_ne {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TR.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TR.png", sizingMethod="crop");
} }
* html .blur_os_x_w { * html .blur_os_x_w {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/L.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/L.png", sizingMethod="scale");
} }
* html .blur_os_x_e { * html .blur_os_x_e {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/R.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/R.png", sizingMethod="scale");
} }
* html .blur_os_x_sw { * html .blur_os_x_sw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BL.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BL.png", sizingMethod="crop");
} }
* html .blur_os_x_s { * html .blur_os_x_s {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/B.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/B.png", sizingMethod="scale");
} }
* html .blur_os_x_se { * html .blur_os_x_se {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR.png", sizingMethod="crop");
} }
* html .blur_os_x_sizer { * html .blur_os_x_sizer {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR.png", sizingMethod="crop");
} }

@ -1,160 +1,160 @@
.overlay_mac_os_x_dialog { .overlay_mac_os_x_dialog {
background-color: #FF7224; background-color: #FF7224;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.mac_os_x_dialog_nw { .mac_os_x_dialog_nw {
background: transparent url(mac_os_x_dialog/L.png) repeat-y top left; background: transparent url(mac_os_x_dialog/L.png) repeat-y top left;
width:16px; width:16px;
height:16px; height:16px;
} }
.mac_os_x_dialog_n { .mac_os_x_dialog_n {
background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0; background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0;
height:18px; height:18px;
} }
.mac_os_x_dialog_ne { .mac_os_x_dialog_ne {
background: transparent url(mac_os_x_dialog/R.png) repeat-y top left; background: transparent url(mac_os_x_dialog/R.png) repeat-y top left;
width:16px; width:16px;
height:16px; height:16px;
} }
.mac_os_x_dialog_w { .mac_os_x_dialog_w {
background: transparent url(mac_os_x_dialog/L.png) repeat-y top left; background: transparent url(mac_os_x_dialog/L.png) repeat-y top left;
width:16px; width:16px;
} }
.mac_os_x_dialog_e { .mac_os_x_dialog_e {
background: transparent url(mac_os_x_dialog/R.png) repeat-y top right; background: transparent url(mac_os_x_dialog/R.png) repeat-y top right;
width:16px; width:16px;
} }
.mac_os_x_dialog_sw { .mac_os_x_dialog_sw {
background: transparent url(mac_os_x_dialog/BL.png) no-repeat 0 0; background: transparent url(mac_os_x_dialog/BL.png) no-repeat 0 0;
width:31px; width:31px;
height:40px; height:40px;
} }
.mac_os_x_dialog_s { .mac_os_x_dialog_s {
background: transparent url(mac_os_x_dialog/B.png) repeat-x 0 0; background: transparent url(mac_os_x_dialog/B.png) repeat-x 0 0;
height:40px; height:40px;
} }
.mac_os_x_dialog_se, .mac_os_x_dialog_sizer { .mac_os_x_dialog_se, .mac_os_x_dialog_sizer {
background: transparent url(mac_os_x_dialog/BR.png) no-repeat 0 0; background: transparent url(mac_os_x_dialog/BR.png) no-repeat 0 0;
width:31px; width:31px;
height:40px; height:40px;
} }
.mac_os_x_dialog_sizer { .mac_os_x_dialog_sizer {
cursor:se-resize; cursor:se-resize;
} }
.mac_os_x_dialog_close { .mac_os_x_dialog_close {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x_dialog/close.gif) no-repeat 0 0; background: transparent url(mac_os_x_dialog/close.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:25px; left:25px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.mac_os_x_dialog_minimize { .mac_os_x_dialog_minimize {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x_dialog/minimize.gif) no-repeat 0 0; background: transparent url(mac_os_x_dialog/minimize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:45px; left:45px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.mac_os_x_dialog_maximize { .mac_os_x_dialog_maximize {
width: 19px; width: 19px;
height: 19px; height: 19px;
background: transparent url(mac_os_x_dialog/maximize.gif) no-repeat 0 0; background: transparent url(mac_os_x_dialog/maximize.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:12px; top:12px;
left:65px; left:65px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.mac_os_x_dialog_title { .mac_os_x_dialog_title {
float:left; float:left;
height:14px; height:14px;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size:12px; font-size:12px;
text-align:center; text-align:center;
margin-top:6px; margin-top:6px;
width:100%; width:100%;
color:#000; color:#000;
} }
.mac_os_x_dialog_content { .mac_os_x_dialog_content {
overflow:auto; overflow:auto;
color: #222; color: #222;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 10px; font-size: 10px;
background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0; background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0;
} }
.mac_os_x_dialog_buttons { .mac_os_x_dialog_buttons {
text-align: center; text-align: center;
} }
/* FOR IE */ /* FOR IE */
* html .mac_os_x_dialog_nw { * html .mac_os_x_dialog_nw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale");
} }
* html .mac_os_x_dialog_ne { * html .mac_os_x_dialog_ne {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale");
} }
* html .mac_os_x_dialog_w { * html .mac_os_x_dialog_w {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale");
} }
* html .mac_os_x_dialog_e { * html .mac_os_x_dialog_e {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale");
} }
* html .mac_os_x_dialog_sw { * html .mac_os_x_dialog_sw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BL.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BL.png", sizingMethod="crop");
} }
* html .mac_os_x_dialog_s { * html .mac_os_x_dialog_s {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/B.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/B.png", sizingMethod="scale");
} }
* html .mac_os_x_dialog_se { * html .mac_os_x_dialog_se {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop");
} }
* html .mac_os_x_dialog_sizer { * html .mac_os_x_dialog_sizer {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop");
} }

@ -1,164 +1,164 @@
.overlay_nuncio img { border: none; } .overlay_nuncio img { border: none; }
.overlay_nuncio { .overlay_nuncio {
background-color: #666666; background-color: #666666;
} }
.nuncio_nw { .nuncio_nw {
width: 12px; width: 12px;
height: 28px; height: 28px;
background: url(nuncio/top_left.png) no-repeat; background: url(nuncio/top_left.png) no-repeat;
} }
.nuncio_n { .nuncio_n {
background: url(nuncio/top_mid.png) repeat-x; background: url(nuncio/top_mid.png) repeat-x;
height: 28px; height: 28px;
} }
.nuncio_ne { .nuncio_ne {
width: 21px; width: 21px;
height: 28px; height: 28px;
background: url(nuncio/top_right.png) no-repeat; background: url(nuncio/top_right.png) no-repeat;
} }
.nuncio_e { .nuncio_e {
width: 21px; width: 21px;
background: url(nuncio/center_right.png) repeat-y top right; background: url(nuncio/center_right.png) repeat-y top right;
} }
.nuncio_w { .nuncio_w {
width: 12px; width: 12px;
background: url(nuncio/center_left.png) repeat-y top left; background: url(nuncio/center_left.png) repeat-y top left;
} }
.nuncio_sw { .nuncio_sw {
width: 12px; width: 12px;
height: 18px; height: 18px;
background: url(nuncio/bottom_left.png) no-repeat; background: url(nuncio/bottom_left.png) no-repeat;
} }
.nuncio_s { .nuncio_s {
background: url(nuncio/bottom_mid.png) repeat-x 0 0; background: url(nuncio/bottom_mid.png) repeat-x 0 0;
height: 18px; height: 18px;
} }
.nuncio_se, .nuncio_sizer { .nuncio_se, .nuncio_sizer {
width: 21px; width: 21px;
height: 18px; height: 18px;
background: url(nuncio/bottom_right.png) no-repeat; background: url(nuncio/bottom_right.png) no-repeat;
} }
.nuncio_close { .nuncio_close {
width: 14px; width: 14px;
height: 14px; height: 14px;
background: url(nuncio/close.png) no-repeat; background: url(nuncio/close.png) no-repeat;
position:absolute; position:absolute;
top:10px; top:10px;
right:22px; right:22px;
cursor:pointer; cursor:pointer;
z-index:2000; z-index:2000;
} }
.nuncio_minimize { .nuncio_minimize {
width: 14px; width: 14px;
height: 15px; height: 15px;
background: url(nuncio/minimize.png) no-repeat; background: url(nuncio/minimize.png) no-repeat;
position:absolute; position:absolute;
top:10px; top:10px;
right:40px; right:40px;
cursor:pointer; cursor:pointer;
z-index:2000; z-index:2000;
} }
.nuncio_title { .nuncio_title {
float:left; float:left;
font-size:11px; font-size:11px;
font-weight: bold; font-weight: bold;
font-style: italic; font-style: italic;
color: #fff; color: #fff;
width: 100% width: 100%
} }
.nuncio_content { .nuncio_content {
background: url(nuncio/overlay.png) repeat; background: url(nuncio/overlay.png) repeat;
overflow:auto; overflow:auto;
color: #ddd; color: #ddd;
font-family: Tahoma, Arial, "sans-serif"; font-family: Tahoma, Arial, "sans-serif";
font-size: 10px; font-size: 10px;
} }
.nuncio_sizer { .nuncio_sizer {
cursor:se-resize; cursor:se-resize;
} }
.top_draggable, .bottom_draggable { .top_draggable, .bottom_draggable {
cursor:move cursor:move
} }
/* FOR IE */ /* FOR IE */
* html .nuncio_nw { * html .nuncio_nw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_left.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_left.png", sizingMethod="crop");
} }
* html .nuncio_n { * html .nuncio_n {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_mid.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_mid.png", sizingMethod="scale");
} }
* html .nuncio_ne { * html .nuncio_ne {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_right.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_right.png", sizingMethod="crop");
} }
* html .nuncio_w { * html .nuncio_w {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_left.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_left.png", sizingMethod="scale");
} }
* html .nuncio_e { * html .nuncio_e {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_right.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_right.png", sizingMethod="scale");
} }
* html .nuncio_sw { * html .nuncio_sw {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_left.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_left.png", sizingMethod="crop");
} }
* html .nuncio_s { * html .nuncio_s {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_mid.png", sizingMethod="scale"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_mid.png", sizingMethod="scale");
} }
* html .nuncio_se { * html .nuncio_se {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop");
} }
* html .nuncio_sizer { * html .nuncio_sizer {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop");
} }
* html .nuncio_close { * html .nuncio_close {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/close.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/close.png", sizingMethod="crop");
} }
* html .nuncio_minimize { * html .nuncio_minimize {
background-color: transparent; background-color: transparent;
background-image: none; background-image: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/minimize.png", sizingMethod="crop"); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/minimize.png", sizingMethod="crop");
} }

@ -1,108 +1,108 @@
.overlay_spread { .overlay_spread {
background-color: #85BBEF; background-color: #85BBEF;
filter:alpha(opacity=60); filter:alpha(opacity=60);
-moz-opacity: 0.6; -moz-opacity: 0.6;
opacity: 0.6; opacity: 0.6;
} }
.spread_nw { .spread_nw {
background: transparent url(spread/left-top.gif) no-repeat 0 0; background: transparent url(spread/left-top.gif) no-repeat 0 0;
width:10px; width:10px;
height:25px; height:25px;
} }
.spread_n { .spread_n {
background: transparent url(spread/top-middle.gif) repeat-x 0 0; background: transparent url(spread/top-middle.gif) repeat-x 0 0;
height:25px; height:25px;
} }
.spread_ne { .spread_ne {
background: transparent url(spread/right-top.gif) no-repeat 0 0; background: transparent url(spread/right-top.gif) no-repeat 0 0;
width:10px; width:10px;
height:25px; height:25px;
} }
.spread_w { .spread_w {
background: transparent url(spread/frame-left.gif) repeat-y top left; background: transparent url(spread/frame-left.gif) repeat-y top left;
width:7px; width:7px;
} }
.spread_e { .spread_e {
background: transparent url(spread/frame-right.gif) repeat-y top right; background: transparent url(spread/frame-right.gif) repeat-y top right;
width:7px; width:7px;
} }
.spread_sw { .spread_sw {
background: transparent url(spread/bottom-left-c.gif) no-repeat 0 0; background: transparent url(spread/bottom-left-c.gif) no-repeat 0 0;
width:7px; width:7px;
height:7px; height:7px;
} }
.spread_s { .spread_s {
background: transparent url(spread/bottom-middle.gif) repeat-x 0 0; background: transparent url(spread/bottom-middle.gif) repeat-x 0 0;
height:7px; height:7px;
} }
.spread_se, .spread_sizer { .spread_se, .spread_sizer {
background: transparent url(spread/bottom-right-c.gif) no-repeat 0 0; background: transparent url(spread/bottom-right-c.gif) no-repeat 0 0;
width:7px; width:7px;
height:7px; height:7px;
} }
.spread_sizer { .spread_sizer {
cursor:se-resize; cursor:se-resize;
} }
.spread_close { .spread_close {
width: 23px; width: 23px;
height: 23px; height: 23px;
background: transparent url(spread/button-close-focus.gif) no-repeat 0 0; background: transparent url(spread/button-close-focus.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:11px; right:11px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.spread_minimize { .spread_minimize {
width: 23px; width: 23px;
height: 23px; height: 23px;
background: transparent url(spread/button-min-focus.gif) no-repeat 0 0; background: transparent url(spread/button-min-focus.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:55px; right:55px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.spread_maximize { .spread_maximize {
width: 23px; width: 23px;
height: 23px; height: 23px;
background: transparent url(spread/button-max-focus.gif) no-repeat 0 0; background: transparent url(spread/button-max-focus.gif) no-repeat 0 0;
position:absolute; position:absolute;
top:0px; top:0px;
right:33px; right:33px;
cursor:pointer; cursor:pointer;
z-index:1000; z-index:1000;
} }
.spread_title { .spread_title {
float:left; float:left;
height:14px; height:14px;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size:14px; font-size:14px;
font-weight:bold; font-weight:bold;
text-align:left; text-align:left;
margin-top:2px; margin-top:2px;
width:100%; width:100%;
color:#E47211; color:#E47211;
} }
.spread_content { .spread_content {
overflow:auto; overflow:auto;
color: #222; color: #222;
font-family: Tahoma, Arial, sans-serif; font-family: Tahoma, Arial, sans-serif;
font-size: 10px; font-size: 10px;
background:#A9EA00; background:#A9EA00;
} }

@ -1,109 +1,109 @@
/* CSS Document */ /* CSS Document */
/* 2015-06-26 */ /* 2015-06-26 */
.navContainer h1,h2,h3,h4,h5,h6,hr,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;} .navContainer h1,h2,h3,h4,h5,h6,hr,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;}
.navContainer body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5;} .navContainer body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5;}
div,img,tr,td,table{ border:0;} div,img,tr,td,table{ border:0;}
table,tr,td{border:0;cellspacing:0; cellpadding:0;} table,tr,td{border:0;cellspacing:0; cellpadding:0;}
ol,ul,li{ list-style-type:none} ol,ul,li{ list-style-type:none}
a:link,a:visited{text-decoration:none;} a:link,a:visited{text-decoration:none;}
/*a:hover,a:active{color:#000;}*/ /*a:hover,a:active{color:#000;}*/
/*常用*/ /*常用*/
/*#RSide{ background:#fff;}*/ /*#RSide{ background:#fff;}*/
/*上传图片处理*/ /*上传图片处理*/
.navSearchTypeBox{margin-top: 32px;} .navSearchTypeBox{margin-top: 32px;}
#navHomepageSearch{margin-top: 11px;background-color: white;} #navHomepageSearch{margin-top: 11px;background-color: white;}
.upload_img img{max-width: 100%;} .upload_img img{max-width: 100%;}
blockquote img{max-width: 100%;} blockquote img{max-width: 100%;}
.hidden{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .hidden{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.none{display: none;} .none{display: none;}
.rside_back{ width:670px; margin-left:10px; background:#fff; margin-bottom:10px;} .rside_back{ width:670px; margin-left:10px; background:#fff; margin-bottom:10px;}
.break_word{ word-break:break-all; word-wrap: break-word;} .break_word{ word-break:break-all; word-wrap: break-word;}
select,input,textarea{ border:1px solid #64bdd9; background:#fff; color:#000; padding-left:5px; } select,input,textarea{ border:1px solid #64bdd9; background:#fff; color:#000; padding-left:5px; }
.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; background:#dbdbdb;} .sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; background:#dbdbdb;}
.sub_btn:hover{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;} .sub_btn:hover{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;}
/*table{ background:#fff;}*/ /*table{ background:#fff;}*/
.more{ font-weight:normal; color:#999; font-size:12px;} .more{ font-weight:normal; color:#999; font-size:12px;}
.no_line{ border-bottom:none;} .no_line{ border-bottom:none;}
.line{border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;} .line{border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
.no_border{ border:none;background:none;} .no_border{ border:none;background:none;}
.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 135px -193px no-repeat; cursor:pointer;} .min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 135px -193px no-repeat; cursor:pointer;}
.db {display:block;} .db {display:block;}
/* font & color */ /* font & color */
.f12{font-size:12px; font-weight:normal;} .f12{font-size:12px; font-weight:normal;}
.f14{font-size:14px;} .f14{font-size:14px;}
.f16{font-size:16px;} .f16{font-size:16px;}
.f18{font-size:18px;} .f18{font-size:18px;}
.fb{font-weight:bold;} .fb{font-weight:bold;}
/* Float & Clear */ /* Float & Clear */
.cl{ clear:both; overflow:hidden; } .cl{ clear:both; overflow:hidden; }
.fl{float:left;display:inline;} .fl{float:left;display:inline;}
.fr{float:right;display:inline;} .fr{float:right;display:inline;}
.f_l{ float:left;} .f_l{ float:left;}
.f_r{ float:right;} .f_r{ float:right;}
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden} .clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
.clearfix{clear:both;zoom:1} .clearfix{clear:both;zoom:1}
.break_word{ word-break:break-all; word-wrap: break-word;} .break_word{ word-break:break-all; word-wrap: break-word;}
.white_space{white-space:nowrap;} .white_space{white-space:nowrap;}
a.c_white{ color:#fff !important;} a.c_white{ color:#fff !important;}
input.c_white { color:#fff !important;} input.c_white { color:#fff !important;}
/* Spacing */ /* Spacing */
.ml2{ margin-left:2px;} .ml2{ margin-left:2px;}
.ml3{ margin-left:3px;} .ml3{ margin-left:3px;}
.ml4{ margin-left:4px;} .ml4{ margin-left:4px;}
.ml5{ margin-left:5px;} .ml5{ margin-left:5px;}
.ml8{ margin-left:8px;} .ml8{ margin-left:8px;}
.ml10{ margin-left:10px;} .ml10{ margin-left:10px;}
.ml15{ margin-left:15px;} .ml15{ margin-left:15px;}
.ml20{ margin-left:20px;} .ml20{ margin-left:20px;}
.ml40{ margin-left:40px;} .ml40{ margin-left:40px;}
.ml45{ margin-left:45px;} .ml45{ margin-left:45px;}
.ml55{ margin-left:55px;} .ml55{ margin-left:55px;}
.ml30{ margin-left:30px;} .ml30{ margin-left:30px;}
.ml60{ margin-left:60px;} .ml60{ margin-left:60px;}
.ml80{ margin-left:80px;} .ml80{ margin-left:80px;}
.ml90{ margin-left:90px;} .ml90{ margin-left:90px;}
.ml100{ margin-left:100px;} .ml100{ margin-left:100px;}
.ml110{ margin-left:110px;} .ml110{ margin-left:110px;}
.ml150 { margin-left:150px;} .ml150 { margin-left:150px;}
.mr5{ margin-right:5px;} .mr5{ margin-right:5px;}
.mr45 {margin-right:45px;} .mr45 {margin-right:45px;}
.mr55{ margin-right:55px;} .mr55{ margin-right:55px;}
.mr10{ margin-right:10px;} .mr10{ margin-right:10px;}
.mr15 {margin-right:15px;} .mr15 {margin-right:15px;}
.mr20{ margin-right:20px;} .mr20{ margin-right:20px;}
.mr30{ margin-right:30px;} .mr30{ margin-right:30px;}
.mr40{ margin-right:40px;} .mr40{ margin-right:40px;}
.mw20{ margin: 0 20px;} .mw20{ margin: 0 20px;}
.mt3{ margin-top:3px;} .mt3{ margin-top:3px;}
.mt5{ margin-top:5px;} .mt5{ margin-top:5px;}
.mt8{ margin-top:8px;} .mt8{ margin-top:8px;}
.mt10{ margin-top:10px !important;} .mt10{ margin-top:10px !important;}
.mt15 {margin-top:15px;} .mt15 {margin-top:15px;}
.mb4{ margin-bottom:4px;} .mb4{ margin-bottom:4px;}
.mb5{ margin-bottom:5px;} .mb5{ margin-bottom:5px;}
.mb8 {margin-bottom:8px;} .mb8 {margin-bottom:8px;}
.mb10{ margin-bottom:10px !important;} .mb10{ margin-bottom:10px !important;}
.mb20{ margin-bottom:20px;} .mb20{ margin-bottom:20px;}
.pl15{ padding-left:15px;} .pl15{ padding-left:15px;}
.w20{ width:20px;} .w20{ width:20px;}
.w60{ width:60px;} .w60{ width:60px;}
.w70{ width:70px;} .w70{ width:70px;}
.w90{ width:90px;} .w90{ width:90px;}
.w210{ width:210px;} .w210{ width:210px;}
.w150{ width:150px;} .w150{ width:150px;}
.w280{ width:280px;} .w280{ width:280px;}
.w430{ width:470px;} .w430{ width:470px;}
.w520{ width:520px;} .w520{ width:520px;}
.w543{ width:543px;} .w543{ width:543px;}
.w557{ width:557px;} .w557{ width:557px;}
.w583{ width:583px;} .w583{ width:583px;}
.w350{ width:350px;} .w350{ width:350px;}
.w610{ width:610px;} .w610{ width:610px;}
.w600{ width:600px;} .w600{ width:600px;}
.h22{ height:22px;} .h22{ height:22px;}
.h26{ height:26px;} .h26{ height:26px;}
.h50{ height:50px;} .h50{ height:50px;}
.h70{ height:70px;} .h70{ height:70px;}
.h150{ height:150px;} .h150{ height:150px;}

File diff suppressed because it is too large Load Diff

@ -1,66 +1,66 @@
.topbar_info02{ margin:5px 10px;width:480px; } .topbar_info02{ margin:5px 10px;width:480px; }
.topbar_info02 p{color: #7f7f7f;} .topbar_info02 p{color: #7f7f7f;}
.search{ margin-top:8px; margin-left:71px;} .search{ margin-top:8px; margin-left:71px;}
/*信息*/ /*信息*/
.project_info{ background:#fff; padding:10px; padding-right:0px;width:222px; padding-right:8px; margin-bottom:10px;} .project_info{ background:#fff; padding:10px; padding-right:0px;width:222px; padding-right:8px; margin-bottom:10px;}
.pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;} .pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;}
.pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;} .pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;}
.pr_info_logo:hover{ border:1px solid #64bdd9; } .pr_info_logo:hover{ border:1px solid #64bdd9; }
.pr_info_join{} .pr_info_join{}
a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#64bdd9; float:left; } a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#64bdd9; float:left; }
.pr_info_join a:hover{ background:#41a8c8;} .pr_info_join a:hover{ background:#41a8c8;}
.pr_join_span{color: #fff; display:block; padding:0 5px; padding-top:2px; height:20px; float:left; text-align:center; background: #CCC;} .pr_join_span{color: #fff; display:block; padding:0 5px; padding-top:2px; height:20px; float:left; text-align:center; background: #CCC;}
.pr_setting{ display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_setting{ display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_copy{ display:block; background:url(../images/leftside.png) -1px -23px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_copy{ display:block; background:url(../images/leftside.png) -1px -23px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_add{display:block; background:url(../images/leftside.png) 0px -71px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_add{display:block; background:url(../images/leftside.png) 0px -71px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_arrow{display:block; background:url(../images/leftside.png) 0px -90px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_arrow{display:block; background:url(../images/leftside.png) 0px -90px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_delete{ display:block; background:url(../images/leftside.png) -1px -157px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_delete{ display:block; background:url(../images/leftside.png) -1px -157px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_info_name{ color:#3e4040; font-size:14px; line-height:1.5;} .pr_info_name{ color:#3e4040; font-size:14px; line-height:1.5;}
a:hover.pr_info_name{ color:#3ca5c6;} a:hover.pr_info_name{ color:#3ca5c6;}
.pr_info_score{ font-size:14px; color:#3e4040; } .pr_info_score{ font-size:14px; color:#3e4040; }
.pr_info_score a{ color:#ff7143;} .pr_info_score a{ color:#ff7143;}
.pr_info_score a:hover{ color:#64bdd9;} .pr_info_score a:hover{ color:#64bdd9;}
.img_private{ background:url(../images/new_project/img_project.png) 0 0 no-repeat; width:33px; height:16px; color:#fff; font-size:12px; padding-left:7px; } .img_private{ background:url(../images/new_project/img_project.png) 0 0 no-repeat; width:33px; height:16px; color:#fff; font-size:12px; padding-left:7px; }
.info_foot_num{ color:#3ca5c6; } .info_foot_num{ color:#3ca5c6; }
.pr_info_foot{ color:#7f7f7f; margin-top:5px; } .pr_info_foot{ color:#7f7f7f; margin-top:5px; }
a:hover.info_foot_num{ color:#2390b2;} a:hover.info_foot_num{ color:#2390b2;}
.info_box{background:#fff; padding:10px;width:220px; } .info_box{background:#fff; padding:10px;width:220px; }
.info_box ul li{ font-size:12px; color: #3e4040; line-height:1.7;} .info_box ul li{ font-size:12px; color: #3e4040; line-height:1.7;}
/*左侧导航*/ /*左侧导航*/
.subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;} .subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;}
.subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;} .subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;}
a.subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;} a.subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;}
a:hover.subNav_jiantou:hover{color:#0781b4; } a:hover.subNav_jiantou:hover{color:#0781b4; }
.currentDd{color:#0781b4; } .currentDd{color:#0781b4; }
.currentDt{background-color:#fff; } .currentDt{background-color:#fff; }
.navContent{display: none;border-bottom:solid 1px #e5e3da; } .navContent{display: none;border-bottom:solid 1px #e5e3da; }
.navContent li a{display:block;width:240px;heigh:28px;text-align:center;font-size:12px;line-height:28px;color:#333} .navContent li a{display:block;width:240px;heigh:28px;text-align:center;font-size:12px;line-height:28px;color:#333}
.navContent li a:hover{color:#fff;background-color:#b3e0ee} .navContent li a:hover{color:#fff;background-color:#b3e0ee}
a.subnav_num{ font-weight:normal; color:#ff7143; font-size:12px;} a.subnav_num{ font-weight:normal; color:#ff7143; font-size:12px;}
a.subnav_green{ background:#28be6c; color:#fff; font-size:12px; font-weight:normal;height:18px; padding:0px 5px; padding-top:2px; display:block; margin-top:2px; margin-bottom:5px; float:right; margin-right:5px;} a.subnav_green{ background:#28be6c; color:#fff; font-size:12px; font-weight:normal;height:18px; padding:0px 5px; padding-top:2px; display:block; margin-top:2px; margin-bottom:5px; float:right; margin-right:5px;}
a:hover.subnav_green{ background:#14ad5a;} a:hover.subnav_green{ background:#14ad5a;}
/*简介*/ /*简介*/
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;}
.course_description{max-height: 420px;overflow:hidden; word-break: break-all;word-wrap: break-word;line-height: 20px;} .course_description{max-height: 420px;overflow:hidden; word-break: break-all;word-wrap: break-word;line-height: 20px;}
.project_board_content{overflow: hidden;max-height: 212px;word-break: break-all;word-wrap: break-word;} .project_board_content{overflow: hidden;max-height: 212px;word-break: break-all;word-wrap: break-word;}
.project_board_content1{overflow: hidden;max-height: 72px;word-break: break-all;word-wrap: break-word;} .project_board_content1{overflow: hidden;max-height: 72px;word-break: break-all;word-wrap: break-word;}
.course_description_none{max-height: none;} .course_description_none{max-height: none;}
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;}
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;} .lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}
/****标签(和资源库的tag样式一致)***/ /****标签(和资源库的tag样式一致)***/
.project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;} .project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;}
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } .submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} .isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all } .re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all }
.re_tag a{ color:#0d90c3;} .re_tag a{ color:#0d90c3;}
.tag_h{ } .tag_h{ }
.tag_h span,.tag_h a{ margin-bottom:5px;} .tag_h span,.tag_h a{ margin-bottom:5px;}

@ -1,67 +1,67 @@
.topbar_info02{ margin:5px 10px;width:480px; } .topbar_info02{ margin:5px 10px;width:480px; }
.topbar_info02 p{color: #7f7f7f;} .topbar_info02 p{color: #7f7f7f;}
.search{ margin-top:8px; float:right; margin-right:5px;} .search{ margin-top:8px; float:right; margin-right:5px;}
/*信息*/ /*信息*/
.project_info{ background:#fff; padding:10px; padding-right:0px;width:222px; padding-right:8px; margin-bottom:10px;} .project_info{ background:#fff; padding:10px; padding-right:0px;width:222px; padding-right:8px; margin-bottom:10px;}
.pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;} .pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;}
.pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;} .pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;}
.pr_info_logo:hover{ border:1px solid #64bdd9; } .pr_info_logo:hover{ border:1px solid #64bdd9; }
.pr_info_join{} .pr_info_join{}
a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#64bdd9; float:left; } a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#64bdd9; float:left; }
a:hover.pr_join_a{ background:#41a8c8;} a:hover.pr_join_a{ background:#41a8c8;}
.pr_join_span{color: #fff; display:block; padding:0 5px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background: #CCC;} .pr_join_span{color: #fff; display:block; padding:0 5px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background: #CCC;}
.pr_setting{ display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_setting{ display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_copy{ display:block; background:url(../images/leftside.png) -1px -23px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_copy{ display:block; background:url(../images/leftside.png) -1px -23px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_add{display:block; background:url(../images/leftside.png) 0px -71px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_add{display:block; background:url(../images/leftside.png) 0px -71px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_arrow{display:block; background:url(../images/leftside.png) 0px -90px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_arrow{display:block; background:url(../images/leftside.png) 0px -90px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_info_name{ color:#3e4040; font-size:14px; line-height:1.5;} .pr_info_name{ color:#3e4040; font-size:14px; line-height:1.5;}
.pr_info_name:hover{ color:#3ca5c6;} .pr_info_name:hover{ color:#3ca5c6;}
.pr_info_score{ font-size:14px; color:#3e4040; } .pr_info_score{ font-size:14px; color:#3e4040; }
.pr_info_score a{ color:#ff7143;} .pr_info_score a{ color:#ff7143;}
.pr_info_score a:hover{ color:#64bdd9;} .pr_info_score a:hover{ color:#64bdd9;}
.img_private{ background:url(../images/new_project/img_project.png) 0 0 no-repeat; width:33px; height:16px; color:#fff; font-size:12px; padding-left:7px; } .img_private{ background:url(../images/new_project/img_project.png) 0 0 no-repeat; width:33px; height:16px; color:#fff; font-size:12px; padding-left:7px; }
/*.img_private{ background:url(../images/project/img_project.png) 0 0 no-repeat; width:33px; height:16px; color:#fff; font-size:12px; padding-left:7px; }*/ /*.img_private{ background:url(../images/project/img_project.png) 0 0 no-repeat; width:33px; height:16px; color:#fff; font-size:12px; padding-left:7px; }*/
.info_foot_num{ color:#3ca5c6; } .info_foot_num{ color:#3ca5c6; }
.pr_info_foot{ color:#7f7f7f; margin-top:5px; } .pr_info_foot{ color:#7f7f7f; margin-top:5px; }
.info_foot_num:hover{ color:#2390b2;} .info_foot_num:hover{ color:#2390b2;}
.info_box{background:#fff; padding:10px;width:220px; } .info_box{background:#fff; padding:10px;width:220px; }
.info_box ul li{ font-size:12px; color: #3e4040; line-height:1.7;} .info_box ul li{ font-size:12px; color: #3e4040; line-height:1.7;}
/*左侧导航*/ /*左侧导航*/
.subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;} .subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;}
.subNav{border-bottom:solid 1px #e5e3da;cursor:auto;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;} .subNav{border-bottom:solid 1px #e5e3da;cursor:auto;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;}
.subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;} .subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;}
.subNav_jiantou:hover{color:#0781b4; } .subNav_jiantou:hover{color:#0781b4; }
.currentDd{color:#0781b4;} .currentDd{color:#0781b4;}
.currentDt{background-color:#fff;} .currentDt{background-color:#fff;}
.navContent{display: none;border-bottom:solid 1px #e5e3da; } .navContent{display: none;border-bottom:solid 1px #e5e3da; }
.navContent li a{display:block;width:240px;heigh:28px;text-align:center;font-size:12px;line-height:28px;color:#333} .navContent li a{display:block;width:240px;heigh:28px;text-align:center;font-size:12px;line-height:28px;color:#333}
.navContent li a:hover{color:#fff;background-color:#b3e0ee} .navContent li a:hover{color:#fff;background-color:#b3e0ee}
a.subnav_num{ font-weight:normal; color:#ff7143; font-size:12px;} a.subnav_num{ font-weight:normal; color:#ff7143; font-size:12px;}
a.subnav_green{ background:#28be6c; color:#fff; font-size:12px; font-weight:normal;height:18px; padding:0px 5px; padding-top:2px; display:block; margin-top:2px; margin-bottom:5px; float:right; margin-right:5px;} a.subnav_green{ background:#28be6c; color:#fff; font-size:12px; font-weight:normal;height:18px; padding:0px 5px; padding-top:2px; display:block; margin-top:2px; margin-bottom:5px; float:right; margin-right:5px;}
a:hover.subnav_green{ background:#14ad5a;} a:hover.subnav_green{ background:#14ad5a;}
/*简介*/ /*简介*/
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;}
.course_description{max-height: 420px;overflow:hidden; word-break: break-all;word-wrap: break-word;line-height: 20px;} .course_description{max-height: 420px;overflow:hidden; word-break: break-all;word-wrap: break-word;line-height: 20px;}
.course_description_none{max-height: none;} .course_description_none{max-height: none;}
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;}
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;} .lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}
/****标签(和资源库的tag样式一致)***/ /****标签(和资源库的tag样式一致)***/
.project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;} .project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;}
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } .submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} .isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
.re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; } .re_tag{ width: auto; padding:0 5px; padding-top:2px; height:20px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; }
.re_tag a{ color:#0d90c3;} .re_tag a{ color:#0d90c3;}
.tag_h{ } .tag_h{ }
.tag_h span,.tag_h a{ margin-bottom:5px;} .tag_h span,.tag_h a{ margin-bottom:5px;}

@ -32,9 +32,9 @@ table{ background:#fff;}
.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 135px -193px no-repeat; cursor:pointer;} .min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 135px -193px no-repeat; cursor:pointer;}
.db {display:block;} .db {display:block;}
/* font & color */ /* font & color */
h2{ font-size:18px; color:#269ac9;} h2{ font-size:18px; } /*color:#269ac9;*/
h3{ font-size:14px; color:#e8770d;} h3{ font-size:14px;}/* color:#e8770d;*/
h4{ font-size:14px; color:#3b3b3b;} h4{ font-size:14px; }/*color:#3b3b3b;*/
.f12{font-size:12px; font-weight:normal;} .f12{font-size:12px; font-weight:normal;}
.f14{font-size:14px;} .f14{font-size:14px;}
.f16{font-size:16px;} .f16{font-size:16px;}
@ -703,7 +703,7 @@ a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
.imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;} .imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;}
.homepagePostReplyDes {float:left; width:642px; margin-left:15px;} .homepagePostReplyDes {float:left; width:642px; margin-left:15px;}
.homepagePostReplyPublisher {font-size:12px; color:#888888; margin-bottom:5px;} .homepagePostReplyPublisher {font-size:12px; color:#888888; margin-bottom:5px;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;} .homepagePostReplyContent {font-size:12px; color:#484848; margin:3px 5px 12px 5px;font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family: , ;}
.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;}
@ -1481,7 +1481,9 @@ a.choose-active {background-color:#269ac9; color:#ffffff;}
.subject-list-count {width:60px; text-align:center;} .subject-list-count {width:60px; text-align:center;}
.subject-list-from {width:105px; text-align:center;} .subject-list-from {width:105px; text-align:center;}
/*视频播放默认图标*/
.mediaIco{margin: 30px 0 30px 20px;}
a.st_up{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 0 no-repeat; margin-top:5px; margin-left:3px;} a.st_up{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 0 no-repeat; margin-top:5px; margin-left:3px;}
a.st_down{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat; margin-top:5px; margin-left:3px;} a.st_down{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat; margin-top:5px; margin-left:3px;}
a.st_img { display:block;width:32px; height:32px; border:1px solid #CCC; padding:1px;} a.st_img { display:block;width:32px; height:32px; border:1px solid #CCC; padding:1px;}
a:hover.st_img { border:1px solid #1c9ec7; } a:hover.st_img { border:1px solid #1c9ec7; }

@ -1,88 +1,88 @@
/* Pretty printing styles. Used with prettify.js. */ /* Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */ /* SPAN elements with the classes below are added by prettyprint. */
.pln { color: #000 } /* plain text */ .pln { color: #000 } /* plain text */
@media screen { @media screen {
.str { color: #080 } /* string content */ .str { color: #080 } /* string content */
.kwd { color: #008 } /* a keyword */ .kwd { color: #008 } /* a keyword */
.com { color: #800 } /* a comment */ .com { color: #800 } /* a comment */
.typ { color: #606 } /* a type name */ .typ { color: #606 } /* a type name */
.lit { color: #066 } /* a literal value */ .lit { color: #066 } /* a literal value */
/* punctuation, lisp open bracket, lisp close bracket */ /* punctuation, lisp open bracket, lisp close bracket */
.pun, .opn, .clo { color: #660 } .pun, .opn, .clo { color: #660 }
.tag { color: #008 } /* a markup tag name */ .tag { color: #008 } /* a markup tag name */
.atn { color: #606 } /* a markup attribute name */ .atn { color: #606 } /* a markup attribute name */
.atv { color: #080 } /* a markup attribute value */ .atv { color: #080 } /* a markup attribute value */
.dec, .var { color: #606 } /* a declaration; a variable name */ .dec, .var { color: #606 } /* a declaration; a variable name */
.fun { color: red } /* a function name */ .fun { color: red } /* a function name */
} }
/* Use higher contrast and text-weight for printable form. */ /* Use higher contrast and text-weight for printable form. */
@media print, projection { @media print, projection {
.str { color: #060 } .str { color: #060 }
.kwd { color: #006; font-weight: bold } .kwd { color: #006; font-weight: bold }
.com { color: #600; font-style: italic } .com { color: #600; font-style: italic }
.typ { color: #404; font-weight: bold } .typ { color: #404; font-weight: bold }
.lit { color: #044 } .lit { color: #044 }
.pun, .opn, .clo { color: #440 } .pun, .opn, .clo { color: #440 }
.tag { color: #006; font-weight: bold } .tag { color: #006; font-weight: bold }
.atn { color: #404 } .atn { color: #404 }
.atv { color: #060 } .atv { color: #060 }
} }
/* Put a border around prettyprinted code snippets. */ /* Put a border around prettyprinted code snippets. */
pre.prettyprint { padding: 2px; pre.prettyprint { padding: 2px;
border-left:30px solid #ccc; border-left:30px solid #ccc;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc, border-right: 1px solid #ccc,
border-top: 1px solid #ccc } border-top: 1px solid #ccc }
pre li,ul,ol { pre li,ul,ol {
list-style-type: decimal; list-style-type: decimal;
} }
/* Specify class=linenums on a pre to get line numbering */ /* Specify class=linenums on a pre to get line numbering */
ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 15px;margin-left: 0px !important; } /* IE indents via margin-left */ ol.linenums { margin-top: 0; margin-bottom: 0;line-height: 15px;margin-left: 0px !important; } /* IE indents via margin-left */
/*.list_style ol li {*/ /*.list_style ol li {*/
/*list-style-type: decimal;*/ /*list-style-type: decimal;*/
/*margin-left: 10px !important;*/ /*margin-left: 10px !important;*/
/*}*/ /*}*/
.linenums li { .linenums li {
margin-left: 5px !important; margin-left: 5px !important;
} }
li.L0, li.L0,
li.L1, li.L1,
li.L2, li.L2,
li.L3, li.L3,
li.L5, li.L5,
li.L6, li.L6,
li.L7, li.L7,
li.L8 { list-style-type: decimal; } li.L8 { list-style-type: decimal; }
/* Alternate shading for lines */ /* Alternate shading for lines */
li.L1, li.L1,
li.L3, li.L3,
li.L5, li.L5,
li.L7, li.L7,
li.L9 { background: #eee } li.L9 { background: #eee }
.prettyprint *{font-family:'courier new',monospace;} .prettyprint *{font-family:'courier new',monospace;}
/*.prettyprint .com { color: #93a1a1; }*/ /*.prettyprint .com { color: #93a1a1; }*/
/*.prettyprint .lit { color: #AE81FF; }*/ /*.prettyprint .lit { color: #AE81FF; }*/
/*.prettyprint .pun,*/ /*.prettyprint .pun,*/
/*.prettyprint .opn,*/ /*.prettyprint .opn,*/
/*.prettyprint .clo { color: #F8F8F2; }*/ /*.prettyprint .clo { color: #F8F8F2; }*/
/*.prettyprint .fun { color: #dc322f; }*/ /*.prettyprint .fun { color: #dc322f; }*/
/*.prettyprint .str,*/ /*.prettyprint .str,*/
/*.prettyprint .atv { color: #E6DB74; }*/ /*.prettyprint .atv { color: #E6DB74; }*/
/*.prettyprint .kwd,*/ /*.prettyprint .kwd,*/
/*.prettyprint .tag { color: #F92659; }*/ /*.prettyprint .tag { color: #F92659; }*/
/*.prettyprint .typ,*/ /*.prettyprint .typ,*/
/*.prettyprint .atn,*/ /*.prettyprint .atn,*/
/*.prettyprint .dec,*/ /*.prettyprint .dec,*/
/*.prettyprint .var { color: #A6E22E; }*/ /*.prettyprint .var { color: #A6E22E; }*/
/*.prettyprint .pln { color: #66D9EF; }*/ /*.prettyprint .pln { color: #66D9EF; }*/
.memo-content pre { .memo-content pre {
white-space:pre !important; white-space:pre !important;
word-wrap: break-word; word-wrap: break-word;
} }

@ -1132,3 +1132,5 @@ a.resource-tab-active {color:#fff; background-color:#269ac9; border-bottom:1px s
a.group-btn{ background: url(../images/course/hwork_icon.png) -2px -58px no-repeat !important; height:20px; display:block; padding-left:23px; color:#888888; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;} a.group-btn{ background: url(../images/course/hwork_icon.png) -2px -58px no-repeat !important; height:20px; display:block; padding-left:23px; color:#888888; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
a.program-btn{background: url(../images/homepage_icon.png) -86px -393px no-repeat; width:30px; height:20px; display:block; padding-left:23px; color:#888888;} a.program-btn{background: url(../images/homepage_icon.png) -86px -393px no-repeat; width:30px; height:20px; display:block; padding-left:23px; color:#888888;}
/*视频播放默认图标*/
.mediaIco{margin: 30px 0 30px 20px;}

File diff suppressed because it is too large Load Diff

@ -1,290 +1,290 @@
.git_usr_title{ .git_usr_title{
margin: 0px; margin: 0px;
overflow: hidden; overflow: hidden;
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
text-overflow: ellipsis; text-overflow: ellipsis;
vertical-align: top; vertical-align: top;
white-space: nowrap; white-space: nowrap;
padding: 0px 10px; padding: 0px 10px;
} }
.overall-summary{ .overall-summary{
position: relative; position: relative;
margin-bottom: 10px; margin-bottom: 10px;
border: 1px solid #DDD; border: 1px solid #DDD;
border-radius: 3px; border-radius: 3px;
} }
.overall-summary .overall-summary-bottomless{ .overall-summary .overall-summary-bottomless{
margin-bottom: 0px; margin-bottom: 0px;
border-bottom: 0px none; border-bottom: 0px none;
border-radius: 3px 3px 0px 0px; border-radius: 3px 3px 0px 0px;
} }
.stats-switcher-viewport{ .stats-switcher-viewport{
height: 38px; height: 38px;
overflow: hidden; overflow: hidden;
} }
.stats-switcher-viewport .stats-switcher-wrapper{ .stats-switcher-viewport .stats-switcher-wrapper{
position: relative; position: relative;
top: 0px; top: 0px;
transition: top 0.25s ease-in-out 0s; transition: top 0.25s ease-in-out 0s;
} }
.numbers-summary{ .numbers-summary{
display: table; display: table;
width: 100%; width: 100%;
table-layout: fixed; table-layout: fixed;
margin-top: 9px; margin-top: 9px;
} }
.numbers-summary li{ .numbers-summary li{
display: table-cell; display: table-cell;
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
} }
.numbers-summary .octicon { .numbers-summary .octicon {
color: #999; color: #999;
} }
.text-emphasized { .text-emphasized {
font-weight: bold; font-weight: bold;
color: #333; color: #333;
} }
.octicon .octicon-history { .octicon .octicon-history {
font: 16px/1 octicons; font: 16px/1 octicons;
display: inline-block; display: inline-block;
text-decoration: none; text-decoration: none;
text-rendering: auto; text-rendering: auto;
-moz-user-select: none; -moz-user-select: none;
} }
.select2-container { .select2-container {
margin: 0px; margin: 0px;
position: relative; position: relative;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
} }
.select2-container .select2-choice { .select2-container .select2-choice {
display: block; display: block;
height: 26px; height: 26px;
padding: 0px 0px 0px 8px; padding: 0px 0px 0px 8px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
border: 1px solid #AAA; border: 1px solid #AAA;
white-space: nowrap; white-space: nowrap;
line-height: 26px; line-height: 26px;
color: #444; color: #444;
text-decoration: none; text-decoration: none;
border-radius: 4px; border-radius: 4px;
background-clip: padding-box; background-clip: padding-box;
-moz-user-select: none; -moz-user-select: none;
background-color: #FFF; background-color: #FFF;
background-image: linear-gradient(to top, #EEE 0%, #FFF 50%); background-image: linear-gradient(to top, #EEE 0%, #FFF 50%);
} }
.repository-title-dec{ .repository-title-dec{
color: #fff !important; color: #fff !important;
} }
.repository-url{ .repository-url{
color: #2D2D2D; color: #2D2D2D;
margin: auto 0px; margin: auto 0px;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 10px; margin-top: 10px;
} }
.center{ .center{
text-align: center; text-align: center;
} }
.light-well { .light-well {
background: #F9F9F9 none repeat scroll 0% 0%; background: #F9F9F9 none repeat scroll 0% 0%;
padding: 15px; padding: 15px;
} }
.page-title { .page-title {
margin-top: 0px; margin-top: 0px;
line-height: 1.5; line-height: 1.5;
font-weight: bold; font-weight: bold;
margin-bottom: 5px; margin-bottom: 5px;
font-size: 18px; font-size: 18px;
} }
/************* CodeRay styles *************/ /************* CodeRay styles *************/
.syntaxhl div {display: inline;} .syntaxhl div {display: inline;}
.syntaxhl .line-numbers {padding: 2px 4px 2px 4px; background-color: #eee; margin:0px 5px 0px 0px;} .syntaxhl .line-numbers {padding: 2px 4px 2px 4px; background-color: #eee; margin:0px 5px 0px 0px;}
.syntaxhl .code pre { overflow: auto } .syntaxhl .code pre { overflow: auto }
.syntaxhl .debug { color: white !important; background: blue !important; } .syntaxhl .debug { color: white !important; background: blue !important; }
.syntaxhl .annotation { color:#007 } .syntaxhl .annotation { color:#007 }
.syntaxhl .attribute-name { color:#b48 } .syntaxhl .attribute-name { color:#b48 }
.syntaxhl .attribute-value { color:#700 } .syntaxhl .attribute-value { color:#700 }
.syntaxhl .binary { color:#509 } .syntaxhl .binary { color:#509 }
.syntaxhl .char .content { color:#D20 } .syntaxhl .char .content { color:#D20 }
.syntaxhl .char .delimiter { color:#710 } .syntaxhl .char .delimiter { color:#710 }
.syntaxhl .char { color:#D20 } .syntaxhl .char { color:#D20 }
.syntaxhl .class { color:#258; font-weight:bold } .syntaxhl .class { color:#258; font-weight:bold }
.syntaxhl .class-variable { color:#369 } .syntaxhl .class-variable { color:#369 }
.syntaxhl .color { color:#0A0 } .syntaxhl .color { color:#0A0 }
.syntaxhl .comment { color:#385 } .syntaxhl .comment { color:#385 }
.syntaxhl .comment .char { color:#385 } .syntaxhl .comment .char { color:#385 }
.syntaxhl .comment .delimiter { color:#385 } .syntaxhl .comment .delimiter { color:#385 }
.syntaxhl .complex { color:#A08 } .syntaxhl .complex { color:#A08 }
.syntaxhl .constant { color:#258; font-weight:bold } .syntaxhl .constant { color:#258; font-weight:bold }
.syntaxhl .decorator { color:#B0B } .syntaxhl .decorator { color:#B0B }
.syntaxhl .definition { color:#099; font-weight:bold } .syntaxhl .definition { color:#099; font-weight:bold }
.syntaxhl .delimiter { color:black } .syntaxhl .delimiter { color:black }
.syntaxhl .directive { color:#088; font-weight:bold } .syntaxhl .directive { color:#088; font-weight:bold }
.syntaxhl .doc { color:#970 } .syntaxhl .doc { color:#970 }
.syntaxhl .doc-string { color:#D42; font-weight:bold } .syntaxhl .doc-string { color:#D42; font-weight:bold }
.syntaxhl .doctype { color:#34b } .syntaxhl .doctype { color:#34b }
.syntaxhl .entity { color:#800; font-weight:bold } .syntaxhl .entity { color:#800; font-weight:bold }
.syntaxhl .error { color:#F00; background-color:#FAA } .syntaxhl .error { color:#F00; background-color:#FAA }
.syntaxhl .escape { color:#666 } .syntaxhl .escape { color:#666 }
.syntaxhl .exception { color:#C00; font-weight:bold } .syntaxhl .exception { color:#C00; font-weight:bold }
.syntaxhl .float { color:#06D } .syntaxhl .float { color:#06D }
.syntaxhl .function { color:#06B; font-weight:bold } .syntaxhl .function { color:#06B; font-weight:bold }
.syntaxhl .global-variable { color:#d70 } .syntaxhl .global-variable { color:#d70 }
.syntaxhl .hex { color:#02b } .syntaxhl .hex { color:#02b }
.syntaxhl .imaginary { color:#f00 } .syntaxhl .imaginary { color:#f00 }
.syntaxhl .include { color:#B44; font-weight:bold } .syntaxhl .include { color:#B44; font-weight:bold }
.syntaxhl .inline { background-color: hsla(0,0%,0%,0.07); color: black } .syntaxhl .inline { background-color: hsla(0,0%,0%,0.07); color: black }
.syntaxhl .inline-delimiter { font-weight: bold; color: #666 } .syntaxhl .inline-delimiter { font-weight: bold; color: #666 }
.syntaxhl .instance-variable { color:#33B } .syntaxhl .instance-variable { color:#33B }
.syntaxhl .integer { color:#06D } .syntaxhl .integer { color:#06D }
.syntaxhl .key .char { color: #60f } .syntaxhl .key .char { color: #60f }
.syntaxhl .key .delimiter { color: #404 } .syntaxhl .key .delimiter { color: #404 }
.syntaxhl .key { color: #606 } .syntaxhl .key { color: #606 }
.syntaxhl .keyword { color:#939; font-weight:bold } .syntaxhl .keyword { color:#939; font-weight:bold }
.syntaxhl .label { color:#970; font-weight:bold } .syntaxhl .label { color:#970; font-weight:bold }
.syntaxhl .local-variable { color:#963 } .syntaxhl .local-variable { color:#963 }
.syntaxhl .namespace { color:#707; font-weight:bold } .syntaxhl .namespace { color:#707; font-weight:bold }
.syntaxhl .octal { color:#40E } .syntaxhl .octal { color:#40E }
.syntaxhl .operator { } .syntaxhl .operator { }
.syntaxhl .predefined { color:#369; font-weight:bold } .syntaxhl .predefined { color:#369; font-weight:bold }
.syntaxhl .predefined-constant { color:#069 } .syntaxhl .predefined-constant { color:#069 }
.syntaxhl .predefined-type { color:#0a5; font-weight:bold } .syntaxhl .predefined-type { color:#0a5; font-weight:bold }
.syntaxhl .preprocessor { color:#579 } .syntaxhl .preprocessor { color:#579 }
.syntaxhl .pseudo-class { color:#00C; font-weight:bold } .syntaxhl .pseudo-class { color:#00C; font-weight:bold }
.syntaxhl .regexp .content { color:#808 } .syntaxhl .regexp .content { color:#808 }
.syntaxhl .regexp .delimiter { color:#404 } .syntaxhl .regexp .delimiter { color:#404 }
.syntaxhl .regexp .modifier { color:#C2C } .syntaxhl .regexp .modifier { color:#C2C }
.syntaxhl .regexp { background-color:hsla(300,100%,50%,0.06); } .syntaxhl .regexp { background-color:hsla(300,100%,50%,0.06); }
.syntaxhl .reserved { color:#080; font-weight:bold } .syntaxhl .reserved { color:#080; font-weight:bold }
.syntaxhl .shell .content { color:#2B2 } .syntaxhl .shell .content { color:#2B2 }
.syntaxhl .shell .delimiter { color:#161 } .syntaxhl .shell .delimiter { color:#161 }
.syntaxhl .shell { background-color:hsla(120,100%,50%,0.06); } .syntaxhl .shell { background-color:hsla(120,100%,50%,0.06); }
.syntaxhl .string .char { color: #46a } .syntaxhl .string .char { color: #46a }
.syntaxhl .string .content { color: #46a } .syntaxhl .string .content { color: #46a }
.syntaxhl .string .delimiter { color: #46a } .syntaxhl .string .delimiter { color: #46a }
.syntaxhl .string .modifier { color: #46a } .syntaxhl .string .modifier { color: #46a }
.syntaxhl .symbol .content { color:#d33 } .syntaxhl .symbol .content { color:#d33 }
.syntaxhl .symbol .delimiter { color:#d33 } .syntaxhl .symbol .delimiter { color:#d33 }
.syntaxhl .symbol { color:#d33 } .syntaxhl .symbol { color:#d33 }
.syntaxhl .tag { color:#070 } .syntaxhl .tag { color:#070 }
.syntaxhl .type { color:#339; font-weight:bold } .syntaxhl .type { color:#339; font-weight:bold }
.syntaxhl .value { color: #088; } .syntaxhl .value { color: #088; }
.syntaxhl .variable { color:#037 } .syntaxhl .variable { color:#037 }
.syntaxhl .insert { background: hsla(120,100%,50%,0.12) } .syntaxhl .insert { background: hsla(120,100%,50%,0.12) }
.syntaxhl .delete { background: hsla(0,100%,50%,0.12) } .syntaxhl .delete { background: hsla(0,100%,50%,0.12) }
.syntaxhl .change { color: #bbf; background: #007; } .syntaxhl .change { color: #bbf; background: #007; }
.syntaxhl .head { color: #f8f; background: #505 } .syntaxhl .head { color: #f8f; background: #505 }
.syntaxhl .head .filename { color: white; } .syntaxhl .head .filename { color: white; }
.syntaxhl .delete .eyecatcher { background-color: hsla(0,100%,50%,0.2); border: 1px solid hsla(0,100%,45%,0.5); margin: -1px; border-bottom: none; border-top-left-radius: 5px; border-top-right-radius: 5px; } .syntaxhl .delete .eyecatcher { background-color: hsla(0,100%,50%,0.2); border: 1px solid hsla(0,100%,45%,0.5); margin: -1px; border-bottom: none; border-top-left-radius: 5px; border-top-right-radius: 5px; }
.syntaxhl .insert .eyecatcher { background-color: hsla(120,100%,50%,0.2); border: 1px solid hsla(120,100%,25%,0.5); margin: -1px; border-top: none; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } .syntaxhl .insert .eyecatcher { background-color: hsla(120,100%,50%,0.2); border: 1px solid hsla(120,100%,25%,0.5); margin: -1px; border-top: none; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }
.syntaxhl .insert .insert { color: #0c0; background:transparent; font-weight:bold } .syntaxhl .insert .insert { color: #0c0; background:transparent; font-weight:bold }
.syntaxhl .delete .delete { color: #c00; background:transparent; font-weight:bold } .syntaxhl .delete .delete { color: #c00; background:transparent; font-weight:bold }
.syntaxhl .change .change { color: #88f } .syntaxhl .change .change { color: #88f }
.syntaxhl .head .head { color: #f4f } .syntaxhl .head .head { color: #f4f }
/***** Media print specific styles *****/ /***** Media print specific styles *****/
@media print { @media print {
#top-menu, #header, #main-menu, #sidebar, #footer, .contextual, .other-formats { display:none; } #top-menu, #header, #main-menu, #sidebar, #footer, .contextual, .other-formats { display:none; }
#main { background: #fff; } #main { background: #fff; }
#content { width: 99%; margin: 0; padding: 0; border: 0; background: #fff; overflow: visible !important;} #content { width: 99%; margin: 0; padding: 0; border: 0; background: #fff; overflow: visible !important;}
#wiki_add_attachment { display:none; } #wiki_add_attachment { display:none; }
.hide-when-print { display: none; } .hide-when-print { display: none; }
.autoscroll {overflow-x: visible;} .autoscroll {overflow-x: visible;}
table.list {margin-top:0.5em;} table.list {margin-top:0.5em;}
table.list th, table.list td {border: 1px solid #aaa;} table.list th, table.list td {border: 1px solid #aaa;}
} }
.cloneUrl {width:235px; height:21px; border:1px solid #dddddd; outline:none; overflow:hidden; line-height:21px; resize:none;white-space:nowrap;} .cloneUrl {width:235px; height:21px; border:1px solid #dddddd; outline:none; overflow:hidden; line-height:21px; resize:none;white-space:nowrap;}
.cloneUrl2 {width:328px; height:21px; border:1px solid #dddddd; outline:none; overflow:hidden; line-height:21px; resize:none;white-space:nowrap;} .cloneUrl2 {width:328px; height:21px; border:1px solid #dddddd; outline:none; overflow:hidden; line-height:21px; resize:none;white-space:nowrap;}
.clone_btn {width:30px; height:21px; border-top:1px solid #dddddd; border-bottom:1px solid #dddddd; border-right:1px solid #dddddd; outline:none; float:left; background-image:linear-gradient(#FCFCFC, #EEE); text-align:center;} .clone_btn {width:30px; height:21px; border-top:1px solid #dddddd; border-bottom:1px solid #dddddd; border-right:1px solid #dddddd; outline:none; float:left; background-image:linear-gradient(#FCFCFC, #EEE); text-align:center;}
.vl_btn {height:21px; padding:0px 5px; vertical-align:middle; border:1px solid #dddddd; float:left; line-height:21px; background-image:linear-gradient(#FCFCFC, #EEE);} .vl_btn {height:21px; padding:0px 5px; vertical-align:middle; border:1px solid #dddddd; float:left; line-height:21px; background-image:linear-gradient(#FCFCFC, #EEE);}
.vl_btn_2 {height:21px; padding:0px 5px; vertical-align:middle; border-top:1px solid #dddddd; border-bottom:1px solid #dddddd; border-right:1px solid #dddddd; float:left; line-height:21px;} .vl_btn_2 {height:21px; padding:0px 5px; vertical-align:middle; border-top:1px solid #dddddd; border-bottom:1px solid #dddddd; border-right:1px solid #dddddd; float:left; line-height:21px;}
.recordBanner {width:670px; height:30px; background-color:#f1f1f1; color:#666666; line-height:30px; vertical-align:middle;} .recordBanner {width:670px; height:30px; background-color:#f1f1f1; color:#666666; line-height:30px; vertical-align:middle;}
.vl_copy {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;} .vl_copy {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
.vl_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;} .vl_copy2 {background:url(../images/vlicon/clone_url.png) 0px 0px no-repeat; padding-left:22px;}
.vl_zip {background:url(../images/vlicon/download_icon.png) 0px 0px no-repeat; padding-left:22px;} .vl_zip {background:url(../images/vlicon/download_icon.png) 0px 0px no-repeat; padding-left:22px;}
.vl_fork {background:url(../images/vlicon/fork_icon.png) 0px -2px no-repeat; padding-left:22px;} .vl_fork {background:url(../images/vlicon/fork_icon.png) 0px -2px no-repeat; padding-left:22px;}
.vl_commit {background:url(../images/vlicon/commit_icon.png) 0px -2px no-repeat; padding-left:22px;weight:20px;height: 24px;} .vl_commit {background:url(../images/vlicon/commit_icon.png) 0px -2px no-repeat; padding-left:22px;weight:20px;height: 24px;}
.vl_branch {background:url(../images/vlicon/branch_icon.png) 0px -2px no-repeat; padding-left:22px} .vl_branch {background:url(../images/vlicon/branch_icon.png) 0px -2px no-repeat; padding-left:22px}
.mt1 {margin-top:1px;} .mt1 {margin-top:1px;}
.mt2 {margin-top:2px;} .mt2 {margin-top:2px;}
.commit_content_dec{width: 200px;overflow: hidden; white-space: nowrap;text-overflow: ellipsis;} .commit_content_dec{width: 200px;overflow: hidden; white-space: nowrap;text-overflow: ellipsis;}
/*提交信息列表*/ /*提交信息列表*/
.col-md-10 { .col-md-10 {
width: 100%; width: 100%;
} }
ul.bordered-list { ul.bordered-list {
margin: 5px 0px; margin: 5px 0px;
padding: 0px; padding: 0px;
} }
ul.bordered-list li { ul.bordered-list li {
padding: 5px 0px; padding: 5px 0px;
border-bottom: 1px solid #EEE; border-bottom: 1px solid #EEE;
overflow: hidden; overflow: hidden;
display: block; display: block;
margin: 0px; margin: 0px;
} }
.commits-row ul li.commit { .commits-row ul li.commit {
padding: 8px 0px; padding: 8px 0px;
} }
li.commit .commit-row-title { li.commit .commit-row-title {
font-size: 15px; font-size: 15px;
line-height: 20px; line-height: 20px;
margin-bottom: 2px; margin-bottom: 2px;
} }
li.commit .commit-row-title .str-truncated { li.commit .commit-row-title .str-truncated {
max-width: 70%; max-width: 70%;
} }
.str-truncated { .str-truncated {
display: inline-block; display: inline-block;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
vertical-align: top; vertical-align: top;
white-space: nowrap; white-space: nowrap;
max-width: 82%; max-width: 82%;
} }
li.commit .commit-row-title .commit-row-message { li.commit .commit-row-title .commit-row-message {
color: #444; color: #444;
} }
.pull-right { .pull-right {
float: right; float: right;
color: #777; color: #777;
} }
li.commit .commit-row-title .commit_short_id { li.commit .commit-row-title .commit_short_id {
min-width: 65px; min-width: 65px;
font-family: "Menlo","Liberation Mono","Consolas","DejaVu Sans Mono","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; font-family: "Menlo","Liberation Mono","Consolas","DejaVu Sans Mono","Ubuntu Mono","Courier New","andale mono","lucida console",monospace;
} }
li.commit .commit-row-info { li.commit .commit-row-info {
color: #777; color: #777;
line-height: 24px; line-height: 24px;
font-size: 13px; font-size: 13px;
} }
li.commit .commit-row-info a { li.commit .commit-row-info a {
color: #777; color: #777;
} }
li.commit .commit-row-info .committed_ago { li.commit .commit-row-info .committed_ago {
display: inline-block; display: inline-block;
} }
.rep_history_title{ .rep_history_title{
font-weight: bold; font-weight: bold;
font-size: 13px; font-size: 13px;
color: #7F7F7F; color: #7F7F7F;
padding-bottom: 10px; padding-bottom: 10px;
} }
.rep_history_grey{ .rep_history_grey{
color: #7F7F7F; color: #7F7F7F;
} }
.rep_mail_name{max-width: 150px; overflow: hidden; text-overflow: ellipsis;} .rep_mail_name{max-width: 150px; overflow: hidden; text-overflow: ellipsis;}

@ -1,68 +1,68 @@
/* 2015-06-26 */ /* 2015-06-26 */
.topbar_info02{ margin:5px 10px;width:480px; } .topbar_info02{ margin:5px 10px;width:480px; }
.topbar_info02 p{color: #7f7f7f;} .topbar_info02 p{color: #7f7f7f;}
.search{ margin-top:8px; float:right; margin-right:5px;} .search{ margin-top:8px; float:right; margin-right:5px;}
/*信息*/ /*信息*/
.project_info{ background:#fff; padding:10px; padding-right:0px;width:222px; padding-right:8px; margin-bottom:10px;} .project_info{ background:#fff; padding:10px; padding-right:0px;width:222px; padding-right:8px; margin-bottom:10px;}
.pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;} .pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;}
.pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;} .pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;}
.pr_info_logo:hover{ border:1px solid #64bdd9; } .pr_info_logo:hover{ border:1px solid #64bdd9; }
.pr_info_join{} .pr_info_join{}
a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#64bdd9; float:left; } a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#64bdd9; float:left; }
a:hover.pr_join_a{ background:#41a8c8;} a:hover.pr_join_a{ background:#41a8c8;}
.pr_join_span{color: #fff; display:block; padding:0 5px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background: #CCC;} .pr_join_span{color: #fff; display:block; padding:0 5px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background: #CCC;}
.pr_setting{ display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_setting{ display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_copy{ display:block; background:url(../images/leftside.png) -1px -23px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_copy{ display:block; background:url(../images/leftside.png) -1px -23px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_add{display:block; background:url(../images/leftside.png) 0px -71px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_add{display:block; background:url(../images/leftside.png) 0px -71px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_arrow{display:block; background:url(../images/leftside.png) 0px -90px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_arrow{display:block; background:url(../images/leftside.png) 0px -90px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_info_name{ color:#3e4040; font-size:14px; line-height:1.5;} .pr_info_name{ color:#3e4040; font-size:14px; line-height:1.5;}
.pr_info_name:hover{ color:#3ca5c6;} .pr_info_name:hover{ color:#3ca5c6;}
.pr_info_score{ font-size:14px; color:#3e4040; } .pr_info_score{ font-size:14px; color:#3e4040; }
.pr_info_score a{ color:#ff7143;} .pr_info_score a{ color:#ff7143;}
.pr_info_score a:hover{ color:#64bdd9;} .pr_info_score a:hover{ color:#64bdd9;}
.img_private{ background:url(../images/img_project.png) 0 0 no-repeat; width:33px; height:16px; color:#fff; font-size:12px; padding-left:7px; } .img_private{ background:url(../images/img_project.png) 0 0 no-repeat; width:33px; height:16px; color:#fff; font-size:12px; padding-left:7px; }
.info_foot_num{ color:#3ca5c6; } .info_foot_num{ color:#3ca5c6; }
.pr_info_foot{ color:#7f7f7f; margin-top:5px; } .pr_info_foot{ color:#7f7f7f; margin-top:5px; }
.info_foot_num:hover{ color:#2390b2;} .info_foot_num:hover{ color:#2390b2;}
.info_box{background:#fff; padding:10px;width:220px; } .info_box{background:#fff; padding:10px;width:220px; }
.info_box ul li{ font-size:12px; color: #3e4040; line-height:1.7;} .info_box ul li{ font-size:12px; color: #3e4040; line-height:1.7;}
/*左侧导航*/ /*左侧导航*/
.subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;} .subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;}
.subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;} .subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;}
.subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;} .subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;}
.subNav_jiantou:hover{color:#0781b4; } .subNav_jiantou:hover{color:#0781b4; }
.currentDd{color:#0781b4;} .currentDd{color:#0781b4;}
.currentDt{background-color:#fff;} .currentDt{background-color:#fff;}
.navContent{display: none;border-bottom:solid 1px #e5e3da; } .navContent{display: none;border-bottom:solid 1px #e5e3da; }
.navContent li a{display:block;width:240px;heigh:28px;text-align:center;font-size:12px;line-height:28px;color:#333} .navContent li a{display:block;width:240px;heigh:28px;text-align:center;font-size:12px;line-height:28px;color:#333}
.navContent li a:hover{color:#fff;background-color:#b3e0ee} .navContent li a:hover{color:#fff;background-color:#b3e0ee}
a.subnav_num{ font-weight:normal; color:#ff7143; font-size:12px;} a.subnav_num{ font-weight:normal; color:#ff7143; font-size:12px;}
a.subnav_green{ background:#28be6c; color:#fff; font-size:12px; font-weight:normal;height:18px; padding:0px 5px; padding-top:2px; display:block; margin-top:2px; margin-bottom:5px; float:right; margin-right:5px;} a.subnav_green{ background:#28be6c; color:#fff; font-size:12px; font-weight:normal;height:18px; padding:0px 5px; padding-top:2px; display:block; margin-top:2px; margin-bottom:5px; float:right; margin-right:5px;}
a:hover.subnav_green{ background:#14ad5a;} a:hover.subnav_green{ background:#14ad5a;}
/*简介*/ /*简介*/
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;} .project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;}
.course_description{max-height: 420px;overflow:hidden; word-break: break-all;word-wrap: break-word;line-height: 20px;} .course_description{max-height: 420px;overflow:hidden; word-break: break-all;word-wrap: break-word;line-height: 20px;}
.course_description_none{max-height: none;} .course_description_none{max-height: none;}
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;} .lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;}
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;} .lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}
/****标签(和资源库的tag样式一致)***/ /****标签(和资源库的tag样式一致)***/
.project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;} .project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;}
.project_Label_New {width:218px; padding-left:10px; background:#fff; margin-top:15px; margin-bottom:10px;} .project_Label_New {width:218px; padding-left:10px; background:#fff; margin-top:15px; margin-bottom:10px;}
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;} a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
.submit{height:21px;border:0; cursor:pointer; background:url(images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; } .submit{height:21px;border:0; cursor:pointer; background:url(images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
.isTxt{background:#fbfbfb url(images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;} .isTxt{background:#fbfbfb url(images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all } .re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; word-wrap: break-word;word-break: break-all }
.re_tag a{ color:#0d90c3;} .re_tag a{ color:#0d90c3;}
.tag_h{ } .tag_h{ }
.tag_h span,.tag_h a{ margin-bottom:5px;} .tag_h span,.tag_h a{ margin-bottom:5px;}

@ -1,155 +1,155 @@
#RSide{ min-height:1px;} #RSide{ min-height:1px;}
/* 左侧信息*/ /* 左侧信息*/
.users_info{background:#fff; padding:10px; width:230px; padding-right:0px; margin-bottom:10px; } .users_info{background:#fff; padding:10px; width:230px; padding-right:0px; margin-bottom:10px; }
.pic_head{ width:214px; height:214px; border:1px solid #cbcbcb; padding:2px; position:relative;} .pic_head{ width:214px; height:214px; border:1px solid #cbcbcb; padding:2px; position:relative;}
.pic_head:hover{border:1px solid #64bdd9;} .pic_head:hover{border:1px solid #64bdd9;}
.usersphoto_edit{ position:absolute; left:198px; top:200px;} .usersphoto_edit{ position:absolute; left:198px; top:200px;}
.icon_male{ background:url(../images/pic_uersall.png) 0 0 no-repeat; width:15px; height:15px;} .icon_male{ background:url(../images/pic_uersall.png) 0 0 no-repeat; width:15px; height:15px;}
.icon_female{ background:url(../images/pic_uersall.png) 0 -24px no-repeat; width:15px; height:15px;} .icon_female{ background:url(../images/pic_uersall.png) 0 -24px no-repeat; width:15px; height:15px;}
.pf_intro{ width:222px; margin-top:5px; color:#696969;word-break: break-all; } .pf_intro{ width:222px; margin-top:5px; color:#696969;word-break: break-all; }
.leftbox{ width:230px; padding:10px; padding-right:0px; padding-bottom:5px;background:#fff; margin-bottom:10px; margin-right:10px;} .leftbox{ width:230px; padding:10px; padding-right:0px; padding-bottom:5px;background:#fff; margin-bottom:10px; margin-right:10px;}
.pic_members{ display:block; width:38px; height:38px; border:1px solid #e9edf0; margin-right:5px; margin-bottom:5px;float:left;} .pic_members{ display:block; width:38px; height:38px; border:1px solid #e9edf0; margin-right:5px; margin-bottom:5px;float:left;}
.pic_members:hover{border:1px solid #c9c9c9;} .pic_members:hover{border:1px solid #c9c9c9;}
/*新建*/ /*新建*/
.top_new{ height:26px; border-bottom:10px solid #eaebed; padding:10px; background:#fff; float:left; margin-left:10px; width:730px; } .top_new{ height:26px; border-bottom:10px solid #eaebed; padding:10px; background:#fff; float:left; margin-left:10px; width:730px; }
.top_new_bg{ background:url(../images/pic_uersall.png) -43px 3px no-repeat; height:26px; width:260px;} .top_new_bg{ background:url(../images/pic_uersall.png) -43px 3px no-repeat; height:26px; width:260px;}
.top_newcourses_bg{ background:url(../images/pic_uersall.png) -43px -29px no-repeat; height:28px; width:260px;} .top_newcourses_bg{ background:url(../images/pic_uersall.png) -43px -29px no-repeat; height:28px; width:260px;}
.top_newproject_bg{ background:url(../images/pic_uersall.png) -43px -56px no-repeat; height:26px; width:260px;} .top_newproject_bg{ background:url(../images/pic_uersall.png) -43px -56px no-repeat; height:26px; width:260px;}
.newbtn{ height:24px; background:#18ca74; color:#fff; font-size:14px; padding:2px 12px 0 12px;} .newbtn{ height:24px; background:#18ca74; color:#fff; font-size:14px; padding:2px 12px 0 12px;}
.newbtn:hover{background: #14ad5a;} .newbtn:hover{background: #14ad5a;}
a.newbtn_add{ display:block; background:url(../images/pic_uersall.png) -265px 3px no-repeat; height:20px; width:15px;} a.newbtn_add{ display:block; background:url(../images/pic_uersall.png) -265px 3px no-repeat; height:20px; width:15px;}
a.newbtn_t{ font-size:14px; font-weight:bold; color:#fff;} a.newbtn_t{ font-size:14px; font-weight:bold; color:#fff;}
/*留言*/ /*留言*/
a.icon_face{background:url(../images/public_icon.png) 0px -671px no-repeat; display:block; height:25px; width:40px; padding-left:25px; padding-top:3px; } a.icon_face{background:url(../images/public_icon.png) 0px -671px no-repeat; display:block; height:25px; width:40px; padding-left:25px; padding-top:3px; }
a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repeat; } a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repeat; }
.inputUsers_message{ border:1px solid #d2d2d2; width:718px; height:48px; color:#666; padding:5px; margin-bottom:5px;} .inputUsers_message{ border:1px solid #d2d2d2; width:718px; height:48px; color:#666; padding:5px; margin-bottom:5px;}
.inputUsers_message02{ border:1px solid #d2d2d2; width:618px; height:26px; color:#666; padding:5px; margin-bottom:5px; } .inputUsers_message02{ border:1px solid #d2d2d2; width:618px; height:26px; color:#666; padding:5px; margin-bottom:5px; }
.message_list_box{ background:#f5f5f5; margin-top: 10px;} .message_list_box{ background:#f5f5f5; margin-top: 10px;}
.users_pic{ width:46px; height:46px; border:1px solid #e3e3e3;} .users_pic{ width:46px; height:46px; border:1px solid #e3e3e3;}
.users_pic:hover{ border:1px solid #a5a5a5;} .users_pic:hover{ border:1px solid #a5a5a5;}
.users_pic_sub{width:32px; height:32px; border:1px solid #e3e3e3;} .users_pic_sub{width:32px; height:32px; border:1px solid #e3e3e3;}
.users_pic_sub:hover{ border:1px solid #a5a5a5;} .users_pic_sub:hover{ border:1px solid #a5a5a5;}
.massage_txt{ max-width:360px; color: #666;word-break:break-all;} .massage_txt{ max-width:360px; color: #666;word-break:break-all;}
.massage_time{ color:#8d8d8d; margin-top:5px;} .massage_time{ color:#8d8d8d; margin-top:5px;}
.message_list{ border-bottom:1px dashed #c9c9c9; margin-bottom:10px;color: #5f5f5f;} .message_list{ border-bottom:1px dashed #c9c9c9; margin-bottom:10px;color: #5f5f5f;}
.message_list_more{ text-align:center; width:720px;} .message_list_more{ text-align:center; width:720px;}
/*课程动态*/ /*课程动态*/
.line_box{ width:728px; border:1px solid #d9d9d9; padding-bottom:10px;} .line_box{ width:728px; border:1px solid #d9d9d9; padding-bottom:10px;}
.users_courses_list{ height:24px; border-bottom:1px dashed #CCC; margin-bottom:10px;} .users_courses_list{ height:24px; border-bottom:1px dashed #CCC; margin-bottom:10px;}
.users_coursename{max-width:135px; font-weight:bold; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; margin-right:5px; } .users_coursename{max-width:135px; font-weight:bold; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; margin-right:5px; }
.course_name{max-width:60px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .course_name{max-width:60px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.c_grey{ color:#8d8d8d;} .c_grey{ color:#8d8d8d;}
.users_courses_txt{max-width:330px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .users_courses_txt{max-width:330px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.users_top{ height:39px; border-bottom:1px solid #d9d9d9; margin-bottom:10px;} .users_top{ height:39px; border-bottom:1px solid #d9d9d9; margin-bottom:10px;}
.users_h4{border-bottom:1px solid #d9d9d9; height:29px; padding:10px 0 0 10px; margin-bottom:10px; } .users_h4{border-bottom:1px solid #d9d9d9; height:29px; padding:10px 0 0 10px; margin-bottom:10px; }
/*弹框*/ /*弹框*/
.white_content_users{display:none;position:fixed;top:45%;left:45%;width:210px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;} .white_content_users{display:none;position:fixed;top:45%;left:45%;width:210px;height: auto; margin-bottom:20px;padding:10px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}
a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;} a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
/*我的课程*/ /*我的课程*/
.courses_top{ height:27px; border-bottom:3px solid #ebebeb;} .courses_top{ height:27px; border-bottom:3px solid #ebebeb;}
.courses_h2{ font-size:16px; font-weight:bold; color:#64bddb; border-bottom:3px solid #64bddb; padding-bottom:3px; padding-right:3px;} .courses_h2{ font-size:16px; font-weight:bold; color:#64bddb; border-bottom:3px solid #64bddb; padding-bottom:3px; padding-right:3px;}
.courses_select{} .courses_select{}
a.select_btn{ border:1px solid #acacac; padding:0px 10px; color:#989898; display:block;} a.select_btn{ border:1px solid #acacac; padding:0px 10px; color:#989898; display:block;}
a.select_btn:hover{ background:#64bddb; color:#fff;} a.select_btn:hover{ background:#64bddb; color:#fff;}
a.select_btn_select{ background:#64bddb; color:#fff;} a.select_btn_select{ background:#64bddb; color:#fff;}
.courses_list_pic{ border:1px solid #ede7e9; width:64px; height:64px; padding:1px;} .courses_list_pic{ border:1px solid #ede7e9; width:64px; height:64px; padding:1px;}
.courses_list_pic:hover{border:1px solid #64bdd9;} .courses_list_pic:hover{border:1px solid #64bdd9;}
.courses_list_title{ max-width:500px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .courses_list_title{ max-width:500px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.pic_eye_blue{display:block; background:url(../images/pic_uersall.png) -372px 3px no-repeat; width:16px; height:15px; } .pic_eye_blue{display:block; background:url(../images/pic_uersall.png) -372px 3px no-repeat; width:16px; height:15px; }
.pic_eye_grey{display:block; background:url(../images/pic_uersall.png) -372px -10px no-repeat; width:16px; height:15px; } .pic_eye_grey{display:block; background:url(../images/pic_uersall.png) -372px -10px no-repeat; width:16px; height:15px; }
.td_w70{ width:70px;} .td_w70{ width:70px;}
.td_w60{ width:60px;} .td_w60{ width:60px;}
.td_w110{ width:110px;} .td_w110{ width:110px;}
.mt20{ margin-top:20px;} .mt20{ margin-top:20px;}
.courses_list{ padding-bottom:10px; } .courses_list{ padding-bottom:10px; }
.courses_list_table{ color:#6e6e6e;} .courses_list_table{ color:#6e6e6e;}
/****翻页***/ /****翻页***/
.wlist{float:right;} .wlist{float:right;}
.wlist li{float:left;} .wlist li{float:left;}
.wlist a{ float:left; border:1px solid #64bdd9; padding:0 5px; margin-left:3px; color:#64bdd9;} .wlist a{ float:left; border:1px solid #64bdd9; padding:0 5px; margin-left:3px; color:#64bdd9;}
.wlist a:hover{border:1px solid #64bdd9; background-color:#64bdd9; color:#fff; text-decoration:none;} .wlist a:hover{border:1px solid #64bdd9; background-color:#64bdd9; color:#fff; text-decoration:none;}
.wlist_select a { background-color:#48aac9; color:#fff;} .wlist_select a { background-color:#48aac9; color:#fff;}
/* TAB 切换效果 */ /* TAB 切换效果 */
.users_tb_{ border-bottom:3px solid #CCC; height:26px; } .users_tb_{ border-bottom:3px solid #CCC; height:26px; }
.users_tb_ ul{height:26px; } .users_tb_ ul{height:26px; }
.users_tb_ li{float:left;height:26px;width: 90px;cursor:pointer; font-size:14px; text-align:center; } .users_tb_ li{float:left;height:26px;width: 90px;cursor:pointer; font-size:14px; text-align:center; }
/* 控制显示与隐藏css类 */ /* 控制显示与隐藏css类 */
.users_normaltab { color:#666; } .users_normaltab { color:#666; }
.users_hovertab { color:#64bdd9; border-bottom:3px solid #64bdd9; font-weight:bold;} .users_hovertab { color:#64bdd9; border-bottom:3px solid #64bdd9; font-weight:bold;}
.users_normaltab a { color:#64bdd9 ; } .users_normaltab a { color:#64bdd9 ; }
.users_hovertab a{color:#fff; background-color:#64bdd9; text-decoration:none;} .users_hovertab a{color:#fff; background-color:#64bdd9; text-decoration:none;}
.users_dis{display:block; } .users_dis{display:block; }
.users_undis{display:none;} .users_undis{display:none;}
.users_ctt{ font-size:14px; color:#666; margin-top:10px;} .users_ctt{ font-size:14px; color:#666; margin-top:10px;}
.setting_left{ width:115px; text-align:right; float:left;} .setting_left{ width:115px; text-align:right; float:left;}
.setting_left li{ height:28px;line-height:28px;} .setting_left li{ height:28px;line-height:28px;}
.setting_right{width:500px; text-align:left; float:left; margin-left:8px;} .setting_right{width:500px; text-align:left; float:left; margin-left:8px;}
.setting_right li{ height:28px;line-height:28px;} .setting_right li{ height:28px;line-height:28px;}
.users_ctt ul li{ margin-bottom:10px;} .users_ctt ul li{ margin-bottom:10px;}
.users_ctt input,.users_ctt select,.users_ctt textarea{ border:1px solid #CCC;} .users_ctt input,.users_ctt select,.users_ctt textarea{ border:1px solid #CCC;}
.users_ctt input,.users_ctt select,.users_ctt option{ height:26px;} .users_ctt input,.users_ctt select,.users_ctt option{ height:26px;}
.users_ctt input,.users_ctt textarea{ margin-left:2px;} .users_ctt input,.users_ctt textarea{ margin-left:2px;}
/*.users_ctt textarea{ margin-bottom:nor;}*/ /*.users_ctt textarea{ margin-bottom:nor;}*/
.w450{ width:450px;} .w450{ width:450px;}
.w210{ width:200px;} .w210{ width:200px;}
.w70{ width:70px;} .w70{ width:70px;}
.h200{ height:200px;} .h200{ height:200px;}
/* 个人主页*/ /* 个人主页*/
a.edit_btn{display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:33px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;} a.edit_btn{display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:33px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
a:hover.edit_btn{ color:#ff5722;} a:hover.edit_btn{ color:#ff5722;}
a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;} a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
a:hover.gz_btn{ color:#ff5722;} a:hover.gz_btn{ color:#ff5722;}
a.qx_btn{display:block; background:url(../images/pic_uersall.png) -318px -47px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;} a.qx_btn{display:block; background:url(../images/pic_uersall.png) -318px -47px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
a:hover.qx_btn{color:#64bdd9;} a:hover.qx_btn{color:#64bdd9;}
a.c_lgrey{ color:#CCC;} a.c_lgrey{ color:#CCC;}
a:hover.c_lgrey{ color:#3ca5c6;} a:hover.c_lgrey{ color:#3ca5c6;}
.leftbox_ul_left{ width:60px; float:left; text-align:right; } .leftbox_ul_left{ width:60px; float:left; text-align:right; }
.leftbox_ul_right{ width:155px; float:left; margin-left:10px; } .leftbox_ul_right{ width:155px; float:left; margin-left:10px; }
.leftbox_ul_left li,.leftbox_ul_right li{ margin-bottom:5px;} .leftbox_ul_left li,.leftbox_ul_right li{ margin-bottom:5px;}
.c_dgrey{ color:#696969;} .c_dgrey{ color:#696969;}
.home_courses_list{ width:364px; margin-bottom:10px; } .home_courses_list{ width:364px; margin-bottom:10px; }
.home_list_title{ max-width:260px; font-size:14px; font-weight:bold;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .home_list_title{ max-width:260px; font-size:14px; font-weight:bold;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.users_list{ } .users_list{ }
.users_course_intro{ width:530px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .users_course_intro{ width:530px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
/* 20150506上传头像*/ /* 20150506上传头像*/
.uppicBox{ width:265px; height:265px; background:#f2f2f5; float:left; color:#666; text-align:center;} .uppicBox{ width:265px; height:265px; background:#f2f2f5; float:left; color:#666; text-align:center;}
.showpicBox{width:133px; height:250px; background:#f2f2f5; float:left; margin-left:20px; text-align:center; padding-top:15px; color:#666;} .showpicBox{width:133px; height:250px; background:#f2f2f5; float:left; margin-left:20px; text-align:center; padding-top:15px; color:#666;}
.mr15{ margin-right:15px;} .mr15{ margin-right:15px;}
/* 新建作品*/ /* 新建作品*/
.mr8{ margin-right:8px;} .mr8{ margin-right:8px;}
.mt2{ margin-top:2px;} .mt2{ margin-top:2px;}
.fans_sign{ width:560px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .fans_sign{ width:560px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.newhwork_div ul li{ margin-bottom:10px; font-size:14px; color:#666;} .newhwork_div ul li{ margin-bottom:10px; font-size:14px; color:#666;}
.newhwork_div input,.newhwork_div select{ height:26px;border:1px solid #CCC; } .newhwork_div input,.newhwork_div select{ height:26px;border:1px solid #CCC; }
.newhwork_div textarea{border:1px solid #CCC;} .newhwork_div textarea{border:1px solid #CCC;}
.w460{ width:460px;} .w460{ width:460px;}
/* 留言新增*/ /* 留言新增*/
.mes_box{ width:580px;} .mes_box{ width:580px;}
.mes_box02{ margin-left:50px; border-top:1px dashed #c9c9c9; padding-top:10px;margin-bottom: 10px;} .mes_box02{ margin-left:50px; border-top:1px dashed #c9c9c9; padding-top:10px;margin-bottom: 10px;}
.mes_box02_info{ width:540px; margin-left:5px;} .mes_box02_info{ width:540px; margin-left:5px;}
.users_r_top{ width:730px; height:40px; background:#eaeaea; margin-bottom:10px;} .users_r_top{ width:730px; height:40px; background:#eaeaea; margin-bottom:10px;}
.users_r_h2{background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;} .users_r_h2{background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
/*a.hidepic>img{display:none;}*/ /*a.hidepic>img{display:none;}*/
/*div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}*/ /*div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}*/
/*span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}*/ /*span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}*/
/*span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}*/ /*span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}*/
/*div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}*/ /*div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}*/
/*span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}*/ /*span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}*/
/*span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}*/ /*span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}*/
/*div.ke-toolbar .ke-outline{border:none;}*/ /*div.ke-toolbar .ke-outline{border:none;}*/
/*.cr{clear: right;}*/ /*.cr{clear: right;}*/
div.content{padding-top:10px;} div.content{padding-top:10px;}
.pcontent>.school_list,.content>.school_list { padding-left: 5px;} .pcontent>.school_list,.content>.school_list { padding-left: 5px;}
/*151231留言样式*/ /*151231留言样式*/
.messageWrap {width:658px; margin-left:10px;} .messageWrap {width:658px; margin-left:10px;}
.mesWrap2{ margin-left:60px; border-bottom:1px dashed #c9c9c9; padding-top:10px;} .mesWrap2{ margin-left:60px; border-bottom:1px dashed #c9c9c9; padding-top:10px;}
.mesContent2{width:613px;} .mesContent2{width:613px;}
.leaveMes {width:651px; height:50px; resize:none; border:1px solid #dddddd;} .leaveMes {width:651px; height:50px; resize:none; border:1px solid #dddddd;}
.mesSwitch {background:url(../images/public_icon.png) -4px -780px no-repeat; width:15px; height:18px; display:inline-block;} .mesSwitch {background:url(../images/public_icon.png) -4px -780px no-repeat; width:15px; height:18px; display:inline-block;}
.pr {position:relative;} .pr {position:relative;}

@ -1,5 +1,5 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment')) require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment'))
require 'delayed/command' require 'delayed/command'
Delayed::Command.new(ARGV).daemonize Delayed::Command.new(ARGV).daemonize

@ -1,5 +1,5 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe BlogCommentsController, :type => :controller do RSpec.describe BlogCommentsController, :type => :controller do
end end

@ -1,5 +1,5 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe BlogsController, :type => :controller do RSpec.describe BlogsController, :type => :controller do
end end

@ -1,5 +1,5 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe OrgCoursesController, :type => :controller do RSpec.describe OrgCoursesController, :type => :controller do
end end

@ -1,5 +1,5 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe OrgDocumentCommentController, :type => :controller do RSpec.describe OrgDocumentCommentController, :type => :controller do
end end

@ -1,5 +1,5 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe OrgMemberController, :type => :controller do RSpec.describe OrgMemberController, :type => :controller do
end end

@ -1,5 +1,5 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe OrgProjectsController, :type => :controller do RSpec.describe OrgProjectsController, :type => :controller do
end end

@ -1,5 +1,5 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe OrgSubfieldsController, :type => :controller do RSpec.describe OrgSubfieldsController, :type => :controller do
end end

@ -1,5 +1,5 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe OrganizationsController, :type => :controller do RSpec.describe OrganizationsController, :type => :controller do
end end

@ -1,5 +1,5 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe ShieldActivitiesController, :type => :controller do RSpec.describe ShieldActivitiesController, :type => :controller do
end end

@ -1,5 +1,5 @@
require 'rails_helper' require 'rails_helper'
RSpec.describe SystemMessagesController, :type => :controller do RSpec.describe SystemMessagesController, :type => :controller do
end end

@ -1,12 +1,12 @@
# Read about factories at https://github.com/thoughtbot/factory_girl # Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do FactoryGirl.define do
factory :at_message do factory :at_message do
user nil user nil
at_message_id 1 at_message_id 1
at_message_type "MyString" at_message_type "MyString"
viewed false viewed false
container_type "MyString" container_type "MyString"
container_id 1 container_id 1
end end
end end

@ -1,6 +1,6 @@
# Read about factories at https://github.com/thoughtbot/factory_girl # Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do FactoryGirl.define do
factory :attachment_history do factory :attachment_history do
end end
end end

@ -1,10 +1,10 @@
#coding=utf-8 #coding=utf-8
# #
FactoryGirl.define do FactoryGirl.define do
factory :attachment do factory :attachment do
filename "11.gif" filename "11.gif"
filesize 296833 filesize 296833
digest "8a74e086d7716f89bc4fbac0606589c7" digest "8a74e086d7716f89bc4fbac0606589c7"
disk_directory "2015/05" disk_directory "2015/05"
end end
end end

@ -1,6 +1,6 @@
# Read about factories at https://github.com/thoughtbot/factory_girl # Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do FactoryGirl.define do
factory :blog_comment do factory :blog_comment do
end end
end end

@ -1,6 +1,6 @@
# Read about factories at https://github.com/thoughtbot/factory_girl # Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do FactoryGirl.define do
factory :blog do factory :blog do
end end
end end

@ -1,13 +1,13 @@
FactoryGirl.define do FactoryGirl.define do
factory :course_contributor_score do factory :course_contributor_score do
course_id 1 course_id 1
user_id 1 user_id 1
message_num 1 message_num 1
message_reply_num 1 message_reply_num 1
news_reply_num 1 news_reply_num 1
resource_num 1 resource_num 1
journal_num 1 journal_num 1
journal_reply_num 1 journal_reply_num 1
end end
end end

@ -1,10 +1,10 @@
FactoryGirl.define do FactoryGirl.define do
factory :course_message do factory :course_message do
user_id 1 user_id 1
course_id 1 course_id 1
course_message_id 1 course_message_id 1
course_message_type "MyString" course_message_type "MyString"
viewed 1 viewed 1
end end
end end

@ -1,15 +1,15 @@
#coding=utf-8 #coding=utf-8
# #
FactoryGirl.define do FactoryGirl.define do
factory :course do factory :course do
name 'name' name 'name'
time '2015' time '2015'
term 'term' term 'term'
class_period 1 class_period 1
password '111' password '111'
description 'description' description 'description'
is_public 1 is_public 1
open_student 1 open_student 1
association :teacher, factory: :user association :teacher, factory: :user
end end
end end

@ -1,19 +1,19 @@
FactoryGirl.define do FactoryGirl.define do
factory :dt, :class => 'Dts' do factory :dt, :class => 'Dts' do
IPLineCode "MyString" IPLineCode "MyString"
Description "MyString" Description "MyString"
Num "MyString" Num "MyString"
Variable "MyString" Variable "MyString"
TraceInfo "MyString" TraceInfo "MyString"
Method "MyString" Method "MyString"
File "MyString" File "MyString"
IPLine "MyString" IPLine "MyString"
Review "MyString" Review "MyString"
Category "MyString" Category "MyString"
Defect "MyString" Defect "MyString"
PreConditions "MyString" PreConditions "MyString"
StartLine "MyString" StartLine "MyString"
project_id 1 project_id 1
end end
end end

@ -1,10 +1,10 @@
FactoryGirl.define do FactoryGirl.define do
factory :forge_message do factory :forge_message do
user_id 1 user_id 1
project_id 1 project_id 1
forge_message_id 1 forge_message_id 1
forge_message_type "MyString" forge_message_type "MyString"
viewed 1 viewed 1
end end
end end

@ -1,11 +1,11 @@
# Read about factories at https://github.com/thoughtbot/factory_girl # Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do FactoryGirl.define do
factory :homework_detail_group do factory :homework_detail_group do
homework_common_id 1 homework_common_id 1
min_num 1 min_num 1
max_num 1 max_num 1
base_on_project 1 base_on_project 1
homework_common nil homework_common nil
end end
end end

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save