diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 9d5768948..00d814bd3 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -5,9 +5,9 @@ class HomeworkCommonController < ApplicationController layout "base_courses" include StudentWorkHelper - before_filter :find_course, :only => [:index,:new,:create,:next_step] - before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy] - before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment] + 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] + 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] before_filter :member_of_course, :only => [:index] def index @@ -23,116 +23,11 @@ class HomeworkCommonController < ApplicationController #新建作业,在个人作业列表创建作业 def new render_404 - # @homework_type = "1" - # - # @homework = HomeworkCommon.new - # @homework.safe_attributes = params[:homework_common] - # @homework.late_penalty = 2 - # @homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') - # @homework.publish_time = Time.now.strftime('%Y-%m-%d') - # - # if @homework_type == "1" - # #匿评作业相关属性 - # @homework_detail_manual = HomeworkDetailManual.new - # @homework_detail_manual.ta_proportion = 0.6 - # @homework_detail_manual.absence_penalty = 2 - # @homework_detail_manual.evaluation_num = 3 - # @homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d') - # @homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d') - # @homework.homework_detail_manual = @homework_detail_manual - # elsif @homework_type == "2" - # #编程作业相关属性 - # @homework_detail_programing = HomeworkDetailPrograming.new - # @homework.homework_detail_programing = @homework_detail_programing - # end - # respond_to do |format| - # format.html - # end end #新建作业,在个人作业列表创建作业 def create redirect_to user_homeworks_user_path(User.current.id) - # if params[:homework_common] - # homework = HomeworkCommon.new - # homework.name = params[:homework_common][:name] - # homework.description = params[:homework_common][:description] - # homework.end_time = params[:homework_common][:end_time] - # homework.publish_time = params[:homework_common][:publish_time] - # homework.homework_type = params[:homework_common][:homework_type] - # homework.late_penalty = params[:late_penalty] - # homework.user_id = User.current.id - # homework.course_id = @course.id - # - # homework.save_attachments(params[:attachments]) - # render_attachment_warning_if_needed(homework) - # - # if homework.homework_type == 2 - # homework_detail_programing = HomeworkDetailPrograming.new - # homework_detail_programing.language = params[:language] - # homework_detail_programing.standard_code = params[:standard_code] - # homework_detail_programing.ta_proportion = params[:ta_proportion] || 0.6 - # question = {title:homework.name,content:homework.description} - # question[:input] = [] - # question[:output] = [] - # if params[:input] && params[:output] && params[:result] - # params[:input].each do |k,v| - # if params[:output].include? k - # homework_test = HomeworkTest.new - # homework_test.input = v - # homework_test.output = params[:output][k] - # homework_test.result = params[:result][k] - # homework_test.error_msg = params[:error_msg] - # homework.homework_tests << homework_test - # question[:input] << homework_test.input - # question[:output] << homework_test.output - # end - # end - # end - # - # # uri = URI('http://192.168.80.21:8080/api/questions.json') - # # body = question.to_json - # # res = Net::HTTP.new(uri.host, uri.port).start do |client| - # # request = Net::HTTP::Post.new(uri.path) - # # request.body = body - # # request["Content-Type"] = "application/json" - # # client.request(request) - # # end - # # result = JSON.parse(res.body) - # # homework_detail_programing.question_id = result["id"] if result["status"] && result["status"] == 0 - # - # homework.homework_detail_programing = homework_detail_programing - # else - # #匿评作业相关属性 - # homework_detail_manual = HomeworkDetailManual.new - # homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6 - # homework_detail_manual.comment_status = 1 - # homework_detail_manual.evaluation_start = params[:evaluation_start] - # homework_detail_manual.evaluation_end = params[:evaluation_end] - # homework_detail_manual.evaluation_num = params[:evaluation_num] - # homework_detail_manual.absence_penalty = params[:absence_penalty] - # homework.homework_detail_manual = homework_detail_manual - # end - # - # if homework.save - # homework_detail_programing.save if homework_detail_programing - # homework_detail_manual.save if homework_detail_manual - # respond_to do |format| - # format.html { - # flash[:notice] = l(:notice_successful_create) - # redirect_to homework_common_index_path(:course => @course.id) - # } - # end - # return - # end - # end - # - # respond_to do |format| - # format.html { - # flash[:notice] = l(:notice_failed_create) - # redirect_to new_homework_common_path(:course => @course.id) - # } - # end end def edit @@ -150,6 +45,10 @@ class HomeworkCommonController < ApplicationController @homework.end_time = params[:homework_common][:end_time] || Time.now @homework.course_id = params[:course_id] + homework_detail_manual = @homework.homework_detail_manual || HomeworkDetailManual.new + 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.save_attachments(params[:attachments]) render_attachment_warning_if_needed(@homework) @@ -290,6 +189,27 @@ class HomeworkCommonController < ApplicationController end end + #启动匿评参数设置 + def start_evaluation_set + + end + + #设置匿评参数 + def set_evaluation_attr + if @homework_detail_manual + unless params[:evaluation_start].to_s == @homework_detail_manual.evaluation_start.to_s + @homework_detail_manual.evaluation_start = params[:evaluation_start] + end + + unless @homework_detail_manual.evaluation_end.to_s == params[:evaluation_end].to_s + @homework_detail_manual.evaluation_end = params[:evaluation_end] + end + + @homework_detail_manual.evaluation_num = params[:evaluation_num] + @homework_detail_manual.save + end + end + private #获取课程 def find_course diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 251fd80c4..90a0f3ed6 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -77,28 +77,60 @@ class StudentWorkController < ApplicationController @is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin? @is_evaluation = @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评 @show_all = false - if @is_teacher #老师 || 超级管理员 显示所有列表 - @stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name - @show_all = true - elsif @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的 - @stundet_works = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id) - elsif @homework.homework_detail_manual.comment_status == 2 #学生 && 开启匿评 看到匿评列表 - my_work = @homework.student_works.where(:user_id => User.current.id) - @stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id} - elsif @homework.homework_detail_manual.comment_status == 3 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的 - my_work = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id) - if my_work.empty? - @stundet_works = [] + + course_group = CourseGroup.find_by_id(@group) if @group + if course_group + group_students = course_group.users + if group_students.empty? + student_in_group = '(0)' else - @stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name + student_in_group = '(' + group_students.map{|user| user.id}.join(',') + ')' + end + if @is_teacher #老师 || 超级管理员 显示所有列表 + @stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name @show_all = true + elsif @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的 + @stundet_works = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id) + elsif @homework.homework_detail_manual.comment_status == 2 #学生 && 开启匿评 看到匿评列表 + my_work = @homework.student_works.where(:user_id => User.current.id) + @stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id} + elsif @homework.homework_detail_manual.comment_status == 3 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的 + my_work = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id) + if my_work.empty? + @stundet_works = [] + else + @stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name + @show_all = true + end + else + @stundet_works = [] end else - @stundet_works = [] + if @is_teacher #老师 || 超级管理员 显示所有列表 + @stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name + @show_all = true + elsif @homework.homework_detail_manual.comment_status == 1 #学生 && 未开启匿评 只看到自己的 + @stundet_works = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id) + elsif @homework.homework_detail_manual.comment_status == 2 #学生 && 开启匿评 看到匿评列表 + my_work = @homework.student_works.where(:user_id => User.current.id) + @stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id} + elsif @homework.homework_detail_manual.comment_status == 3 #学生 && 关闭匿评 未提交作品之前列表为空,提交了作品看到所有的 + my_work = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id) + if my_work.empty? + @stundet_works = [] + else + @stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name + @show_all = true + end + else + @stundet_works = [] + end end + @score = @b_sort == "desc" ? "asc" : "desc" respond_to do |format| + format.js format.html format.xls { send_data(homework_to_xls(@stundet_works), :type => "text/excel;charset=utf-8; header=present", diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 874f9c607..35860c728 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -480,8 +480,8 @@ class UsersController < ApplicationController homework_detail_manual = HomeworkDetailManual.new homework_detail_manual.ta_proportion = homework.homework_type == 1 ? 0.6 : 0.3 homework_detail_manual.comment_status = 1 - homework_detail_manual.evaluation_start = Time.now - homework_detail_manual.evaluation_end = Time.now + 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_num = params[:evaluation_num] || 3 homework_detail_manual.absence_penalty = 5 homework.homework_detail_manual = homework_detail_manual diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d7fac9a7d..e100a8fc9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2306,7 +2306,7 @@ module ApplicationHelper when 2 link = link_to '关闭匿评', alert_anonymous_comment_homework_common_path(homework), id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'postOptionLink' when 3 - link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束" + # link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束" end else link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "学生提交作业数大于2时才可以启动匿评" diff --git a/app/models/student_work_test.rb b/app/models/student_work_test.rb index 1cfb7f8b2..0246ecabf 100644 --- a/app/models/student_work_test.rb +++ b/app/models/student_work_test.rb @@ -45,7 +45,7 @@ class StudentWorkTest < ActiveRecord::Base private def get_success_count self.results.inject(0) do |sum, result| - sum += (result["status"].to_i == 0 ? 1 : 0) + sum += (result["status"] && result["status"].to_i == 0 ? 1 : 0) end || 0 end diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index f117acd7f..db174f30e 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -99,7 +99,7 @@ // } }); -
+
<%= topic.content.html_safe %> @@ -165,7 +165,7 @@
<%= link_to User.current.member_of_course?(@board.course) ? "#{message.author.show_name}(#{message.author.login})" : "#{message.author}", user_path(message.author),:class => 'fl c_orange f14 ' %>
-
+
<%= textAreailizable message,:content,:attachments => message.attachments %>
diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index bc69e2666..3cfd4ae72 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -92,7 +92,7 @@
-
+
<%= topic.content.html_safe %> @@ -150,7 +150,7 @@
<%= link_to_user_header message.author,false,:class => 'fl c_orange f14 ' %>
-
+
<%= textAreailizable message,:content,:attachments => message.attachments %>
diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index 6eb722981..eceb29f34 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -7,7 +7,7 @@ <%= image_tag(url_to_avatar(activity.user), :width => "42", :height => "42") %> -
+
<%= link_to_user_header(activity.user,false,:class => 'problem_name c_orange fl') %>   <%= activity.course_act_type == "Course" ? "创建了课程" : l(:label_new_activity) %>: diff --git a/app/views/homework_common/_homework_detail_manual_form.html.erb b/app/views/homework_common/_homework_detail_manual_form.html.erb deleted file mode 100644 index 59294f82d..000000000 --- a/app/views/homework_common/_homework_detail_manual_form.html.erb +++ /dev/null @@ -1,110 +0,0 @@ -
    -
  • - - -

    -
  • -
    -
  • - -
    - <% if edit_mode %> - <%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %> - <% else %> - <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> - <%= f.kindeditor :description,:editor_id => 'homework_description_editor' %> - <% end %> -
    -
  • -
    -
  • - - <%= render :partial => 'attachments/new_form', :locals => {:container => homework} %> -
  • -
    -
  • - - - <%= calendar_for('homework_end_time')%> -
    -
  • - -
    -
