21 lines
1.5 KiB
Plaintext
21 lines
1.5 KiB
Plaintext
//$("#HomeWorkCon").replaceWith("<%#= escape_javascript(render :partial => 'users/user_homework_form', :locals => { :homework => @homework,:edit_mode => true })%>");
|
|
hideModal('#coursesChoosePopup');
|
|
$("#homework_name").val("<%= @homework.name%>");
|
|
$("#homework_end_time").val("<%= @homework.end_time%>");
|
|
<% if @select_course == "0"%>
|
|
$("#course_id").val("<%= @homework.course_id%>");
|
|
<% end%>
|
|
$("#ref_homework_id").val("<%= @ref_homework.id%>");
|
|
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => @homework,:has_program => true,:has_group => true,:show_member=>true})%>");
|
|
homework_description_editor.html("<%= escape_javascript(@homework.description.html_safe)%>");
|
|
//$("input[name='homework_type']").val("<%#= @homework.homework_type%>");
|
|
<% if @homework_detail_programing %>
|
|
$("#BluePopupBox").html("<%=escape_javascript( render :partial => 'users/user_programing_attr', :locals => {:edit_mode => true, :homework => @homework})%>");
|
|
$("#BluePopupBox a.BlueCirBtn").click();
|
|
<% elsif @homework_detail_group %>
|
|
$('span.group_detail_info').text('分组人数:<%=@homework_detail_group.min_num %>-<%=@homework_detail_group.max_num %> 人');
|
|
$("#GroupPopupBox").html("<%=escape_javascript( render :partial => 'users/user_group_attr', :locals => {:edit_mode => true, :homework => @homework})%>");
|
|
$("#GroupPopupBox a.group_save_btn").click();
|
|
<% end %>
|
|
$("#homework_editor").show();
|