第二个人打分之后,评分结果的样式

This commit is contained in:
sw 2015-09-30 10:43:40 +08:00
parent d1bb76cfcb
commit 11314a5366
2 changed files with 2 additions and 2 deletions

View File

@ -271,6 +271,7 @@ class StudentWorkController < ApplicationController
end
@is_new = false
else
@is_last_a = @work.student_works_scores.empty?
@score = StudentWorksScore.new
@score.score = params[:score] if params[:score]
@score.comment = params[:new_form][:user_message] if params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != ""

View File

@ -2,8 +2,7 @@ $("#add_student_score_<%= @work.id%>").html("<%= escape_javascript(render :parti
$('#score_<%= @work.id%>').peSlider({range: 'min'});
<% if @is_new%>
$("#score_list_<%= @work.id%>").find("div:last").find("ul").addClass("ping_line");
$("#score_list_<%= @work.id%>").prepend("<div id='work_score_<%= @score.id%>'><%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => true}) %></div>");
$("#score_list_<%= @work.id%>").prepend("<div id='work_score_<%= @score.id%>'><%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => @is_last_a}) %></div>");
<% else %>
$("#work_score_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @score,:is_last => @is_last}) %>");
<% end%>