-
-

基本规则设置(总分为100分)

-
-
    -
  • - - <%#= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %> - -  分 -
    -
  • -
  • - - <%= f.check_box :homework_type, :class => "mb10 mt5 fl" %> -
    -
  • -
  • - - <%= select_tag :ta_proportion,options_for_select(ta_proportion_option,homework.homework_detail_manual.ta_proportion), {:class => "fl mb10 h26 w70"} %> - × 教辅评分 -   +   - - × 匿评得分 - = 学生得分 -
    -
  • -
  • - - 如果教师对学生作品进行了评分,则教师评分为学生最终得分。 -
    -
  • -
-
- -
-

学生互评设置

-
-
    -
  • - - - <%= calendar_for('evaluation_start_time')%> -
    -
  • -
  • - - - <%= calendar_for('evaluation_end_time')%> -
    -
  • -
  • - - -

    每个学生将收到 3 份待匿评作品

    -
    -
  • - -
  • - - <%= select_tag :absence_penalty,options_for_select(absence_penalty_option,homework.homework_detail_manual.absence_penalty), {:class => "fl mb10 h26 w70"} %> -  分 -

    学生漏评1个作品将扣 <%= homework.homework_detail_manual.absence_penalty%> 

    -
    -
  • -
-
\ No newline at end of file diff --git a/app/views/homework_common/_homework_detail_programing_form.html.erb b/app/views/homework_common/_homework_detail_programing_form.html.erb deleted file mode 100644 index 829905327..000000000 --- a/app/views/homework_common/_homework_detail_programing_form.html.erb +++ /dev/null @@ -1,193 +0,0 @@ -
    -
  • - - -

    -
  • -
    -
  • - -
    - <% if edit_mode %> - <%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %> - <% else %> - <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> - <%= f.kindeditor :description,:editor_id => 'homework_description_editor' %> - <% end %> -
    -
  • -
    -
  • - - <%= render :partial => 'attachments/new_form', :locals => {:container => homework} %> -
  • -
    -
  • - - - <%= calendar_for('homework_end_time')%> -
    -
  • - - -
  • - - <%#= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %> - -  分 -
    -
  • -
- -
-
-

编程评测设置

-
-
    -
  • - - <%= select_tag :language,options_for_select(programing_languages_options,homework.homework_detail_programing.language.to_i), {:class => "fl mb10 h26 w70",:onchange => "homework_language_change($(this));"} %> -
    -
  • - -
  • - - <%= select_tag :ta_proportion,options_for_select(ta_proportion_option,homework.homework_detail_programing.ta_proportion), {:class => "fl mb10 h26 w70"} %> - × 教辅评分 -   +   - - × 系统评分 - = 学生得分 -
    -
  • -
  • - - 如果教师对学生作品进行了评分,则教师评分为学生最终得分。 -
    -
  • - -
  • - - -
    -
  • - - <% if edit_mode %> - <% homework.homework_tests.each do |homework_test|%> -
    -
  • - - -
  • -
  • - - -
  • -
  • - - - <% if homework_test.result && !homework_test.result.to_s.empty?%> - <% if homework_test.result == 0%> - 正确 - <% else%> - 错误 - <% end%> - <% else%> - 测试 - <% end%> - -
  • -
    -
    - <% end%> - <% else %> -
    -
  • - - -
  • -
  • - - -
  • -
  • - - - 测试 - -
  • -
    -
    - <% end %> - - "> - - - - - - -
    - 错误信息: - - <% if homework.homework_tests.first && homework.homework_tests.first && homework.homework_tests.first.error_msg %> - <%= homework.homework_tests.first.error_msg%> - <% end%> -
    -
-
- - \ No newline at end of file diff --git a/app/views/homework_common/_new_homework_detail_manual_form.html.erb b/app/views/homework_common/_new_homework_detail_manual_form.html.erb deleted file mode 100644 index af5a8bf50..000000000 --- a/app/views/homework_common/_new_homework_detail_manual_form.html.erb +++ /dev/null @@ -1,74 +0,0 @@ -
-
-
-
发布作业
-
-
-
- -
-
- 导入作业 - -
- -
-
-
-
- <% if edit_mode %> - <%= f.kindeditor :description,:editor_id => 'homework_description_editor',:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %> - <% else %> - <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> - <%= f.kindeditor :description,:editor_id => 'homework_description_editor' %> - <% end %> -
-
- -
- - -
- 高级功能 -
-
-
- -
- 发布 - <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'fr mr10 mt3'%> -
-
-
-
- -
- - - diff --git a/app/views/homework_common/_set_evalutation_att.html.erb b/app/views/homework_common/_set_evalutation_att.html.erb new file mode 100644 index 000000000..01d9351ee --- /dev/null +++ b/app/views/homework_common/_set_evalutation_att.html.erb @@ -0,0 +1,53 @@ +
+ <%= form_for('new_form',:url => {:controller => 'homework_common',:action => 'set_evaluation_attr',:homework => @homework.id},:method => "post",:remote => true) do |f|%> + 匿评设置 +
+ +
+ 开启匿评 +
+ + <%= calendar_for('evaluation_start_time')%> +
+
+

+
+
+ +
+ 关闭匿评 +
+ + <%= calendar_for('evaluation_end_time')%> +
+
+

+
+
+ +
+ 匿评人数 + +
+

+
+
+ +
+ 禁用匿评 + + 禁用后将无法进行学生互评 +
+
+ +
+
+ 确定 +
+
+ 取消 +
+
+
+ <% end%> +
\ No newline at end of file diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index 2e680d6ea..8799bcab9 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -25,9 +25,9 @@ ( <%= link_to homework.student_works.count, student_work_index_path(:homework => homework.id), :class => 'c_red'%> )

<% if @is_teacher%> - <%= homework_anonymous_comment(homework)%> <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework,:is_in_course => 1),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %> - <%= link_to(l(:button_edit),edit_homework_common_path(homework,:is_in_course => 1), :class => "fr mr10 work_edit") %> + <%= link_to(l(:button_edit),edit_homework_common_path(homework,:is_in_course => 1), :class => "fr mr10 work_edit ml10") %> + <%= homework_anonymous_comment(homework)%> <% elsif @is_student%> <%= student_anonymous_comment homework %> <%= student_new_homework homework %> @@ -37,7 +37,7 @@ $(function(){if($("#bid_description_<%= homework.id%>_content").height()>360){$("#bid_show_more_des_button<%= homework.id%>").show();}});
-
+
<%= homework.description.html_safe %>
diff --git a/app/views/homework_common/new.html.erb b/app/views/homework_common/new.html.erb deleted file mode 100644 index 6fc0fff0e..000000000 --- a/app/views/homework_common/new.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -<%= javascript_include_tag "/assets/kindeditor/kindeditor" %> -<%= error_messages_for 'homework_common' %> -
-

- <%= l(:label_course_homework_new)%> -

-
-
- <%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %> - <%= hidden_field_tag "course",@course.id%> - <%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %> - 提交 - <%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%> - <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%> - <% end%> -
-
diff --git a/app/views/homework_common/next_step.html.erb b/app/views/homework_common/next_step.html.erb deleted file mode 100644 index 7ed852fea..000000000 --- a/app/views/homework_common/next_step.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %> -<%= error_messages_for 'homework_common' %> -
-

- <%= l(:label_course_homework_new)%> -

-
-<% if @homework_type == "1"%> -
- <%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %> - <%= hidden_field_tag "course",@course.id%> - <%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %> - 提交 - <%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%> - <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%> - <% end%> -
-<% elsif @homework_type == "2"%> -
- <%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %> - <%= hidden_field_tag "course",@course.id%> - <%= hidden_field_tag "homework_common[homework_type]","2"%> - <%= render :partial => 'homework_common/homework_detail_programing_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %> - 提交 - <%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%> - <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%> - <% end%> -
-
-<% end%> \ No newline at end of file diff --git a/app/views/homework_common/set_evaluation_attr.js.erb b/app/views/homework_common/set_evaluation_attr.js.erb new file mode 100644 index 000000000..d6ab73df5 --- /dev/null +++ b/app/views/homework_common/set_evaluation_attr.js.erb @@ -0,0 +1 @@ +clickCanel(); \ No newline at end of file diff --git a/app/views/homework_common/start_evaluation_set.js.erb b/app/views/homework_common/start_evaluation_set.js.erb new file mode 100644 index 000000000..9d494f908 --- /dev/null +++ b/app/views/homework_common/start_evaluation_set.js.erb @@ -0,0 +1,6 @@ +$('#ajax-modal').html('<%= escape_javascript(render :partial => 'homework_common/set_evalutation_att') %>'); +showModal('ajax-modal', '350px'); +$('#ajax-modal').siblings().remove(); +$('#ajax-modal').before("" + +""); +$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed"); \ No newline at end of file diff --git a/app/views/homework_common/stop_anonymous_comment.js.erb b/app/views/homework_common/stop_anonymous_comment.js.erb index 3cbac1bf6..4725d5731 100644 --- a/app/views/homework_common/stop_anonymous_comment.js.erb +++ b/app/views/homework_common/stop_anonymous_comment.js.erb @@ -1,2 +1,2 @@ -$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith('匿评结束'); +$("#<%= @homework.id %>_stop_anonymous_comment").replaceWith(''); alert('关闭成功'); \ No newline at end of file diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 67867e2c6..2b706be7f 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -45,13 +45,134 @@
+<<<<<<< .mine <%= render :partial => 'attributes_show' %> + + + + + + + + + + + + + + + + + + + + + + + + +======= +
+ <%= issue_fields_rows do |rows| %> +
    +
  •  状态  : 

    + +

    <%= @issue.status.name %>

    +
  • +
    + <% unless @issue.disabled_core_fields.include?('assigned_to_id') %> +
  •  指派给  : 

    + <%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %> +
  • + <% end %> +
    +
+
    +
  •  优先级  : 

    + <%= @issue.priority.name %> +
  • +
    + <% unless @issue.disabled_core_fields.include?('done_ratio') %> +
  •  % 完成  : 

    + <%= @issue.done_ratio %>% +
  • + <% end %> +
    +
+>>>>>>> .theirs + +<<<<<<< .mine <%# 该应用是对issue主题内容的引用,对应:to => 'journals#new %> + + + +
+======= +
    + <% unless @issue.disabled_core_fields.include?('start_date') %> +
  •  开始  : 

    + +

    <%= format_date(@issue.start_date) %>

    +
  • + <% end %> +
    +>>>>>>> .theirs +<<<<<<< .mine + + + + + + + + + + + + + + + + + + + + + + + + +======= + <% unless @issue.disabled_core_fields.include?('estimated_hours') %> +
  •  周期  : 

    + <%= l_hours(@issue.estimated_hours) %> +
  • + <% end %> +
    +
+
    + <% unless @issue.disabled_core_fields.include?('due_date') %> +
  •  计划完成  : 

    + <%= format_date(@issue.due_date) ? format_date(@issue.due_date) : "--" %> +
  • + <% end %> +
    + <% unless @issue.disabled_core_fields.include?('fixed_version_id') %> +
  •  目标版本  : 

    + <%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %> +
  • + <% end %> +
    +
+ <% end %> + <%#= render_custom_fields_rows(@issue) %> + <%#= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> +>>>>>>> .theirs
diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index 07f852914..9fe25ce95 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -1,9 +1,9 @@ @@ -39,7 +39,7 @@ minStatue : true, skin : 'blue', durationTime : 1000 - } + }; var options = $.extend(defaults, options); this.each(function(){ @@ -56,13 +56,13 @@ if(options.minStatue == "true"){ $(".show_btn").css("float", options.float); sideContent.css('width', 0); - show_btn.css('width', 25); + show_btn.css('width', 29); } //close closeBtn.bind("click",function(){ sideContent.animate({width: '0px'},"fast"); - show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast"); + show_btn.stop(true, true).delay(300).animate({ width: '29px'},"fast"); cookiesave('minStatue','true','','',''); }); //show @@ -83,14 +83,10 @@ $(function(){ $("#button1").click(function(){ myTips("<%= l(:label_feedback_success) %>","success"); }); - }); function f_submit() { -// var subject = $("#memo_subject").val(); -// var content = $("#memo_content_1").val(); -// $("#memo_subject").val(subject+":"+ content.substr(0,18)+"..."); $("#new_memo").submit(); } @@ -169,15 +165,15 @@ function cookieget(n)
<% get_memo %> - <% if @public_forum %> - <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> - <%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %> - <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %> - <%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %> - - <%= l(:label_submit)%> - <% end %> - <% end %> + <% if @public_forum %> + <%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %> + <%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %> + <%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %> + <%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %> + + <%= l(:label_submit)%> + <% end %> + <% end %>
-
<%= l(:label_submit)%>
+
diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index db0a3c3ee..136e49b37 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -30,6 +30,7 @@
- 在线客服 + <%= l(:label_submit)%> +
diff --git a/app/views/news/_course_news_list.html.erb b/app/views/news/_course_news_list.html.erb index da963b3cd..74a70e33d 100644 --- a/app/views/news/_course_news_list.html.erb +++ b/app/views/news/_course_news_list.html.erb @@ -7,7 +7,7 @@ <% newss.each do |news| %>
<%= link_to image_tag(url_to_avatar(news.author),:width => 42,:height => 42), user_path(news.author), :class => "problem_pic fl" %> -
+
<%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %> <%= l(:label_release_news) %>: diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb index 9ae951779..2d8dae59d 100644 --- a/app/views/news/_course_show.html.erb +++ b/app/views/news/_course_show.html.erb @@ -4,7 +4,7 @@
<%= link_to image_tag(url_to_avatar(@news.author),:width => 42,:height => 42), user_path(@news.author), :class => "problem_pic fl" %> -
+

<%=h @news.title %>

@@ -51,7 +51,7 @@
<%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author), :class => "problem_pic fl"%>
-
+
<%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %> <%= format_time(comment.created_on) %> diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index 0cd26382b..efbb74e46 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -31,7 +31,7 @@ <% @newss.each do |news| %>
<%= link_to image_tag(url_to_avatar(news.author),:width => 42,:height => 42), user_path(news.author), :class => "problem_pic fl" %> -
+
<%= link_to_user_header(news.author,false,{:class=> 'problem_name c_orange fl'}) if news.respond_to?(:author) %> <%= l(:label_add_news) %>:<%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %> <%=link_to "#{news.comments.all.count}".html_safe, news_path(news.id), :class => "pro_mes_w_news" %>
diff --git a/app/views/news/_project_show.html.erb b/app/views/news/_project_show.html.erb index 6e94f0947..463b0f489 100644 --- a/app/views/news/_project_show.html.erb +++ b/app/views/news/_project_show.html.erb @@ -14,7 +14,7 @@
<%= link_to image_tag(url_to_avatar(@news.author),:width => 42,:height => 42), user_path(@news.author), :class => "problem_pic fl" %> -
+

<%=h @news.title %>

<%#= watcher_link(@news, User.current) %> <%= link_to(l(:button_edit), diff --git a/app/views/poll/_edit_head.html.erb b/app/views/poll/_edit_head.html.erb index 06e162f0d..8eebae5a2 100644 --- a/app/views/poll/_edit_head.html.erb +++ b/app/views/poll/_edit_head.html.erb @@ -22,3 +22,21 @@
<% end%> + diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index f1b3d9b7b..971794699 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -24,7 +24,7 @@ <% if e.forge_act_type == "Issue" %>
<%= image_tag(url_to_avatar(act.author), :width => "42", :height => "42") %> -
+
<%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= link_to act.author, user_path(act.author), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> : @@ -60,7 +60,7 @@ <% elsif e.forge_act_type == "Message" %>
<%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %> -
+
<%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> : @@ -79,7 +79,7 @@ <% elsif e.forge_act_type == "News" %>
<%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %> -
+
<%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> : diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb index bb1919472..cfd9632c2 100644 --- a/app/views/student_work/_evaluation_title.html.erb +++ b/app/views/student_work/_evaluation_title.html.erb @@ -1,8 +1,15 @@ -
    -
  • - 作品信息 +
      +
    • + 作品名称 + 姓名 + 学号
    • -
    • - 我的评分 + +
    • + 时间 +
    • + +
    • + 我的评分
    \ No newline at end of file diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb index 8ca855e9b..9a21e109b 100644 --- a/app/views/student_work/_evaluation_un_title.html.erb +++ b/app/views/student_work/_evaluation_un_title.html.erb @@ -1,37 +1,51 @@ -
      -
    • - 作品信息 +
        +
      • + 作品名称 + 姓名 + 学号
      • -
      • - <%= link_to "教师评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%> + +
      • + <%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml50" ,:remote => true%> + <% if @show_all && @order == "created_at"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%> + <% end%> +
      • + +
      • + <%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10" ,:remote => true%> <% if @show_all && @order == "teacher_score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%> <% end%>
      • -
      • - <%= link_to "教辅评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%> + +
      • + <%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%> <% if @show_all && @order == "teaching_asistant_score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%> <% end%>
      • + <% if @homework.homework_type == 2%> -
      • - <%= link_to "系统评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%> +
      • + <%= link_to "系统",@show_all ? student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%> <% if @show_all && @order == "system_score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%> <% end%>
      • <% end%> -
      • - <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%> + +
      • + <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%> <% if @show_all && @order == "student_score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%> <% end%>
      • -
      • - <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10"%> + +
      • + <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%> <% if @show_all && @order == "score"%> - <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt19"%> + <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%> <% end%>
      \ No newline at end of file diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index d3bac240d..ff2420a1a 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -1,46 +1,50 @@
        -
      • +
        • -
        • - <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%> - <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%> -
        • -
          -
        • -
            -
          • - 姓名:<%= student_work.user.show_name%> -
          • -
          • - 学号: - <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> -
          • -
          • - 时间: - <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %> - 迟交 - <% else%> - <%= format_time student_work.created_at%> - <% end %> -
          • -
          +
        • + <%= link_to(image_tag(url_to_avatar(User.current),:width =>"40",:height => "40"),user_activities_path(User.current.id))%>
        • +
          +
        • + <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%> +
          + <%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%> +
          +
        • +
        • +
            +
          • + <%= student_work.user.show_name%> +
          • +
          • + <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> +
          • +
          +
        • +
      • -
      • +
      • + <%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>  + <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %> + [迟交] + <% end %> +
      • +
      • <%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
      • -
      • +
      • <%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
      • <% if @homework.homework_type == 2%> -
      • +
      • <%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
      • <% end%> +
      • <%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%> <% unless student_work.student_score.nil?%> @@ -73,4 +77,5 @@
<% end%> - \ No newline at end of file + + diff --git a/app/views/student_work/_evaluation_work.html.erb b/app/views/student_work/_evaluation_work.html.erb index f8b9addbd..63cb7ea99 100644 --- a/app/views/student_work/_evaluation_work.html.erb +++ b/app/views/student_work/_evaluation_work.html.erb @@ -1,51 +1,62 @@
    <% is_my_work = student_work.user == User.current%> -
  • +
    • -
    • - <% if is_my_work%> + <% if is_my_work%> +
    • + <%= image_tag(url_to_avatar(student_work.user),width:"40", height: "40") %> +
    • +
    • <% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%> - <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%> - <% else%> - <%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14"%> - <% end%> -
    • -
      -
    • -
        -
      • - 姓名: - <% if is_my_work%> +
        + <%= link_to student_work_name, student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%> +
        +
      • +
      • +
          +
        • <%= student_work.user.show_name%> - <% else%> - 匿名 - <% end%> -
        • -
        • - 学号: - <% if is_my_work%> - +
        • +
        • <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> - - <% else%> - -- - <% end%> +
        • +
      • -
      • - 时间: - <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %> - 迟交 - <% else%> - <%= format_time student_work.created_at%> - <% end %> + <% else%> +
      • + <%= image_tag(url_to_avatar(""),width:"40", height: "40") %>
      • -
      -
    • +
    • +
      + <%= link_to "匿名的作品", student_work_path(student_work),:remote => true,:title => student_work_name, :class => "linkGrey f14 StudentName break_word width285"%> +
      +
    • +
    • +
        +
      • + 匿名 +
      • +
      • + -- +
      • +
      +
    • + <% end%> +
  • +
  • + <%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>  + <% if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(student_work.created_at.to_s).strftime("%Y-%m-%d") %> + [迟交] + <% end %> +
  • + + <% my_score = student_work_score(student_work,User.current) %> -
  • +
  • <%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
  • -
\ No newline at end of file + + diff --git a/app/views/student_work/_student_work_list.html.erb b/app/views/student_work/_student_work_list.html.erb new file mode 100644 index 000000000..197fecac9 --- /dev/null +++ b/app/views/student_work/_student_work_list.html.erb @@ -0,0 +1,36 @@ +
+ + 作品 + + (<%= @stundet_works.count%>) + + + <%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%> +
+ + +
+ <%= select_tag(:student_work_in_group,options_for_select(course_group_list(@course),@group), {:class => "classSplit"}) unless course_group_list(@course).empty? %> + <% end%> +
+
+ +
+ <% if @is_evaluation && !@stundet_works.empty?%> + <%= render :partial => "evaluation_title"%> + <% else%> + <%= render :partial => "evaluation_un_title"%> + <% end%> +
+
+ +<% @stundet_works.each do |student_work|%> + <% if @is_evaluation%> + <%= render :partial => "evaluation_work", :locals => {:student_work => student_work}%> + <% else%> + <%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work}%> + <% end%> +
+
+
+<% end%> \ No newline at end of file diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 5398b7084..9c48d310b 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -56,7 +56,7 @@
  • - <%= link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'hworkExport postTypeGrey'%> + <%= link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :group => @group, :format => 'xls'),:class=>'hworkExport postTypeGrey', :id => "export_student_work"%>
  • <% if @homework.student_works.empty?%> @@ -82,45 +82,15 @@ <% end%>
+
-
-
- - <%= link_to "所有作品[共#{@stundet_works.count}份]".html_safe,student_work_index_path(:homework => @homework.id),:class => "fl f14"%> - - <%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%> -
- - -
- <% end%> -
-
- -
- <% if @is_evaluation && !@stundet_works.empty?%> - <%= render :partial => "evaluation_title"%> - <% else%> - <%= render :partial => "evaluation_un_title"%> - <% end%> -
- -
- <% @stundet_works.each do |student_work|%> - <% if @is_evaluation%> - <%= render :partial => "evaluation_work", :locals => {:student_work => student_work}%> - <% else%> - <%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work}%> - <% end%> -
- -
-
- <% end%> +
+ <%= render :partial => "student_work/student_work_list"%>
+
diff --git a/app/views/student_work/index.js.erb b/app/views/student_work/index.js.erb new file mode 100644 index 000000000..73b94260d --- /dev/null +++ b/app/views/student_work/index.js.erb @@ -0,0 +1,2 @@ +$("#homework_student_work_list").html("<%= escape_javascript(render :partial => 'student_work/student_work_list') %>"); +$("#export_student_work").replaceWith("<%= escape_javascript( link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :group => @group, :name => @name, :format => 'xls'),:class=>'hworkExport postTypeGrey', :id => 'export_student_work') %>"); \ No newline at end of file diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb index f9b242443..c7f1d45c4 100644 --- a/app/views/student_work/new.html.erb +++ b/app/views/student_work/new.html.erb @@ -7,7 +7,7 @@ $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); - $('#ajax-modal').parent().css("top","30%").css("left","40%"); + $('#ajax-modal').parent().css("top","65%").css("left","60%"); $('#ajax-modal').parent().addClass("anonymos_work"); }); <% end%> diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 366473b52..afd2f142b 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -42,7 +42,7 @@
截止时间:<%= activity.end_time.to_s %>
-
+
<%= activity.description.html_safe %>
-
+
<% if activity.parent_id.nil? %> <%= activity.content.to_s.html_safe%> <% else %> @@ -45,15 +45,16 @@
+ <% count=0 %> + <% if activity.parent %> + <% count=activity.parent.children.count%> + <% else %> + <% count=activity.children.count%> + <% end %>
-
- <% count=0 %> +
+
回复( - <% if activity.parent %> - <% count=activity.parent.children.count%> - <% else %> - <% count=activity.children.count%> - <% end %> <%= count %> )
<%#=format_date(activity.updated_on)%>
@@ -86,7 +87,7 @@ <% end %> <%= format_time(reply.created_on) %>
-
+
<%= reply.content.html_safe %>
@@ -99,14 +100,14 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
+
<%= 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|%>
- 发送 +

<% end%> diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index ef01022ce..99e85fc73 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -18,15 +18,16 @@
发布时间:<%= format_time(activity.created_on) %>
-
+
<%= activity.description.html_safe %>
+ <% count=activity.comments.count %>
-
- <% count=activity.comments.count %> +
+
回复(<%= count %>)
@@ -59,7 +60,7 @@ <% end %> <%= format_time(comment.created_on) %>
-
<%= comment.comments.html_safe %>
+
<%= comment.comments.html_safe %>
@@ -70,13 +71,13 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
+
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
- 发送 +

<% end%> diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 29bed1499..0b86dc3eb 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -33,7 +33,7 @@ <%=format_time(activity.created_on) %>
-
+
<% if activity.description? %> <%= textAreailizable activity, :description, :attachments => activity.attachments %> <% end %> @@ -63,10 +63,10 @@
+ <% count = activity.journals.count %>
- -
- <% count = activity.journals.count %> +
+
回复(<%= count %>)
<%#= format_date(activity.updated_on) %>
<% if count > 2 %> @@ -115,13 +115,13 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
+
<%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%>
- 发送 +

<% end%> diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 2cce8f83a..2856d6ed1 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -26,7 +26,7 @@
时间:<%= format_time(activity.created_on) %>
-
+
<% if activity.parent_id.nil? %> <%= activity.content.to_s.html_safe%> <% else %> @@ -36,15 +36,16 @@
+ <% count = 0 %> + <% if activity.parent %> + <% count=activity.parent.children.count%> + <% else %> + <% count=activity.children.count%> + <% end %>
-
- <% count = 0 %> +
+
回复( - <% if activity.parent %> - <% count=activity.parent.children.count%> - <% else %> - <% count=activity.children.count%> - <% end %> <%=count %> )
<%#=format_date(activity.updated_on)%>
@@ -73,7 +74,7 @@ <% end %> <%= format_time(reply.created_on) %>
-
<%= reply.content.html_safe %>
+
<%= reply.content.html_safe %>
@@ -84,14 +85,14 @@
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
-
+
<%= 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|%>
- 发送 +

<% end%> diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index 225304185..ea9c572d9 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -36,7 +36,7 @@ } $(function() { - init_activity_KindEditor_data(<%= user_activity.id%>,"","87%"); + init_activity_KindEditor_data(<%= user_activity.id%>,null,"87%"); }); <% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %> diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb index 6bc03e33d..89800b768 100644 --- a/app/views/users/_user_homework_list.html.erb +++ b/app/views/users/_user_homework_list.html.erb @@ -41,7 +41,7 @@ <%= l(:label_end_time)%>:<%= homework_common.end_time%>
-
+
<%= homework_common.description.html_safe %>
@@ -60,6 +60,9 @@
  • <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => 0),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
  • +
  • + <%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true) if homework_common.homework_detail_manual.comment_status == 1%> +
  • <%= homework_anonymous_comment homework_common %>
  • diff --git a/app/views/users/user_homeworks.html.erb b/app/views/users/user_homeworks.html.erb index f375496d1..a37709b69 100644 --- a/app/views/users/user_homeworks.html.erb +++ b/app/views/users/user_homeworks.html.erb @@ -7,10 +7,6 @@ homework_description_editor.html(""); $("#homework_editor").toggle(); } - - function checkAllBox(doc){ - - }
    作业
    @@ -21,6 +17,7 @@
    <% homework = HomeworkCommon.new %> + <% homework.homework_detail_manual = HomeworkDetailManual.new%> <%= labelled_form_for homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
    <%= render :partial => 'users/user_homework_form', :locals => { :homework => homework,:f => f,:edit_mode => false } %> diff --git a/config/routes.rb b/config/routes.rb index 409a04b20..ba6d161c2 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -101,6 +101,8 @@ RedmineApp::Application.routes.draw do get 'start_anonymous_comment' get 'stop_anonymous_comment' get 'alert_anonymous_comment' + get 'start_evaluation_set' + post 'set_evaluation_attr' end collection do post 'next_step' diff --git a/db/schema.rb b/db/schema.rb index 1c6760345..40daded12 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -476,13 +476,6 @@ ActiveRecord::Schema.define(:version => 20150918134804) do add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" - create_table "discuss_demos", :force => true do |t| - t.string "title" - t.text "body" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - create_table "documents", :force => true do |t| t.integer "project_id", :default => 0, :null => false t.integer "category_id", :default => 0, :null => false @@ -497,23 +490,26 @@ ActiveRecord::Schema.define(:version => 20150918134804) do add_index "documents", ["created_on"], :name => "index_documents_on_created_on" add_index "documents", ["project_id"], :name => "documents_project_id" - create_table "dts", :force => true do |t| - t.string "IPLineCode" - t.string "Description" - t.string "Num" - t.string "Variable" - t.string "TraceInfo" - t.string "Method" + create_table "dts", :primary_key => "Num", :force => true do |t| + t.string "Defect", :limit => 50 + t.string "Category", :limit => 50 t.string "File" - t.string "IPLine" - t.string "Review" - t.string "Category" - t.string "Defect" - t.string "PreConditions" - t.string "StartLine" + t.string "Method" + t.string "Module", :limit => 20 + t.string "Variable", :limit => 50 + t.integer "StartLine" + t.integer "IPLine" + t.string "IPLineCode", :limit => 200 + t.string "Judge", :limit => 15 + t.integer "Review", :limit => 1 + t.string "Description" + t.text "PreConditions", :limit => 2147483647 + t.text "TraceInfo", :limit => 2147483647 + t.text "Code", :limit => 2147483647 t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" + t.integer "id", :null => false end create_table "enabled_modules", :force => true do |t| @@ -916,6 +912,7 @@ ActiveRecord::Schema.define(:version => 20150918134804) do t.datetime "created_on" t.integer "comments_count", :default => 0, :null => false t.integer "course_id" + t.datetime "updated_on" end add_index "news", ["author_id"], :name => "index_news_on_author_id" diff --git a/lib/tasks/homework_evaluation.rake b/lib/tasks/homework_evaluation.rake new file mode 100644 index 000000000..af833448d --- /dev/null +++ b/lib/tasks/homework_evaluation.rake @@ -0,0 +1,54 @@ +#coding=utf-8 + +namespace :homework_evaluation do + desc "start and end evaluation" + def get_assigned_homeworks(student_works, n, index) + student_works += student_works + student_works[index + 1 .. index + n] + end + #自动开启匿评的任务 + task :start_evaluation => :environment do + homework_detail_manuals = HomeworkDetailManual.where("evaluation_start = '#{Date.today}'") + homework_detail_manuals.each do |homework_detail_manual| + homework_common = homework_detail_manual.homework_common + if homework_detail_manual.comment_status == 1 #新建状态才可开启匿评 + student_works = homework_common.student_works + if student_works && student_works.size >= 2 + student_works.each_with_index do |work, index| + user = work.user + n = homework_detail_manual.evaluation_num + n = n < student_works.size ? n : student_works.size - 1 + assigned_homeworks = get_assigned_homeworks(student_works, n, index) + assigned_homeworks.each do |h| + student_works_evaluation_distributions = StudentWorksEvaluationDistribution.new(user_id: user.id, student_work_id: h.id) + student_works_evaluation_distributions.save + end + end + homework_detail_manual.update_column('comment_status', 2) + # 匿评开启消息邮件通知 + else + #作业数小于2,启动失败 + end + end + end + end + + #自动关闭匿评的任务 + task :end_evaluation => :environment do + homework_detail_manuals = HomeworkDetailManual.where("evaluation_end = '#{Date.today}'") + homework_detail_manuals.each do |homework_detail_manual| + homework_common = homework_detail_manual.homework_common + if homework_detail_manual.comment_status == 2 #开启匿评状态才可关闭匿评 + #计算缺评扣分 + work_ids = "(" + homework_common.student_works.map(&:id).join(",") + ")" + homework_common.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 + student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manuals.absence_penalty : 0 + student_work.save + end + homework_detail_manual.update_column('comment_status', 3) + # 匿评关闭消息邮件通知 + end + end + end +end diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index e8c28f678..b045a27cc 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -264,7 +264,7 @@ K.options = { minHeight : 100, minChangeSize : 50, zIndex : 811213, - items : ['code', 'emoticons','fontname', + items : ['emoticons','fontname', 'forecolor', 'hilitecolor', 'bold', '|', 'justifyleft', 'justifycenter', 'insertorderedlist','insertunorderedlist', '|', 'formatblock', 'fontsize', '|','indent', 'outdent', '|','imagedirectupload','table', 'media', 'preview',"more" @@ -4986,8 +4986,7 @@ KEditor.prototype = { htmlList.unshift('
    ') htmlList.push('
    ') var htmlListFull = []; - var fullItems = ['code', - 'emoticons','fontname', + var fullItems = ['emoticons','fontname', 'forecolor', 'hilitecolor', 'bold','|', 'justifyleft', 'justifycenter', 'insertorderedlist', 'insertunorderedlist', '|', 'formatblock', 'fontsize', '|', 'indent', 'outdent', '|','imagedirectupload','table', 'media', 'preview', "less", diff --git a/public/assets/kindeditor/plugins/code/previewcode.css b/public/assets/kindeditor/plugins/code/previewcode.css index ce3084a7c..f67f04149 100644 --- a/public/assets/kindeditor/plugins/code/previewcode.css +++ b/public/assets/kindeditor/plugins/code/previewcode.css @@ -38,8 +38,11 @@ pre.prettyprint { padding: 2px; border-right: 1px solid #ccc, border-top: 1px solid #ccc } -pre li,ul,ol { - list-style-type: none; +pre li,ol li { + list-style-type: decimal; +} +ul li{ + list-style-type: disc; } /* Specify class=linenums on a pre to get line numbering */ ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ @@ -50,7 +53,7 @@ li.L3, li.L5, li.L6, li.L7, -li.L8 { list-style-type: none } +li.L8 { list-style-type: decimal } /* Alternate shading for lines */ li.L1, li.L3, diff --git a/public/images/sidebar_bg.png b/public/images/sidebar_bg.png index 2704727d7..9ceea0f91 100644 Binary files a/public/images/sidebar_bg.png and b/public/images/sidebar_bg.png differ diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 4f091560d..07a149adb 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -940,20 +940,49 @@ function SearchByName(url,event) { var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == '13'){ - location.href = url + "&name=" + $("#course_student_name").val() + "&group=" + $("#late_penalty").val(); + $.get( + url, + { + name : $("#course_student_name").val(), + group : $("#student_work_in_group").val() + }, + function (data) { + } + ); } } function SearchByName_1(url) { - if($("#late_penalty").val() == null){ - location.href = url + "&name=" + $("#course_student_name").val() - } - else{ - location.href = url + "&name=" + $("#course_student_name").val() + "&group=" + $("#late_penalty").val(); - } + //alert($("#student_work_in_group").val()); + $.get( + url, + { + name : $("#course_student_name").val(), + group : $("#student_work_in_group").val() + }, + function (data) { + } + ); } +$(function(){ + $("#student_work_in_group").live("change",function(){ + $("#search_in_student_work").click(); + }); +}); + //新建作业临时弹框 function new_homework_alert(){ alert("您好!课程内直接发布作业的功能正在改进中,请直接点击\n顶部导航栏的“作业”向本课程发送作业。谢谢!如有问\n题,可参见帮助中心。"); } + +function show_student_work(url){ + $.get( + url, + { + + }, + function (data) { + } + ); +} diff --git a/public/javascripts/feedback.js b/public/javascripts/feedback.js index 1bbab1f45..fb3b35ca7 100644 --- a/public/javascripts/feedback.js +++ b/public/javascripts/feedback.js @@ -5,7 +5,7 @@ minStatue : true, skin : 'blue', durationTime : 1000 - } + }; var options = $.extend(defaults, options); this.each(function(){ @@ -13,17 +13,13 @@ var thisBox = $(this), closeBtn = thisBox.find('.close_btn' ), show_btn = thisBox.find('.show_btn' ), - sideContent = thisBox.find('.side_content'), - sideList = thisBox.find('.side_list') - ; + sideContent = thisBox.find('.side_content'); var defaultTop = thisBox.offset().top; //????????top - thisBox.css(options.float, 0); if(options.minStatue == "true"){ - $(".show_btn").css("float", options.float); + show_btn.css("float", options.float); sideContent.css('width', 0); show_btn.css('width', 25); - } //close closeBtn.bind("click",function(){ @@ -37,26 +33,12 @@ sideContent.stop(true, true).delay(200).animate({ width: '154px'},"fast"); cookiesave('minStatue','false','','',''); }); - - - }); //end this.each }; })(jQuery); - -$(function(){ - $("#button1").click(function(){ - myTips("<%= l(:label_feedback_success) %>","success"); - }); - -}); - function f_submit() { -// var subject = $("#memo_subject").val(); -// var content = $("#memo_content").val(); -// $("#memo_subject").val(subject+":"+ content.substr(0,18)+"..."); $("#new_memo").submit(); } @@ -68,11 +50,8 @@ function cookiesave(n, v, mins, dn, path) if(!mins) mins = 365 * 24 * 60; if(!path) path = "/"; var date = new Date(); - date.setTime(date.getTime() + (mins * 60 * 1000)); - var expires = "; expires=" + date.toGMTString(); - if(dn) dn = "domain=" + dn + "; "; document.cookie = n + "=" + v + expires + "; " + dn + "path=" + path; @@ -86,34 +65,31 @@ function cookieget(n) var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(name) == 0){ - return c.substring(name.length,c.length);} - + return c.substring(name.length,c.length); + } } return false; } $(function(){ + $(".closeSidebar").click(function(){ + $(".show_btn").css("display","none"); + $("#scrollsidebar").css("display","none"); + return false; + }); + $("#button1").click(function(){ - myTips("<%= l(:label_feedback_success) %>","success"); + myTips("反馈成功","success"); }); -}); - - -$(document).ready(function () { - $(function () { - $("#scrollsidebar").fix({ - float: 'right', //default.left or right - minStatue: cookieget('minStatue'), - skin: 'green', //default.gray or blue - durationTime: 600 - }); + $("#scrollsidebar").fix({ + float: 'right', //default.left or right + minStatue: cookieget('minStatue'), + skin: 'green', //default.gray or blue + durationTime: 600 }); -}); - -$(document).ready(function(){ $("#subject").keydown(function(){ var curLength=$("#subject").val().length; if(curLength>50){ @@ -123,8 +99,7 @@ $(document).ready(function(){ else{ $("#textCount").text(50-$("#subject").val().length) } - }) - $("#subject").keyup(function(){ + }).keyup(function(){ var curLength=$("#subject").val().length; if(curLength>50){ var num=$("#subject").val().substr(0,50); @@ -133,5 +108,5 @@ $(document).ready(function(){ else{ $("#textCount").text(50-$("#subject").val().length) } - }) -}) \ No newline at end of file + }); +}); \ No newline at end of file diff --git a/public/javascripts/init_activity_KindEditor.js b/public/javascripts/init_activity_KindEditor.js index 1e51067ef..decbbb341 100644 --- a/public/javascripts/init_activity_KindEditor.js +++ b/public/javascripts/init_activity_KindEditor.js @@ -6,42 +6,49 @@ function init_editor(params){ var editor = params.kindutil.create(params.textarea, { resizeType : 1,minWidth:"1px",width:"95%", - height:"30px",// == undefined ? "30px":paramsHeight+"px", - minHeight:"30px",// == undefined ? "30px":paramsHeight+"px", + height:"33px",// == undefined ? "30px":paramsHeight+"px", + minHeight:"33px",// == undefined ? "30px":paramsHeight+"px", items:['emoticons'], afterChange:function(){//按键事件 var edit = this.edit; var body = edit.doc.body; edit.iframe.height(paramsHeight); - this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + (paramsHeight == undefined ? 30:paramsHeight), paramsHeight)); + this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + paramsHeight , paramsHeight)); }, afterBlur:function(){ nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea}); if(this.edit.html()=="") { - this.edit.html('我要回复'); + this.edit.html("我要回复"); } //params.toolbar_container.hide(); $('#reply_image_' + id).addClass('imageFuzzy'); - //this.resize("95%", null); + 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(); + this.resize("95%", null); + }else if(edit.html().val().trim() != ""){ + params.submit_btn.show(); + } + //params.submit_btn.css("display","none"); }, afterFocus: function(){ var edit = this.edit; var body = edit.doc.body; - if(/^\s*<\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\#\d*\;\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test(edit.html())){ + 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.show(); params.contentmsg.hide(); // params.toolbar_container.show(); $('#reply_image_' + id).removeClass('imageFuzzy'); //edit.iframe.width(paramsWidth); this.resize(paramsWidth, null); - params.submit_btn.show(); + //params.submit_btn.show(); }, afterCreate:function(){ - params.submit_btn.css("display","none"); + //params.submit_btn.hide(); var toolbar = $("div[class='ke-toolbar']",params.div_form); toolbar.css('width',24); $(".ke-outline>.ke-toolbar-icon",toolbar).append('表情'); @@ -52,12 +59,10 @@ function init_editor(params){ edit.iframe[0].scroll = 'no'; body.style.overflowY = 'hidden'; //reset height - var edit = this.edit; - var body = edit.doc.body; paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight; edit.iframe.height(paramsHeight); - edit.html('我要回复'); - this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ (paramsHeight == undefined ? 30:paramsHeight) , paramsHeight)); + edit.html("我要回复"); + this.resize(null,Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight));// Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ paramsHeight , paramsHeight) // params.toolbar_container.hide(); } @@ -74,7 +79,7 @@ function nh_check_field(params){ if(params.content.html()!=params.textarea.html() || params.issubmit==true){ params.textarea.html(params.content.html()); params.content.sync(); - if(params.content.isEmpty() || /^\&\w*\;\w*\s*\w*\=\"\w*\"\s*\w*\=\"\w*\:\#\d*\;\"\&\w*\;[\u4e00-\u9fa5]*\&\w*\;\/\w*\&\w*\;$/.test(params.textarea.html())){ + 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.html('内容不能为空'); params.contentmsg.css({color:'#ff0000'}); }else{ @@ -152,5 +157,5 @@ function init_activity_KindEditor_data(id){ }); }); - $(".ke-edit").css("height","25px"); + $(".ke-edit").css("height","33px"); } \ No newline at end of file diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index e5f5e8b4c..86456bd8a 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -56,18 +56,20 @@ function show_more_project(url){ } //老师提交 新建/修改 作业 -function submit_homework(id) -{ - if(!regex_homework_name()) - { +function submit_homework(id){ + if(!regex_homework_name()){ $("#homework_name").focus(); } - else if(!regex_homework_end_time()) - { + else if(!regex_homework_end_time()){ $("#homework_end_time").focus(); } - else if(!regex_course_id()) - { + //else if(!regex_evaluation_start()){ + // $("#evaluation_start_time").focus() + //} + //else if(!regex_evaluation_end()){ + // $("#evaluation_end_time").focus() + //} + else if(!regex_course_id()){ $("#course_id").focus(); } else{ @@ -134,6 +136,83 @@ function search_homework_by_name(url){ ); } +//提交匿评参数设置 +function submit_set_evaluation_attr(end_time){ + if(!regex_evaluation_start(end_time)){ + $("#evaluation_start_time").focus(); + } + else if(!regex_evaluation_end()){ + $("#evaluation_end_time").focus(); + } + else if(!regex_evaluation_num()){ + $("#evaluation_num").focus(); + } + else{ + $('#popbox02 form').submit(); + } +} + +//验证匿评开启时间:大于截止时间,或者为空 +function regex_evaluation_start(end_time){ + var evaluation_start = $.trim($("#evaluation_start_time").val()); + if(evaluation_start == ""){ + $("#homework_evaluation_start_time").text("开启匿评日期不能为空"); + return false; + } + var end_time = new Date(end_time); + var evaluation_start_time = new Date(evaluation_start); + if(evaluation_start_time > end_time){ + $("#homework_evaluation_start_time").text(""); + return true; + }else{ + $("#homework_evaluation_start_time").text("开启匿评日期必须大于截止日期"); + return false; + } +} + +//验证匿评结束时间:大于匿评开启时间,或者为空。当匿评开启时间为空时,匿评结束时间必须为空 +function regex_evaluation_end(){ + var evaluation_start = $.trim($("#evaluation_start_time").val()); + var evaluation_end = $.trim($("#evaluation_end_time").val()); + if(evaluation_end == ""){ + $("#homework_evaluation_end_time").text("关闭匿评日期不能为空"); + return true; + } + var evaluation_start_time = new Date(evaluation_start); + var evaluation_end_time = new Date(evaluation_end); + if(evaluation_end_time > evaluation_start_time){ + $("#homework_evaluation_end_time").text(""); + return true; + }else{ + $("#homework_evaluation_end_time").text("关闭匿评日期必须大于开启匿评日期"); + return false; + } +} + +//验证匿评数量 +function regex_evaluation_num(){ + var evaluation_num = $.trim($("#evaluation_num").val()); + var regex = /^\d+$/; + if(evaluation_num==""){ + $("#evaluation_num_notice").text("匿评人数不能为空"); + return false; + } + else if(regex.test(evaluation_num)){ + if(evaluation_num > 0){ + $("#evaluation_num_notice").html(""); + return true; + } + else{ + $("#evaluation_num_notice").text("匿评人数必须为大于0"); + return false; + } + } + else{ + $("#evaluation_num_notice").text("匿评人数只能为数字"); + return false; + } +} + //提交新建作品 function new_student_work() { diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 7c1e590db..754112b52 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -31,8 +31,8 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;} /*右侧内容新*/ .ctt2{clear:both; } -.hworkListBanner {width:720px; height:40px; background:#eaeaea; margin-bottom:10px; margin-left:5px;} -.hworkListContainer {float:left; clear:both; width:720px; margin-left:5px;} +.hworkListBanner {width:720px; height:40px; background:#eaeaea; margin-bottom:10px;} +.hworkListContainer {float:left; clear:both; width:720px;} .showHwork{ border:2px solid #269ac9; width:696px; padding:10px; color:#666666; padding-bottom:0px; } .showHworkP{ width:630px; float:left;} .showHwork ul li {margin-bottom: 5px;} @@ -41,17 +41,21 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;} .pingBoxTit{ float:left; width:625px; margin-left:10px;} .pingText{border:1px solid #CCCCCC; margin:5px; padding:5px; width:610px; height:20px; } .pingBackTit{ float:left; width:573px; margin-left:10px; } -.hworkUl{ height:50px; border-bottom:1px solid #eaeaea; line-height:50px; vertical-align:middle;} +.hworkUl{ height:30px; border-bottom:1px solid #eaeaea; line-height:30px; vertical-align:middle; padding-bottom:5px;} +.hworkH30 {height:30px !important; line-height:30px !important;} .hworkListRow {height:65px; border-bottom:1px solid #eaeaea; line-height:65px; vertical-align:middle;} -.hworkListRow:hover {background-color:#f6f6f7; cursor:pointer;} +.hworkListRow:hover {background-color:#f6f6f7;} .hworkUl li{ float:left;} .hworkListRow li{ float:left;} -.hworkList380 {width:375px; text-align:left; height:50px; line-height:50px;padding-left:5px;} +.hworkList340 {width:335px; text-align:left; height:50px; line-height:50px;padding-left:5px;} .hworkList80 {width:80px; text-align:center;} .hworkList50 {width:50px; text-align:center;} +.hworkList130 {width:130px; text-align:center;} .codeList{ float:right; font-size:12px; color:#484848; padding:0px 3px; width:714px; margin-bottom:10px; } -.hworkName {max-width:380px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:16px; line-height:16px;} -.hworkDetail {max-width:100px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:14px; line-height:14px; font-size:12px; color:#888888;} +.hworkName {width:115px; float:left; line-height:18px;} +.hworkName div{max-height: 40px;overflow: hidden;} +.hworkStName {width:60px; max-width:60px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:18px; line-height:18px; font-size:12px; color:#888888; text-align:center;} +.hworkStID {width:80px; max-width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:18px; line-height:18px; font-size:12px; color:#888888; text-align:center;} .hworkDate {max-width:150px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:14px; line-height:14px; font-size:12px; color:#888888;} .hworkMenu {width:100px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-110px; font-size:12px; color:#888888; display:none; line-height:2;} a.hworkExport {background:url(../images/homepage_icon2.png) -10px -401px no-repeat; padding-left:23px;} @@ -60,11 +64,25 @@ a.hworkSetting {background:url(../images/homepage_icon2.png) -10px -450px no-rep .infoNi{ width:100px; padding:5px;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left; line-height:2; position:absolute; margin-top:-24px;margin-left: 40px;} .problemTxt {width:660px; margin-left:10px; color:#777777; position:relative;} .rTxtTit{width:560px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#269ac9; font-size:14px;} -.width620{width: 620px;} -.width625{width: 625px;} -.width455{width: 455px;} -.m_width620{max-width: 620px;} +.hworkSearchBox {border:1px solid #e6e6e6; width:185px; float:left; background-color:#ffffff;} +.hworkSearchInput {border:none; outline:none; background-color:#ffffff; width:145px; height:25px; padding-left:10px; display:block; float:left;} +.hworkSearchIcon {width:30px; height:25px; background:url(../images/nav_icon.png) -8px -1px no-repeat; float:left;} +a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-repeat;} +.classSplit {border:1px solid #e7e7e7; height:27px; line-height:27px; display:inline-block; margin-left:10px; padding-left:5px; cursor:pointer; outline:none; width:95px; max-width:95px;} +.classList {width:45px; border:1px solid #e7e7e7; float:left; position:absolute; background-color:#ffffff; left:-1px;} +.hworkPortrait {float:left; width:40px;} +.HomeworkNameTitle{width: 285px;text-align: center;margin-left: 50px;} +.HomeworkStuTitle{width: 80px;text-align: center;} +.StudentName{display: table-cell;width: 115px;vertical-align: middle;text-align: center;height: 40px;} +.width385{width: 385px;} +.width505{width: 505px;} +.width165{width: 165px;} .width180{width: 180px;} +.width525{width: 525px;} +.width285{width: 285px;} +.mr95{margin-right: 95px;} +.ml100{margin-left: 100px;} +.mt16{margin-top: 16px;} /*邮件邀请*/ @@ -262,6 +280,8 @@ a:hover.ping_sub{ background:#14a8b9;} .ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;} .ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;} /*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/ +.list_style ol li{list-style-type: decimal;margin-left: 20px;} +.list_style ul li{list-style-type: disc;margin-left: 20px;} /* 创建作品 work */ .Newwork{ width:668px; height:418px;} @@ -637,7 +657,7 @@ a.Reply_pic{ display:block; width:30px; height:30px; padding:2px; border:1px sol a:hover.Reply_pic{border:1px solid #64bdd9;} .Msg_txt{ float:left; width:540px; margin-left:10px;} .Msg_txt p{ } -.talkWrapMsg ul li{border-bottom:1px dashed #d9d9d9; padding-bottom:10px; margin-bottom:10px;} +.talkWrapMsg > ul > li{border-bottom:1px dashed #d9d9d9; padding-bottom:10px; margin-bottom:10px;} .talkReply{ width:540px; margin-left:50px; border-top:1px dashed #d9d9d9; padding-top:10px; } .Replybox{ float:left; width:495px; margin-left:5px;} .talk_nextpage{ border:none; width:410px; margin:0 auto;} diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css index ebb290597..6114c1b4d 100644 --- a/public/stylesheets/css.css +++ b/public/stylesheets/css.css @@ -120,7 +120,8 @@ a:hover.ping_sub{ background:#14a8b9;} .ping_distop span{ float:left;} .ping_distop p{ color:#5f5f5f;min-height: 24px;} .ping_disfoot a{ float:right; color:#15bccf; margin-left:5px;} - +.list_style ol li{list-style-type: decimal;margin-left: 20px;} +.list_style ul li{list-style-type: disc;margin-left: 20px;} .ping_distop span a{ float:right; /*width:20px;*/ height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 838050fe0..b77b95f21 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -58,6 +58,12 @@ h4{ font-size:14px; color:#3b3b3b;} .clearfix{clear:both;zoom:1} .break_word{ word-break:break-all; word-wrap: break-word;} .white_space{white-space:nowrap;} +.fontGrey3 {color:#484848;} +a.linkGrey6 {color:#484848 !important;} +a.linkGrey6:hover {color:#ffffff !important;} +.markPopup {width:290px; height:auto; padding:5px 0px 15px 15px; background-color:#ffffff; z-index:1000;} +.markInput { outline:none; border:1px solid #e6e6e6; height:30px; width:140px; color:#3d3c3c;} +.markPercentage {margin:10px 0; border:1px solid #e6e6e6; width:70px; height:30px; outline:none; font-size:12px; color:#3d3c3c;} /* Spacing */ .ml2{ margin-left:2px;} @@ -103,6 +109,7 @@ h4{ font-size:14px; color:#3b3b3b;} .mb8 {margin-bottom:8px !important;} .mb10{ margin-bottom:10px !important;} .mb12 {margin-bottom:12px !important;} +.mb15{margin-bottom: 15px;} .mb20{ margin-bottom:20px;} .pl15{ padding-left:15px;} .w20{ width:20px;} @@ -529,7 +536,7 @@ a.homepageWhite:hover {color:#a1ebff} a.newsGrey {color:#4b4b4b;} a.newsGrey:hover {color:#000000;} a.newsRed {color:red;} -a.newsRed:hovor {color:#888888;} +a.newsRed:hover {color:#888888;} a.replyGrey {color:#888888; display:inline-block;} a.replyGrey:hover {color:#4b4b4b;} a.replyGrey1 {color:#888888;} @@ -570,6 +577,7 @@ a.postTypeGrey:hover {color:#269ac9;} .homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;} .homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;} .borderBottomNone {border-bottom:none !important;} +.topBorder {border-top: 1px solid #e4e4e4;} div.minHeight48{min-height: 48px;} .homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;} .homepagePostReplyBannerTime{width:85px; display:inline-block;} @@ -690,8 +698,6 @@ a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;} .Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px;} .AgreementTxt{text-indent:2em; margin-bottom:15px;} .AgreementImg{ margin:0px auto; width:619px;} -.AgreementTxt{text-indent: 2em; margin-bottom: 15px;} -.AgreementImg{margin: 0px auto; width: 820px;} /*底部*/ #Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/ @@ -707,7 +713,7 @@ html{ overflow-x:hidden;} .scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; } .side_content{width:154px; height:auto; overflow:hidden; float:left; } .side_content .side_list {width:154px;overflow:hidden;} -.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:190px;cursor:pointer;} +.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:200px; cursor:pointer;} .show_btn span { display:none;} .close_btn{width:24px;height:24px;cursor:pointer;} .side_title,.side_bottom,.close_btn,.show_btn {background:url(../images/sidebar_bg.png) no-repeat; } @@ -717,20 +723,21 @@ html{ overflow-x:hidden;} .close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;} .close_btn span { display:none;} .side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;} -.msgserver { margin-top:5px;} -.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -112px; padding-left:22px; height:21px; display:block; } +.msgserver { margin:10px 0 0px 5px;} +.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -110px; padding-left:22px; display:block; height:24px; } .opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;} -a.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;} -a:hover.opnionButton{background: #0fa9bb; } +a.opnionButton{ display:block; background:#269ac9; width:130px; height:26px; margin-top:5px; text-align:center; padding-top:0px; color:#fff;} +a.opnionButton:hover{background: #297fb8; } /* blue skin as the default skin */ .side_title {background-position:-195px 0;} .side_center {background:url(../images/blue_line.png) repeat-y center; } .side_bottom {background-position:-195px -50px;} -a.close_btn {background-position:-44px 0;} -a:hover.close_btn {background-position:-66px 0;} +.close_btn {background-position:-44px 0;} +.close_btn:hover {background-position:-66px 0;} .show_btn {background-position:-119px 0;} -.msgserver a {color:#15bccf; } +.msgserver a {color:#269ac9; } .msgserver a:hover { text-decoration:underline; } +.closeSidebar {background:url(../images/sidebar_bg.png) 0px -112px no-repeat; width:28px; height:18px; margin-top:65px; position:absolute;} /***** Ajax indicator ******/ @@ -771,9 +778,6 @@ div.modal { .ui-widget { font-family: Verdana, sans-serif; font-size: 1.1em; - width: 200px; - height: 14px; - background: #e2e2e2; } .ui-dialog .ui-dialog-content { position: relative; @@ -1153,3 +1157,6 @@ a:hover.tijiao{ background:#0f99a9;} a.link_file_a{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; } a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;} .link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} + +.list_style ol li{list-style-type: decimal;margin-left: 20px;} +.list_style ul li{list-style-type: disc;margin-left: 20px;} diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index f69e828e8..1669bdd05 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -329,6 +329,8 @@ a:hover.ping_sub{ background:#14a8b9;} .ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;} .ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;} /*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/ +.list_style ol li{list-style-type: decimal;margin-left: 20px;} +.list_style ul li{list-style-type: disc;margin-left: 20px;} /*上传资源弹出框样式*/ .popbox_polls{position:fixed !important;} @@ -863,7 +865,7 @@ a.Reply_pic{ display:block; width:30px; height:30px; padding:2px; border:1px sol a:hover.Reply_pic{border:1px solid #64bdd9;} .Msg_txt{ float:left; width:540px; margin-left:10px;} .Msg_txt p{ } -.talkWrapMsg ul li{border-bottom:1px dashed #d9d9d9; padding-bottom:10px; margin-bottom:10px;} +.talkWrapMsg > ul > li{border-bottom:1px dashed #d9d9d9; padding-bottom:10px; margin-bottom:10px;} .talkReply{ width:540px; margin-left:50px; border-top:1px dashed #d9d9d9; padding-top:10px; } .Replybox{ float:left; width:495px; margin-left:5px;} .talk_nextpage{ border:none; width:410px; margin:0 auto;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index d8902876e..c4a839e0a 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -91,8 +91,10 @@ h4{ font-size:14px; color:#3b3b3b;} .mr45{margin-right: 45px;} .mr50{margin-right: 50px;} .mr55{margin-right: 55px;} +.mr60 {margin-right:60px;} .mr70{margin-right: 70px;} .mw15{margin:0 15px;} +.mr90 {margin-right:90px;} .mw20{ margin: 0 20px;} .mt1{margin-top: 1px;} .mt-4 {margin-top:-4px;} @@ -102,9 +104,10 @@ h4{ font-size:14px; color:#3b3b3b;} .mt8{ margin-top:8px;} .mt10{ margin-top:10px !important;} .mt30{ margin-top: 30px;} -.mt12 { margin-top:12px;} +.mt12 { margin-top:12px !important;} .mt15 {margin-top:15px;} .mt19 {margin-top:19px !important;} +.ml70{margin-left: 70px;} .mb4{ margin-bottom:4px;} .mb5{ margin-bottom:5px;} .mb8 {margin-bottom:8px;} @@ -213,6 +216,8 @@ a.linkGrey5 {color:#484848;} a.linkGrey5:hover {color:#3498db;} a.linkGrey6 {color:#484848 !important;} a.linkGrey6:hover {color:#ffffff !important;} +a.linkGrey7 {color:#888888;} +a.linkGrey7:hover {color:#269ac9;} a.bBlue {background-color:#3498db;} a.bBlue:hover {background-color:#297fb8;} a.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;} @@ -293,7 +298,7 @@ a:hover.bgreen_n_btn{background:#08a384;} #Container{ width:1000px; margin:0 auto; } /*头部导航*/ -#Header{ margin:10px 0; background:#15bccf; height:40px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; } +#Header{ margin:10px 0; background:#15bccf; height:40px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; position: relative;} .logo{ margin:5px 10px; } #TopNav{} #TopNav ul li{ margin-top:8px;} @@ -604,6 +609,7 @@ a.postTypeGrey:hover {color:#269ac9;} .homepagePostReply {width:720px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;} .homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;} .borderBottomNone {border-bottom:none !important;} +.topBorder {border-top: 1px solid #e4e4e4;} .homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;} .homepagePostReplyBannerTime{width:85px; display:inline-block;} .homepagePostReplyBannerMore{width:330px; display:inline-block; text-align:right;} @@ -708,7 +714,7 @@ html{ overflow-x:hidden;} .scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; } .side_content{width:154px; height:auto; overflow:hidden; float:left; } .side_content .side_list {width:154px;overflow:hidden;} -.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:190px;cursor:pointer;} +.show_btn{ width:0; height:112px; overflow:hidden; float:left; margin-top:200px; cursor:pointer;} .show_btn span { display:none;} .close_btn{width:24px;height:24px;cursor:pointer;} .side_title,.side_bottom,.close_btn,.show_btn {background:url(../images/sidebar_bg.png) no-repeat; } @@ -718,21 +724,21 @@ html{ overflow-x:hidden;} .close_btn { float:right; display:block; width:21px; height:16px; margin:9px 10px 0 0; _margin:16px 5px 0 0;} .close_btn span { display:none;} .side_center .custom_service p { text-align:center; padding:6px 0; margin:0; vertical-align:middle;} -.msgserver { margin-top:5px;} -/*.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -112px; padding-left:22px; height:21px; display:block; }*/ -.msgserver a { padding-left:4px; height:21px; display:block; } +.msgserver { margin:10px 0 0px 5px;} +.msgserver a { background:url(../images/sidebar_bg.png) no-repeat -119px -110px; padding-left:22px; display:block; height:24px; } .opnionText{box-shadow:none; width:122px; height:180px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;} -a.opnionButton{ display:block; background:#15bccf; width:130px; height:23px; margin-top:5px; text-align:center; padding-top:3px;} -a:hover.opnionButton{background: #0fa9bb; } +a.opnionButton{ display:block; background:#269ac9; width:130px; height:26px; margin-top:5px; text-align:center; padding-top:0px; color:#fff;} +a.opnionButton:hover{background: #297fb8; } /* blue skin as the default skin */ .side_title {background-position:-195px 0;} .side_center {background:url(../images/blue_line.png) repeat-y center; } .side_bottom {background-position:-195px -50px;} -a.close_btn {background-position:-44px 0;} -a:hover.close_btn {background-position:-66px 0;} +.close_btn {background-position:-44px 0;} +.close_btn:hover {background-position:-66px 0;} .show_btn {background-position:-119px 0;} -.msgserver a {color:#15bccf; } +.msgserver a {color:#269ac9; } .msgserver a:hover { text-decoration:underline; } +.closeSidebar {background:url(../images/sidebar_bg.png) 0px -112px no-repeat; width:28px; height:18px; margin-top:65px; position:absolute;} .hiddent{ overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} @@ -942,5 +948,8 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;} .AgreementBox{margin: 20px 0; color: #666666; font-size: 14px; line-height: 1.9;} .Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px; border: none;} -.AgreementTxt{text-indent: 2em; margin-bottom: 15px;} -.AgreementImg{margin: 0px auto; width: 820px;} +.AgreementTxt{text-indent:2em; margin-bottom:15px;} +.AgreementImg{ margin:0px auto;} + +.list_style ol li{list-style-type: decimal;margin-left: 20px;} +.list_style ul li{list-style-type: disc;margin-left: 20px;} diff --git a/public/stylesheets/public_new.css b/public/stylesheets/public_new.css index 7cd0a461c..2d39e75ea 100644 --- a/public/stylesheets/public_new.css +++ b/public/stylesheets/public_new.css @@ -794,4 +794,4 @@ div.flash.warning, .conflict { .AgreementBox{ margin:20px 0; color:#666666; font-size:14px; line-height:1.9;} .Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px; border: none;} .AgreementTxt{text-indent: 2em; margin-bottom: 15px;} -.AgreementImg{margin: 0px auto; width: 820px;} \ No newline at end of file +.AgreementImg{margin: 0px auto;} \ No newline at end of file